Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 578
  • Last Modified:

“Access is Denied” error when accessing ASP.NET SOAP web service from SoapClient.js !!!

Hello All,

 I have added a .asmx file to my project and **am deploying the ASP.NET website with the .asmx file to:
I am using SoapClient.js to get the data (it is available from: http://javascriptsoapclient.codeplex.com/) Now when on a page in the website, (in the same project), I **try to access the webservice, I get the error: "Access is Denied" from the line of code in SoapClient.js which retreives the WSDL file
Now from what i read and understand, it could be due to XSS, but I added my "localhost" (for testing) as well as the web location to my Trusted Sites in IE.

Also, in my SoapWebservice the namespace is set to http://xx.xxx.xx.xxx:8888/.

Please help me as to how can I resolve the error??

Also, when I hit the following URL in my browser, I can see the WSDL of my service!! http://xx.xxx.xx.xxx:8888/WebTest/SampleWebService.asmx?wsdl
1 Solution
As a security issue, in modern browsers like ff 3+, chrome or ie8+ it is not allowed to reach other domains via javascript. I don't know if your http://xx.xxx.xx.xxx:8888/ IPs are all the same but if they are not, you are likely to get this error.

if your site is localhost, then your service you call with js should be on localhost and should be called that way (not with IP or any other method)

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now