There can be many possible causes for this issue to occur, but here is one which we had encountered recently when application code was re-vamped and built with different class structures/names but still hosting environment was pointing to the old config file.
Resolution:
- First, check applications config file thoroughly, mainly section <system.ServiceModel>
- Check the current service class name used for hosting the service and verify with the configuration file in the below tag,
<service name="ProjectName.OldServiceClassName"> // if you are referring still to old service class name then this issue will occur; change this to new service class name
<endpoint address="" binding="basicHttpBinding" contract="ProjectName.IService">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
<host>
<baseAddresses>
<add baseAddress=""/>
</baseAddresses>
</host>
</service>
Here is my StackOverflow post on same,
I found this post very helpful which I found on yahoo.Thank you for sharing this information.
July 17, 2021 at 3:03 pm