M
moondaddy
Guest
I have a small WPF app with one WCF service.
I use svcutil.exe to generate the client side code needed to support my services. I have been using this process for 10+ years for 100s of services and normally things work as expected.
Using VS 2019, I was working in the app today and suddenly the app hung a bit, some of the code pages looked like VS was confused about which code pages it was showing, then one of my web service methods had a parameter that I removed several hours ago. (Everything has been working fine all day up to this point).
I removed the parameter again, cleaned and rebuilt the solution, ran svcutil.exe again, then tried to run the solution and instantly I get the dreaded error:
Could not find default endpoint element that references contract 'MainService' in the ServiceModel client configuration section.
Everything should be perfect but for the life of me I cannot determine why this doesn't work anymore.
This is from the App.config:
<system.serviceModel>
<bindings>
<customBinding>
<binding name="CustomBinding_MainService">
<binaryMessageEncoding />
<httpTransport maxReceivedMessageSize = "2147483647" maxBufferSize = "2147483647" />
</binding >
</customBinding>
</bindings>
<client>
<endpoint address="http://localhost:18418/WS/Ap/Main/MainService.svc"
binding="customBinding" bindingConfiguration="CustomBinding_MainService"
contract="MainService" name="CustomBinding_MainService" />
</client>
<extensions />
</system.serviceModel>
and this is from the web.config:
<bindings>
<customBinding>
<binding name="VelocityService.MainService.customBinding0" closeTimeout="00:11:00" openTimeout="00:11:00" receiveTimeout="00:11:00" sendTimeout="00:11:00">
<binaryMessageEncoding maxReadPoolSize="2147483647" maxWritePoolSize="2147483647" maxSessionSize="2147483647">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
</binaryMessageEncoding>
<httpTransport maxReceivedMessageSize="2147483646" />
</binding>
</customBinding>
</bindings>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
<services>
<service name="VelocityService.MainService">
<endpoint address="" binding="customBinding" bindingConfiguration="VelocityService.MainService.customBinding0" contract="VelocityService.MainService" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
Any ideas on how to trouble shoot this?
Thank you.
Continue reading...
I use svcutil.exe to generate the client side code needed to support my services. I have been using this process for 10+ years for 100s of services and normally things work as expected.
Using VS 2019, I was working in the app today and suddenly the app hung a bit, some of the code pages looked like VS was confused about which code pages it was showing, then one of my web service methods had a parameter that I removed several hours ago. (Everything has been working fine all day up to this point).
I removed the parameter again, cleaned and rebuilt the solution, ran svcutil.exe again, then tried to run the solution and instantly I get the dreaded error:
Could not find default endpoint element that references contract 'MainService' in the ServiceModel client configuration section.
Everything should be perfect but for the life of me I cannot determine why this doesn't work anymore.
This is from the App.config:
<system.serviceModel>
<bindings>
<customBinding>
<binding name="CustomBinding_MainService">
<binaryMessageEncoding />
<httpTransport maxReceivedMessageSize = "2147483647" maxBufferSize = "2147483647" />
</binding >
</customBinding>
</bindings>
<client>
<endpoint address="http://localhost:18418/WS/Ap/Main/MainService.svc"
binding="customBinding" bindingConfiguration="CustomBinding_MainService"
contract="MainService" name="CustomBinding_MainService" />
</client>
<extensions />
</system.serviceModel>
and this is from the web.config:
<bindings>
<customBinding>
<binding name="VelocityService.MainService.customBinding0" closeTimeout="00:11:00" openTimeout="00:11:00" receiveTimeout="00:11:00" sendTimeout="00:11:00">
<binaryMessageEncoding maxReadPoolSize="2147483647" maxWritePoolSize="2147483647" maxSessionSize="2147483647">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
</binaryMessageEncoding>
<httpTransport maxReceivedMessageSize="2147483646" />
</binding>
</customBinding>
</bindings>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
<services>
<service name="VelocityService.MainService">
<endpoint address="" binding="customBinding" bindingConfiguration="VelocityService.MainService.customBinding0" contract="VelocityService.MainService" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
Any ideas on how to trouble shoot this?
Thank you.
Continue reading...