How to host silverlight on S3
I'm trying to host the xap file of my silverlight application on s3.
I'm using RIA services and a wcf service, which are hosted on my side.
So far I haven't been able to get this to work开发者_StackOverflow, as the loading animation will play but then the application itself won't load.
What kind of configuration do I need to make this work?
Since that would be a cross-domain call you need a crossdomain.xml on your WCF service. Have you looked at the traffic in Fiddler to see what response you are getting from the server?
Another thing you might run into is that the correct mime types might not be registered on the S3 server. Look here how to fix that.
At the end of the day this wound up being a combination of things:
Both previous answers by @Andy May and @Erno were correct. The mime type needed to be application/x-silverlight-app and the proper crossdomain.xml file had to be present.
Also, the DomainContext for all of my RIA classes had to specify the URI, as by default the pointed to the xap file's host, which was s3.
After these changes were made everything seemed to work just fine.
精彩评论