开发者

Silverlight client consuming WCF services - config issue in Production environment

开发者 https://www.devze.com 2023-02-15 08:50 出处:网络
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 w

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.)

0

精彩评论

暂无评论...
验证码 换一张
取 消