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

Posted on 2011-05-10
Last Modified: 2012-05-11
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: 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

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!!
Question by:vikrantambhore
    1 Comment
    LVL 9

    Accepted 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 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

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
    The task of choosing a web design company to build a website for your business should never be taken in a light manner. Provided the fact that your website will act as a representative to your business and will be responsible for imposing an online …
    The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
    The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now