I am running into an issue trying to host two services on the same site. They have the same base uri, but different services names, and each has its own contract.
While testing in my VS environment (IIS 7.5) everything works fine. However when I deploy to a server (IIS 8.5), both uri's are showing the same wsdl for some reason. It seems like the contract for the second service is ignored.
There are two different .svc files with code behind. (all names have been changed to protect the innocent.)
sites:
https://mysite/services/Service1.svc
https://mysite/services/Service2.svc
Here is my config:
<services>
<service name="Service1" behaviorConfiguration="DefaultBehavior">
<endpoint address="" binding="wsHttpBinding" bindingConfiguration="DefaultBinding" contract="Namespace.IService1"/>
<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange"/>
</service>
<service name="Service2" behaviorConfiguration="DefaultBehavior">
<endpoint address="" binding="wsHttpBinding" bindingConfiguration="DefaultBinding" contract="Namespace.IService2"/>
<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange"/>
</service>
</services>
<bindings>
<wsHttpBinding>
<binding name="DefaultBinding" receiveTimeout="00:05:00"
sendTimeout="00:05:00" bypassProxyOnLocal="false" transactionFlow="false"
hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="2147483647"
maxReceivedMessageSize="2147483647" messageEncoding="Mtom"
textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
<readerQuotas maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<reliableSession ordered="true" inactivityTimeout="00:5:00" enabled="false"/>
<security mode="Transport">
<transport clientCredentialType="None" />
</security>
</binding>
<wsHttpBinding>
<bindings>
<serviceBehaviors>
<behavior name="DefaultBehavior">
<serviceMetadata httpsGetEnabled="true" httpsGetBindingConfiguration="true" />
<serviceDebug httpHelpPageEnabled="true" includeExceptionDetailInFaults="true" />
<dataContractSerializer maxItemsInObjectGraph="2147483647"/>
<serviceThrottling maxConcurrentCalls="160" maxConcurrentInstances="160" maxConcurrentSessions="100" />
</behavior>
</serviceBehaviors>
The problem is that both sites are reflecting the same WSDL, i.e. same methods for contract="Namespace.IService1"
Any ideas on what is going on here to cause this?