We have built a silverlight client consuming a WCF service. it works absolutely perfect on our local dev boxes since both the projects WCF service + Silverlight Host App are running on Localhost and work fine.
However, in Production environment, silverlight开发者_开发百科 client is hosted in a different Website and the WCF service is now hosted in a different site within the same IIS. The silverlight app is not able to invoke the service at all and after configuring WCF diagnostics on the service, we found that the service is not called at all. It seems that somehow, the endpoint (production environment) for WCF service needs to be updated in the silverlight but there does not seems to be a clear way of updating the end point in Silverlight.
Any ideas ?
The Silverlight-side service client is generated with several constructors: one of them takes a Uri
parameter. Use that constructor, passing in the Uri
that's appropriate for the production environment. (The default constructor, which you're probably using now, is hard-coded to use the uri of the service when it was added during development.)
精彩评论