Although I'm not sure if this will fix your problem, I will show you how I managed to install a similar solution layout and maybe the steps will have some recommendations.
I installed the solution with a silverlight project (domainexception), a web project (domainexception.Web) and a wcf service (WcfServiceLibrary1). I made the Service1 endpoint the base HttpBinding, as in your App.config.
Then I added the service link to the silverlight project and built it with the following address:
" http: // localhost: 8731 / Design_Time_Addresses / WcfServiceLibrary1 / Service1 / "
Trying to run it like this, I also ran into a cross-domain policy issue.
Then I added the webHttpBinding and method to it and still found that it was not working.
So finally, I changed the base address from one above to
http: // localhost: 8731
and he worked.
In the end it worked. So that's how it was at the end.
App.config
<system.serviceModel> <services> <service name="WcfServiceLibrary1.Service1" behaviorConfiguration="WcfServiceLibrary1.Service1Behavior"> <host> <baseAddresses> <add baseAddress = "http://localhost:8731/" /> </baseAddresses> </host> <endpoint address ="Service" binding="basicHttpBinding" contract="WcfServiceLibrary1.IService1"> <identity> <dns value="localhost"/> </identity> </endpoint> <endpoint address="" binding="webHttpBinding" behaviorConfiguration="policyBehavior" contract="WcfServiceLibrary1.IService1"/> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/> </service> </services> <behaviors> <endpointBehaviors> <behavior name="policyBehavior"> <webHttp /> </behavior> </endpointBehaviors> <serviceBehaviors> <behavior name="WcfServiceLibrary1.Service1Behavior"> <serviceMetadata httpGetEnabled="True"/> <serviceDebug includeExceptionDetailInFaults="False" /> </behavior> </serviceBehaviors> </behaviors>
ServiceReferences.ClientConfig
<configuration> <system.serviceModel> <bindings> <basicHttpBinding> <binding name="BasicHttpBinding_IService1" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"> <security mode="None" /> </binding> </basicHttpBinding> </bindings> <client> <endpoint address="http://localhost:8731/Service" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService1" contract="ServiceReference1.IService1" name="BasicHttpBinding_IService1" /> </client> </system.serviceModel>
and my web policy call:
Interface
[OperationContract, WebGet(UriTemplate="clientaccesspolicy.xml")] Stream ReturnPolicy();
the code
public System.IO.Stream ReturnPolicy() { string file = @"<?xml version=""1.0"" encoding=""utf-8""?> <access-policy> <cross-domain-access> <policy> <allow-from http-request-headers=""*""> <domain uri=""*""/> </allow-from> <grant-to> <resource path=""/"" include-subpaths=""true""/> </grant-to> </policy> </cross-domain-access> </access-policy>"; return new MemoryStream(Encoding.UTF8.GetBytes(file)); }