Inet Control Alternative in vb.net...Ist it Possible?

R

Rick

Hi,

I haven't been able to find a solution anywhere yet. I have a Vb6
application that has to be rewritten as a vb.net app and
in the old application the inet control was set as:

inet.Protocol = icHTTP
inet.OpenUrl(http://user:[email protected]/Login) format was used.

I have to take this exact same concept and accomplish it in vb.net. Has
anyone been able to do this?

I've tried doing it through a WebRequest like below:

Dim objRequest as WebRequest = objRequest.Create(www.somesite.com/Login)
objRequest.Credentials = New NetworkCredential("user", "password")

Dim objResponse as WebResponse = objResponse.GetResponse

I get an error when I get to the GetResponse Line and I was wondering if
anyone ran into the same issues
or knows of a way around this. I would appreciate any help I could get.

Thanks,
Rick
 
J

Joe White

"I get an error" is not very helpful. Is it a compile-time or a runtime
error? If runtime, what exception class? What's the error message?
 
R

Rick Cameron

Sorry Joe.

Before I added the Network Credentials lines of codes I was getting an
unauthorized error (401).

After I added those lines, I get a time out error
 
J

Joe White

Hmm, that's interesting. The timeout problem doesn't sound familiar. (Of
course, I've only written one app that even uses WebRequest, and it was a
very simple single-page request, with no authentication.)

Is there any chance you boil this down to a simple test project, along with
a simple ASPX page (or info on how to set up the virtual directory's
authentication settings to match what you've got), so that I or someone else
could try to duplicate your setup?
 

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