CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2008
    Location
    Tel Aviv, Berlin, L.A.
    Posts
    23

    uncaught exception: Access to restricted URI denied (NS_ERROR_DOM_BAD_URI)

    Hi there,

    I am first and foremost used to C code, stuff that has to be compiled prior to its usage. Now, confronted with that "asynchronous javascript and xml" (as I learned this name is abbreviated for), I am running into that problem:

    uncaught exception: Access to restricted URI denied (NS_ERROR_DOM_BAD_URI)
    (showing up after XMLHttpRequest() is properly initialized, on invocation of its open()-method)

    Thanks to FireBug, I FOUND this error. I have serious doubts that otherwise I could have catch it. The "restricted URI" is "everything" - no matter whether I've put the destination to a root folder or SOMEwhere, this exception sustains.

    Any AJAX guru(s) who feel they can help me out?

    Thanks in advance.
    ariell
    programming is understanding

  2. #2
    Join Date
    Oct 2008
    Location
    Tel Aviv, Berlin, L.A.
    Posts
    23

    Re: uncaught exception: Access to restricted URI denied (NS_ERROR_DOM_BAD_URI)

    Done. I've found a solution. One more evidence that AJAX is not a "system" but just an idiom.
    And thanks for the tons of help!
    ariell
    programming is understanding

  3. #3
    Join Date
    Oct 2008
    Posts
    1

    Re: uncaught exception: Access to restricted URI denied (NS_ERROR_DOM_BAD_URI)

    hi, I'm having the same problem, can you plz explain how you fix it?', what the problem might be??, what's the solution??.

    thx in advnace
    Daniel

  4. #4
    Join Date
    Oct 2008
    Location
    Tel Aviv, Berlin, L.A.
    Posts
    23

    Re: uncaught exception: Access to restricted URI denied (NS_ERROR_DOM_BAD_URI)

    What EXACTLY is your problem?

    In MY case, it was something like "request.open("GET",url,true)" whereas url was (out of the sudden) considered "restricted".

    Let me know.
    ariell
    programming is understanding

  5. #5
    Join Date
    Nov 2008
    Posts
    1

    Re: uncaught exception: Access to restricted URI denied (NS_ERROR_DOM_BAD_URI)

    i found out that:

    this don't work!
    request.open("GET", "http://www.thedomainname.com/resp.php?wohin=" + wohin, false);

    this works:
    request.open("GET", "http://thedomainname.com/resp.php?wohin=" + wohin, false);
    (without "www")

  6. #6
    Join Date
    Feb 2009
    Posts
    1

    Re: uncaught exception: Access to restricted URI denied (NS_ERROR_DOM_BAD_URI)

    i am having the same problem when page is onpen in HTTPS. but removing www does not work for me is there any other soloutin??

  7. #7
    Join Date
    May 2002
    Posts
    10,943

    Re: uncaught exception: Access to restricted URI denied (NS_ERROR_DOM_BAD_URI)

    Quote Originally Posted by antranidox
    i found out that:

    this don't work!
    request.open("GET", "http://www.thedomainname.com/resp.php?wohin=" + wohin, false);

    this works:
    request.open("GET", "http://thedomainname.com/resp.php?wohin=" + wohin, false);
    (without "www")
    That is because cross-domain references are not allowed. You probably had accessed the site without the www, so it would have to be without the www in the AJAX request as well.

    Quote Originally Posted by farazilu
    i am having the same problem when page is onpen in HTTPS. but removing www does not work for me is there any other soloutin??]
    Are you attempting to access a different domain than the one you to which you are already connected? As already mentioned, AJAX does not allow cross-domain references.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured