I'm hoping somebody can put me out of my misery, as I can't figure out what I have done wrong with a very simple wcf service - basically just a default "hello world" after having the same problem with my main wcf service. I have read the other posts on this message, and thought I had set both the baseAddressPrefixFilters and the security mode correctly, but I must have misunderstood something along the way as I keep getting the message below and its driving me nuts: I'm not sure if this is relevant, but calling the service through the ..async() method. The relevant bits, probably, from my web.config - I didn't know what to put in the identity>dns in place of localhost... Any help/guidance would be appreciated.... Code: <system.serviceModel> <serviceHostingEnvironment aspNetCompatibilityEnabled="true"> <baseAddressPrefixFilters> <add prefix="http://paflonlinec.eweb103.discountasp.net/WebSite2/" /> </baseAddressPrefixFilters> </serviceHostingEnvironment> <bindings> <wsHttpBinding> <binding name="WSHttpBinding_IService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false"> <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" /> <security mode="None"> <transport clientCredentialType="None" /> <message clientCredentialType="None" algorithmSuite="Default" /> </security> </binding> </wsHttpBinding> </bindings> <client> <endpoint address="http://paflonlinec.eweb103.discountasp.net/WebSite2/Service.svc" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IService" contract="ServiceReference1.IService" name="WSHttpBinding_IService"> </endpoint> </client> <behaviors> <serviceBehaviors> <behavior name="ServiceBehavior"> <serviceMetadata httpGetEnabled="true" /> <serviceDebug includeExceptionDetailInFaults="true" /> </behavior> </serviceBehaviors> </behaviors> <services> <service behaviorConfiguration="ServiceBehavior" name="Service"> <endpoint address="" binding="wsHttpBinding" contract="IService"> <identity> <dns value="paflonlinec.eweb103.discountasp.net" /> </identity> </endpoint> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> </service> </services> </system.serviceModel>
Amazing what a good nights sleep can do. I removed the aspNetCompatibilityEnabled flag and the test case worked fine.