silverlight WCF crossdomain/clientaccesspolicy policy
I am having problem with the WCF + Silverlight application when querying database.
An exception occurred during the operation, making th开发者_如何学Goe result invalid. Check InnerException for exception details.
at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary() at AWShop.EmployeeServiceProxy.GetEmployeesCompletedEventArgs.get_Result() at AWShop.Services.EmployeeDataService.b__0(Object s, GetEmployeesCompletedEventArgs ea) at AWShop.EmployeeServiceProxy.EmployeeServiceClient.OnGetEmployeesCompleted(Object state)
I have my project structure as follows:
MainSolution - SilverlightApplication (Service reference to WCF is added here and its hosted in IIS 7.5) - DAL (LINQ2SQL) - WCF - Web (hosting silverlight app) (Hosted in IIS 7.5)
I have following clientaccesspolicy setup in my solution (root of web project and I tried at adding to every other project as well but no luck)
I also have tried using crossdomain.xml but still does not work.
The webservice itself http://localhost/AWShop.WCF/EmployeeService.svc works fine.
Any help is much appreciated its bit frustrating to hanged on to this problem.
Many thanks, Preyash
You may need to deploy clientaccesspolicy.xml at the root of the web server
精彩评论