HTTP.Open - Permission Denied error

Discussion in 'ASP General' started by fniles, Apr 10, 2006.

  1. fniles

    fniles Guest

    In our ASP page, we call XMLHttp to download XML files. When calling our
    page using localhost (localhost/myWebSite/myPage.htm), it works, but when
    calling using the IP address of the web server
    (xx.x.x.xxx/myWebSite/myPage.htm), I got "Permission denied" error in the
    HTTP.Open statement.

    Set http = CreateObject("Microsoft.XmlHttp")
    http.open "Get", "http://" & "xx.x.x.xxx" & "/XMLFiles/N-1min.xml",
    ALSE --> permission denied error

    Why do I get permission denied error on the HTTP.Open, and how to fix it ?

    Thanks.
     
    fniles, Apr 10, 2006
    #1
    1. Advertising

  2. "fniles" <> wrote in message
    news:...
    > In our ASP page, we call XMLHttp to download XML files. When calling our
    > page using localhost (localhost/myWebSite/myPage.htm), it works, but when
    > calling using the IP address of the web server
    > (xx.x.x.xxx/myWebSite/myPage.htm), I got "Permission denied" error in the
    > HTTP.Open statement.
    >
    > Set http = CreateObject("Microsoft.XmlHttp")
    > http.open "Get", "http://" & "xx.x.x.xxx" & "/XMLFiles/N-1min.xml",
    > ALSE --> permission denied error
    >
    > Why do I get permission denied error on the HTTP.Open, and how to fix it ?
    >
    > Thanks.
    >


    Is the web server IIS?
    Does it have more than one web site?
    Are host headers set on the site you are accessing?
    Does the site have anonymous access enabled?
    Why do you want to hard code an IP address into your web page anyway?
    Is the ASP Page running on the same server that you are trying to fetch
    from?

    BTW on a server you should use MSXML3.ServerXMLHTTP.3.0, XMLHttp is not
    thread safe and should not be used with in ASP or COM+.

    Anthony.
     
    Anthony Jones, Apr 11, 2006
    #2
    1. Advertising

  3. fniles

    fniles Guest

    > Is the web server IIS?
    yes
    > Does it have more than one web site?

    yes
    > Are host headers set on the site you are accessing?

    What did you mean by this ?
    > Does the site have anonymous access enabled?

    yes
    > Why do you want to hard code an IP address into your web page anyway?

    Did you mean to use the web server name instead of the IP address ?

    > Is the ASP Page running on the same server that you are trying to fetch
    > from?

    The ASP page is on a different machine than the XML file


    "Anthony Jones" <> wrote in message
    news:...
    >
    > "fniles" <> wrote in message
    > news:...
    >> In our ASP page, we call XMLHttp to download XML files. When calling our
    >> page using localhost (localhost/myWebSite/myPage.htm), it works, but when
    >> calling using the IP address of the web server
    >> (xx.x.x.xxx/myWebSite/myPage.htm), I got "Permission denied" error in the
    >> HTTP.Open statement.
    >>
    >> Set http = CreateObject("Microsoft.XmlHttp")
    >> http.open "Get", "http://" & "xx.x.x.xxx" & "/XMLFiles/N-1min.xml",
    >> ALSE --> permission denied error
    >>
    >> Why do I get permission denied error on the HTTP.Open, and how to fix it
    >> ?
    >>
    >> Thanks.
    >>

    >
    > Is the web server IIS?
    > Does it have more than one web site?
    > Are host headers set on the site you are accessing?
    > Does the site have anonymous access enabled?
    > Why do you want to hard code an IP address into your web page anyway?
    > Is the ASP Page running on the same server that you are trying to fetch
    > from?
    >
    > BTW on a server you should use MSXML3.ServerXMLHTTP.3.0, XMLHttp is not
    > thread safe and should not be used with in ASP or COM+.
    >
    > Anthony.
    >
    >
    >
     
    fniles, Apr 11, 2006
    #3
  4. "fniles" <> wrote in message
    news:%...
    > > Is the web server IIS?

    > yes
    > > Does it have more than one web site?

    > yes
    > > Are host headers set on the site you are accessing?

    > What did you mean by this ?


    There are a few different ways that IIS can route requests to the
    appropriate web site.

    By default there is only one web site which will be listening on port 80 and
    can be accessed via any IP address that addresses the server.

    When you add a new website you can specify for example that the site is for
    one of the IP addresses that the server has. The default web site will stop
    responding to that address.

    Another more common way is to specify a host header for the site. If you
    have DNS entries Site1 and Site2 both pointing to the same server you can
    specify which site responds depending on which name was used in the URL to
    access the server.

    So if you have a site that has the host header 'localhost' and a default web
    site then using a straight IP address is likely to route to the default web
    site than when you use localhost in the URL.

    > > Does the site have anonymous access enabled?

    > yes
    > > Why do you want to hard code an IP address into your web page anyway?

    > Did you mean to use the web server name instead of the IP address ?


    Yes that would seem to more sensible.

    >
    > > Is the ASP Page running on the same server that you are trying to fetch
    > > from?

    > The ASP page is on a different machine than the XML file
    >


    When you use localhost then it will be accessing your local machine not the
    remote site.

    >
    > "Anthony Jones" <> wrote in message
    > news:...
    > >
    > > "fniles" <> wrote in message
    > > news:...
    > >> In our ASP page, we call XMLHttp to download XML files. When calling

    our
    > >> page using localhost (localhost/myWebSite/myPage.htm), it works, but

    when
    > >> calling using the IP address of the web server
    > >> (xx.x.x.xxx/myWebSite/myPage.htm), I got "Permission denied" error in

    the
    > >> HTTP.Open statement.
    > >>
    > >> Set http = CreateObject("Microsoft.XmlHttp")
    > >> http.open "Get", "http://" & "xx.x.x.xxx" & "/XMLFiles/N-1min.xml",
    > >> ALSE --> permission denied error
    > >>
    > >> Why do I get permission denied error on the HTTP.Open, and how to fix

    it
    > >> ?
    > >>
    > >> Thanks.
    > >>

    > >
    > > Is the web server IIS?
    > > Does it have more than one web site?
    > > Are host headers set on the site you are accessing?
    > > Does the site have anonymous access enabled?
    > > Why do you want to hard code an IP address into your web page anyway?
    > > Is the ASP Page running on the same server that you are trying to fetch
    > > from?
    > >
    > > BTW on a server you should use MSXML3.ServerXMLHTTP.3.0, XMLHttp is not
    > > thread safe and should not be used with in ASP or COM+.
    > >
    > > Anthony.
    > >
    > >
    > >

    >
    >
     
    Anthony Jones, Apr 11, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kevin Spencer
    Replies:
    3
    Views:
    3,035
    Kevin Spencer
    Aug 15, 2003
  2. gmax2006
    Replies:
    3
    Views:
    17,302
    Damjan
    Aug 9, 2006
  3. Bill Scherer
    Replies:
    0
    Views:
    2,102
    Bill Scherer
    Jul 20, 2006
  4. Bob Smith
    Replies:
    3
    Views:
    368
    Bob Smith
    Dec 24, 2008
  5. bleen
    Replies:
    0
    Views:
    124
    bleen
    Aug 1, 2007
Loading...

Share This Page