Silverlight application fails to access clientaccesspolicy.xml and crossdomain.xml with with Http-error 401
We tried to consume our own webservice from within a Silverlight application and we always got this error:
An error occurred while trying to make a request to URI 'http://blablabla:7777/blabla.svc'. 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.
After searching the internet we were very very frustrated...nothing seemed to work, but finally we got the solution from a site, which was tranlated from by a very famous Site to English :-))). According to this information, we had to go to the IIS, open our Site, then select Authentification ->开发者_Python百科 select Anonymous Authentification -> in the right upper corner select edit... -> and ENSURE THAT THE IDENTITY OF THE ANONYMOUS USER is set to: Identity of the applicationpool (hope this is the correct translation from German to English - it should be the second radiobutton.).
I hope this will help somebody out there!
Thanks for reading! Harry
For us this was the solution - a lot of sites in the internet tell you to take care that you have your clientacccesspolicy.xml and crossdomain.xml file in your root directory and we thought we did something wrong, but we did not. Maybe you try this solution if you run into the same problem.
精彩评论