I am attempting to create a WCF service with anonymous authentication. When I deploy the service to the destination server that is not on my current domain I receive the following error when attempting to call it:
Content Type application/soap+xml; charset=utf-8 was not supported by the service http://myserver.com/page.svc. The client and service bindings may be mismatched.
as it stands now I have the following section in my web.config file for the service:
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
</modules>
</system.webServer>
I have been trying various bindings (wsHttpBinding and basicHttpBinding) but I either receive the error above (using basicHttpBinding) or an "Access is Denied" message (using wsHttpBinding). Here is the web.config section I tried to use when using wsHttpBinding
<system.serviceModel>
<services>
<service behaviorConfiguration="AMP.MainBehavior" name="AMP.Main">
<endpoint address="" binding="wsHttpBinding" contract="AMP.IMain">
<identity>
<dns value="myservice.com"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="AMP.MainBehavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
The service has been created with the .NET 4.0 framework. I need it to be anonymous but I'm not sure what I'm missing. I'm new to WCF so I don't have all my ducks in a row yet.
Thank you,