So we have to change the addressing of the Silverlight web service from localhost to zignals.com and we have to run the web service from the IIS rather than the temporary web server it would normally run from when you run the project on the development machine. These changes have led to us seeing a lot of errors involving:
1) Endpoints mismatches
2) Cross domain security
3) IIS configuration issues
4) References not updating
We haven’t solved all the above consistently, but through a lot of trial and error we have got our projects deployed online. The things to look out for:
1) Register .xap files as MIME types in IIS
2) Modify the projects to all use the IIS server on the developer machines instead of the default web server
3) Put the WCF service on the deployment server, and then modify the web reference in Silverlight to point to the deployment server instead of localhost, then add the Silverlight project to the deployment server
4) Modify the hosts file on the deployment server to point your domain name to 127.0.0.1 so you can use the project on the server as well as remotely
5) Use clientaccesspolicy.xml to avoid cross domain issues
6) When re-referencing to a new web service, you should do a search through all files in the project for the original reference (e.g. “localhost”). We had a problem where some .config files didn’t auto-update and we had to manually change this reference.
Needless to say, we aren’t the only ones facing deployment problems with 2.0 beta, so here are some links to others solutions:
http://weblogs.asp.net/tolgakoseoglu/archive/2008/03/18/silverlight-2-0-and-wcf.aspx
http://silverlight.net/forums/p/10852/34477.aspx
http://archdipesh.blogspot.com/2008/02/how-do-i-deployhost-wcf-service-on.html
Scott Tattersall is lead developer of stock alerts, stock charts, and market sentiment for Zignals
0 comments:
Post a Comment