I have a WCF Service which I need to host on an old IIS 6 server. The server has a name Server1 but also has an alias used for the website. Apparently the server and the website resolve to different IP addresses.
So WCF Service path is
But when I look at xml generates, the schemaLocation shows up as:
<xsd:import schemaLocation="https://server1.subdomain.domain.com/ProjectName/MyService.svc?xsd=xsd0" namespace="http://tempuri.org/" />
<xsd:import schemaLocation="https://server1.subdomain.domain.com/ProjectName/MyService.svc?xsd=xsd2" namespace="http://schemas.datacontract.org/2004/07/ProjectName" />
<xsd:import schemaLocation="https://server1.subdomain.domain.com/ProjectName/MyService.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/" />
If I try accessing the schema specified in the xml
I get "Page cannot be displayed" error, and if I use Network tab in Chrome debug tools, it shows the call has been aborted. But if I try accessing the schema at
Then I can get to it without a problem but, unfortunately this is not the one used by the service.
To change that I added httpsGetURL in my config file:
<serviceMetadata httpGetEnabled="true" httpsGetUrl="https://alias.sys.domain.com/ProjectName/MyService.svc" />
that caused error: "A registration already exists for URI"
which I was able to get rid of by adding "/mex" after ".svc". The strange thing is that I do not have mex endpoint since I cannot use it due to disabled anonymous authentication.
But adding "/mex" caused another error "The message with To 'https://alias.sys.domain.com/ProjectName/MyService.svc/mex?wsdl'
cannot be processed at the receiver, due to an AddressFilter mismatch at the EndpointDispatcher.
Check that the sender and receiver's EndpointAddresses agree."
So then I added address to my endpoint, changing it from
<endpoint address="" binding="webHttpBinding" bindingConfiguration="webBinding" contract="Projectname.IMyService"/>
<endpoint address="web1" binding="webHttpBinding" bindingConfiguration="webBinding" contract="Projectname.IMyService"/>
and tried using
that changed my error to
The message with Action '' cannot be processed at the receiver, due to a ContractFilter
mismatch at the EndpointDispatcher. This may be because of either a contract mismatch
(mismatched Actions between sender and receiver) or a binding/security mismatch between
the sender and the receiver. Check that sender and receiver have the same contract and
the same binding (including security requirements, e.g. Message, Transport, None)
Can anyone help?