Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP General (http://www.velocityreviews.com/forums/f65-asp-general.html)
-   -   HTTP.Open - Permission Denied error (http://www.velocityreviews.com/forums/t801071-http-open-permission-denied-error.html)

fniles 04-10-2006 03:59 PM

HTTP.Open - Permission Denied error
 
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.






Anthony Jones 04-11-2006 11:35 AM

Re: HTTP.Open - Permission Denied error
 

"fniles" <fniles@pfmail.com> wrote in message
news:uwrZHfLXGHA.4920@TK2MSFTNGP02.phx.gbl...
> 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 04-11-2006 02:23 PM

Re: HTTP.Open - Permission Denied error
 
> 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" <Ant@yadayadayada.com> wrote in message
news:eFdtLwVXGHA.5024@TK2MSFTNGP04.phx.gbl...
>
> "fniles" <fniles@pfmail.com> wrote in message
> news:uwrZHfLXGHA.4920@TK2MSFTNGP02.phx.gbl...
>> 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 04-11-2006 04:12 PM

Re: HTTP.Open - Permission Denied error
 

"fniles" <fniles@pfmail.com> wrote in message
news:%23UiReOXXGHA.1564@TK2MSFTNGP03.phx.gbl...
> > 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" <Ant@yadayadayada.com> wrote in message
> news:eFdtLwVXGHA.5024@TK2MSFTNGP04.phx.gbl...
> >
> > "fniles" <fniles@pfmail.com> wrote in message
> > news:uwrZHfLXGHA.4920@TK2MSFTNGP02.phx.gbl...
> >> 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.
> >
> >
> >

>
>





All times are GMT. The time now is 08:44 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57