I\'m migrating an existing service from HTTP (Dev/UAT) to HTTPS (Production), and I\'m having trouble with the configuration. Here is the system.serviceModel section of my
HTTP and HTTPS are served from different virtual hosts. Are you sure your service is correctly installed in both?
Check that your service element name in the web.config matches the fully qualified named of the class that implements your contract.
<services>
<service name="MyNamespace.MyService">
<endpoint name="MyEndpoint" address="" binding="wsHttpBinding" ...
Thanks to Johann Blais for the answer, I've found out that you would need to include the fully qualified name for the class that defines the service contract.
For example if your service is
namespace MyCompany.WcfService
{
[ServiceContract(Namespace="http://xsd.mycompany.com/mcy/1_0_0")]
public interface IService
{
[OperationContract(IsOneWay = false)]
void DoStuff()
}
public class Service : IService
{
void DoStuff()
{
}
}
}
The corresponding service definition in your web.config would be
<system.serviceModel>
<services>
<service name="MyCompany.WcfService.IService">
<endpoint address="" binding="basicHttpBinding" contract="MyCompany.WcfService.IService" />
</service>
</services>
...
</system.serviceModel>
In your WSDL you see that your service does not expose port on HTTPS but only on HTTP. Moreover you can also see that your service uses BasicHttpBinding (see port name and binding name). That means that your service configuration is not used at all. Check that name in the service element is same as name in your .svc markup. It has to be defined including namespaces.