1

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)

Adrian A.
  • 172
  • 1
  • 11

2 Answers2

1

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.

Anders Abel
  • 67,989
  • 17
  • 150
  • 217
  • Everything was developed locally then pushed to a ASP.NET IIS dev server. So everything would have needed to work online. – Adrian A. May 31 '11 at 11:03
  • @Adrian: Did you update ServiceReferences.clientconfig when you deployed the XAP file? Otherwise it still points to the development environment address. – Anders Abel May 31 '11 at 12:41
  • @Andres - yes, but it started giving errors about multiple bindings – Adrian A. May 31 '11 at 21:13
  • @Adrian: Please post your updated .clientconfig in the question, that should help us solve the problem. Please also post the URL of the deployed service and the URL of the deployed XAP. – Anders Abel Jun 01 '11 at 10:25
1

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

Johan Buret
  • 2,614
  • 24
  • 32