Errors getting a web page - An unhandled exception of type 'System.Net.WebException'

A

Anonymous

What can cause this error from the following code?

An unhandled exception of type 'System.Net.WebException' occurred in
system.dll

Additional information: The underlying connection was closed: Unable to
connect to the remote server.


CODE:

'Create a new WebRequest object, which can only be done through
'the static Create method of the WebRequest class
Dim wrGETURL As WebRequest
wrGETURL = WebRequest.Create("http://127.0.0.1/")

'use whatever settings have been configured in Internet Explorer
wrGETURL.Proxy = WebProxy.GetDefaultProxy

'use it to obtain a Stream object corresponding to the
'response to your request.
Dim objStream As Stream
objStream = wrGETURL.GetResponse.GetResponseStream



This works on one machine and not the other. I've uninstalled VS2003 and
re-installed and no luck. It has to be a configuration on the machine
itself right?
 
C

Cor Ligthert

This works on one machine and not the other. I've uninstalled VS2003 and
re-installed and no luck. It has to be a configuration on the machine
itself right?

And both have a webserver installed?

Cor
 
A

Anonymous

Thanks for getting me looking in the right place Cor - I couldn't even
serve a web page which got me looking hard into the network settings.

I am so happy - it was ZoneAlarm. I uninstalled and everything is fine now.

I didn't know it because I wasn't even running it - I has it NOT running on
startup so I thought it was totally off, but it must still do something
with the network stack or something. Anyway it all works now!

Thanks
 
A

Anonymous

Thanks for getting me looking in the right place Cor - I couldn't even
serve a web page which got me looking hard into the network settings.

I am so happy - it was ZoneAlarm. I uninstalled and everything is fine
now.

I didn't know it because I wasn't even running it - I has it NOT
running on startup so I thought it was totally off, but it must still
do something with the network stack or something. Anyway it all works
now!

Thanks
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top