我目前正試圖找到一種好的方式來調用WCF服務,這樣可以讓服務器上的線程知道客戶端文化。花了幾天在網上閱讀主題後,我認爲最好的方法是將(string clientCulture)添加到WCF方法的參數列表中;不再:Silverlight - 你如何將調用本地化到WCF服務?
string HelloWorld();
但:
串的HelloWorld(串clientCulture);
我希望我錯了...我歡迎任何建議,告訴我如何更好地做到這一點。理想情況下,我將能夠做到以下幾點:
WcfService srv = new WcfService(); srv.Endpoint.Address = new System.ServiceModel.EndpointAddress( ConfigConstants.ROOT + "Services/WcfService.svc"); // influence address as you are influencing address srv.Culture = new System.Globalization.CultureInfo("fr-FR"); // and every call to server from now on would pass that // culture parameter either in header or body of SOAP message to server
在此先感謝您對此主題的任何幫助!
聽起來不錯......現在知道怎樣使用Silverlight實現它? – kape123 2010-02-28 19:54:45