I am getting the following exception message when I try to run my newly created Silverlight app:
- An error occurred while trying to make a request to URI 'http://localhost:8732/Design_Time_Addresses/IsAProgrammer.Service/Service1/'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. This error may also be caused by using internal types in the web service proxy without using the InternalsVisibleToAttribute attribute. Please see the inner exception for more details.
This is what I have done. I started with a silverlight app. That created 2 projects. My actual silverlight app and one called MySolutionName.web (not sure what that does except host my silverlight page).
I then made a WCF project so I could have some services for my Silverlight app to consume. I made my services and then added a Service Reference to the silverlight project. I then changed the binding to be basicHttpBinding
for my services. (I subsequently refreshed my Service Resource reference in the Silverlight app.)
I reading about this error, I have found that I need a clientaccesspolicy.xml
and a CrossDomain.xml
file to fix it. I found a generic copy of each of these and added them to both my MySolutionName.Web project and my WCF project.
Any other ideas would be great.