473,405 Members | 2,445 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Authentication with HttpWebRequest

I used to use WebBrowser in VB6, and now I want to learn how to use
WebRequest in vb.net, but I'm having 2 problems.

1) Is it normal that the automatic redirection doesn't work when the
page contains this?
<body onLoad="location='http://www.SiteName.com/index.jsp'"></body>

If I use WebBrowser.Navigate in VB6 with this redirection works.

2) How do I get the content of a page after the authentication done
like this?
https://www.sitename.com/login.jsp?Username=xxx&Password=yyy"

If I use WebBrowser.Navigate in VB6 with this URI to login, then
WebBrowser.Navigate again with other URIs to receive the pages of the
user xxx, everything works fine:

But if I use HttpWebRequest.Create with this URI to login, then
HttpWebRequest.Create again with other URIs I get a page telling me
that I'm not signed in.

I don't know how the authentication is works, I only know that I
cannot use Credentials because in that website it doesn't work (I
don't know why, I was told in another post, but with no explanation).

Perhaps the second HttpWebRequest.Create doesn't send back
information
about the current session gathered on the first one?

Jul 15 '07 #1
0 1130

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Wolfgang Meier | last post by:
I am using the following code to retrieve a document from my web server: HttpWebRequest req = (HttpWebRequest)WebRequest.Create("http://example.com/"); req.Method = "GET"; req.PreAuthenticate...
5
by: Tony | last post by:
Please help, I've scoured the web but cannot find an answer to this! I want to use WebRequest to get the contents of a web page. The trouble is, the page require you to go to a login page (using...
1
by: Invalidlastname | last post by:
Hi, Here is the issue: we have an ASP.NET application which is protected by Form authentication. The web application is hosted in the web-farm environment on multiple web servers. There are...
4
by: John Smith | last post by:
Hey folks, I'm trying to communicate with our Exchange server using WebDav to get the User's personal contacts folder. Works fine if I hardcode their username and password (obviously not an...
4
by: Morten Snedker | last post by:
I'm trying to download a file. I've tried both using webclient and the httpWebRequest. Either way it returns a "407 proxy authentication required". The program is to be run externally, so...
3
by: Patrick Fogarty | last post by:
I am programming what is to be a web service client that will use an HTTP-POST to request and retrieve data. The remote server (written in java for what it's worth) requires basic authentication...
2
by: =?Utf-8?B?U2ltb25EZXY=?= | last post by:
Hi I have a utility class, called MailHandler, that I wrote to read and operate on emails on an Exchange server using WebDAV. The WebDAV SQL statements are sent using an HttpWebRequest object....
1
by: ThatsIT.net.au | last post by:
I have asp.net application behind a ISA 2000 Server I have a few pages that import RSS, recently I have had to set authentication for out going requests though the proxy server, how do I set...
0
by: =?Utf-8?B?S29uc3RhbnRpbg==?= | last post by:
I am currently working on the application that need to simulate basic authentication programmatically using user's credentials that are known. Basically, the need is for a single sign on with a...
2
by: Tosco | last post by:
I used to use WebBrowser in VB6, and now I want to learn how to use WebRequest in vb.net, but I'm having 2 problems. 1) Is it normal that the automatic redirection doesn't work when the page...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.