policy issue
-
hi guys i am hosting my wcf service in IIS5 ,but it gives me an error like An error occurred while trying to make a request to URI 'http://tauseef-pc/wcfhost/Service.svc'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. This error may also be caused by using internal types in the web service proxy without using the InternalsVisibleToAttribute attribute. Please see the inner exception for more details. my wcf service is hosted on iis in a seperate asp.net project and my policy file is <?xml version="1.0" encoding="utf-8" ?> <access-policy> <cross-domain-access> <policy> <allow-from http-request-headers= "*"> <domain uri="*" /> </allow-from> <grant-to> <resource path="/" include-subpaths="true"/> </grant-to> </policy> </cross-domain-access> </access-policy> any help please ...................
Tauseef A Khan MCP Dotnet framework 2.0.
-
hi guys i am hosting my wcf service in IIS5 ,but it gives me an error like An error occurred while trying to make a request to URI 'http://tauseef-pc/wcfhost/Service.svc'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. This error may also be caused by using internal types in the web service proxy without using the InternalsVisibleToAttribute attribute. Please see the inner exception for more details. my wcf service is hosted on iis in a seperate asp.net project and my policy file is <?xml version="1.0" encoding="utf-8" ?> <access-policy> <cross-domain-access> <policy> <allow-from http-request-headers= "*"> <domain uri="*" /> </allow-from> <grant-to> <resource path="/" include-subpaths="true"/> </grant-to> </policy> </cross-domain-access> </access-policy> any help please ...................
Tauseef A Khan MCP Dotnet framework 2.0.
Make sure the policy file is named "clientaccesspolicy.xml". Make sure the file is located in the folder of the domain's root (the physical folder "http://tauseef-pc" maps to). What happens when you navigate to http://tauseef-pc/wcfhost/Service.svc in a browser?
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
Make sure the policy file is named "clientaccesspolicy.xml". Make sure the file is located in the folder of the domain's root (the physical folder "http://tauseef-pc" maps to). What happens when you navigate to http://tauseef-pc/wcfhost/Service.svc in a browser?
Mark Salsbery Microsoft MVP - Visual C++ :java:
oh i got it, actually i put it on the root of application so it was getting error . now when i have changed its location to domain root i am getting another error while debugging it. "The remote server returned an error: NotFound." any help please........
Tauseef A Khan MCP Dotnet framework 2.0.
-
oh i got it, actually i put it on the root of application so it was getting error . now when i have changed its location to domain root i am getting another error while debugging it. "The remote server returned an error: NotFound." any help please........
Tauseef A Khan MCP Dotnet framework 2.0.
I would first try to navigate to http://tauseef-pc/wcfhost/Service.svc in a browser. If that doesn't work - what's in the web application's web.config file? If it does work, then maybe just the client side service reference configuration needs adjusting.
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
I would first try to navigate to http://tauseef-pc/wcfhost/Service.svc in a browser. If that doesn't work - what's in the web application's web.config file? If it does work, then maybe just the client side service reference configuration needs adjusting.
Mark Salsbery Microsoft MVP - Visual C++ :java:
ok , things are working now, but with a little change, the problem is in my method which returns array of type Employee, i came to know i tested it with another method which just returns a string and its working and the same error still there upon the call of GetEmployeeDataMethod() which returns an array of type employee. any help please ? public Silverlight_UI.Service.Employee[] EndGetData(System.IAsyncResult result) { object[] _args = new object[0]; //error on this line Silverlight_UI.Service.Employee[] _result = ((Silverlight_UI.Service.Employee[])(base.EndInvoke("GetData", _args, result))); return _result; } //my service code public Employee[] GetData() { using (AdventureWorksDataContext dataContext = new AdventureWorksDataContext()) { DataLoadOptions dlo = new DataLoadOptions(); dlo.LoadWith(m => m.EmployeeAddresses); dlo.LoadWith(m => m.Contact); dlo.LoadWith(m => m.Address); dataContext.LoadOptions = dlo; var list = from emp in dataContext.Employees select emp; return list.Take(10).ToArray(); } } it just give me error when i call any method which calls my locadatabase ,i have created a user for apnet , but i dont know what to do? regards.
Tauseef A Khan MCP Dotnet framework 2.0.
-
I would first try to navigate to http://tauseef-pc/wcfhost/Service.svc in a browser. If that doesn't work - what's in the web application's web.config file? If it does work, then maybe just the client side service reference configuration needs adjusting.
Mark Salsbery Microsoft MVP - Visual C++ :java:
okh, i got it but still thanks. actually i debug it through flidder and got that there was user permission issue about aspnet user. i chnaged this user to public and dopwner and now its working. can you please explain a bit about ?
Tauseef A Khan MCP Dotnet framework 2.0.
-
okh, i got it but still thanks. actually i debug it through flidder and got that there was user permission issue about aspnet user. i chnaged this user to public and dopwner and now its working. can you please explain a bit about ?
Tauseef A Khan MCP Dotnet framework 2.0.
Tauseef A wrote:
can you please explain a bit about ?
Every process runs as a user identity - that's how the OS knows what rights/priviliges a process has. If your database is using Windows authentication then it is using the user identity of the process calling it. That identity, therefore, needs the correct permissions for any database tasks it intends to perform.
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
Tauseef A wrote:
can you please explain a bit about ?
Every process runs as a user identity - that's how the OS knows what rights/priviliges a process has. If your database is using Windows authentication then it is using the user identity of the process calling it. That identity, therefore, needs the correct permissions for any database tasks it intends to perform.
Mark Salsbery Microsoft MVP - Visual C++ :java: