Adrian A.
Adrian A.

Reputation: 172

Silverlight trying to access local crossdomainpolicy.xml

I have a Silverlight app that I developed locally, and I'm trying to run it on a Windows 2008 R2 server that I personally setup. Everything smooth and dandy, except that when I try to auth on the app, it tries to look locally for

http://localhost/crossdomainpolicy.xml
http://localhost/clientaccesspolicy.xml

It also throws a nasty error :

Uncaught Error: Unhandled Error in Silverlight Application An exception occurred during the operation, making the result invalid. Check InnerException for exception details. at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary() at SomeService.MVServiceReference.CheckUserCompletedEventArgs.get_Result() at SomeService.Pagini.Autentificare.AuthForm.webServiceSoapClient_CheckUserCompleted(Object sender, CheckUserCompletedEventArgs e) at SomeService.MVServiceReference.MVWebServiceSoapClient.OnCheckUserCompleted(Object state)

Upvotes: 1

Views: 408

Answers (2)

Johan Buret
Johan Buret

Reputation: 2634

For crossdomain purposes, http://localhost/ , http://localhost:1234/ and http://localhost:4321/ are all different domains.

Upvotes: 1

Anders Abel
Anders Abel

Reputation: 69260

If your XAP file is on http://localhost/somewhere/somefile.xap it shouldn't look for a clientaccesspolicy. Are you using the ASP.NET dev. server to host the Silverlight app while you are using IIS for a WCF service that is called by the silverlight app?

Silverlight's inability to present exception details is well known. It is due to the fact that all communication from a Silverlight component to a service utilizes the hosting browser and when there is an error returned with a http error code, the browser only returns the error code and not the message containing the exception details to silverlight.

Activate WCF trace logging on the server side and look in the svc-log to get the real exception message.

Upvotes: 1

Related Questions