473,322 Members | 1,714 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,322 software developers and data experts.

how to get a httpwebrequest's response url

didnt realize I put this in the wrong spot before so this is a repost,
sorry!

Right now I am posting data to a webpage by doing the following

webRequest =
CType(System.Net.WebRequest.Create("http://www.domain.com/login.asp"),
Net.HttpWebRequest)

webRequest.Method = "POST"

webRequest.CookieContainer = Cookies

postData = "Submit=Go&id=asdDSDFsdf&pid=34g4"

data = System.Text.Encoding.UTF8.GetBytes(postData)

webRequest.ContentType = "application/x-www-form-urlencoded"

webRequest.ContentLength = data.Length

Dim RequestStream As IO.Stream = webRequest.GetRequestStream

RequestStream.Write(data, 0, data.Length)

RequestStream.Close()

webResponse = CType(webRequest.GetResponse(), Net.HttpWebResponse)

Now when I send that, the response is a new webpage (it redirected to it
after it authenticated my login account) I dont want to get the entire page
retured, I just want the URL that the new page is on, is there any way to do
this with out downloading the entire response (its large and a waste of
bandwidth since all I need is just the URL)... the URL is in the format of
http://www.domain.com/nextpage.asp?G...5G45G45WGREGDG

Any help would be nice, thanks!

Mar 10 '07 #1
0 959

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

Similar topics

0
by: TJO | last post by:
Can someone at MS please reply to this. I am trying to post data so a web form via ssl with the following code. I keep getting this error: "The underlying connection was closed: Could not...
2
by: Kueishiong Tu | last post by:
I have a url, I pass it to Webclient, and I get response without any problem. String* uriString = S"trade7.masterlink.com.tw/futures/QuotePrice.jsp"; String* postData = S""; // Create a new...
16
by: thomas peter | last post by:
I am building a precache engine... one that request over 100 pages on an remote server to cache them remotely... can i use the HttpWebRequest and WebResponse classes for this? or must i use the...
0
by: Sivashankaran Vaidhyalingam | last post by:
Hi folks, I have an aspx application App A hosted in a server which is inside the intranet . I need to serve pages from this application _through_ another application App B which acts as a proxy...
1
by: iana_kosio | last post by:
Hi, I am using HttpWebRequest class to communicate with remote server. In some cases the server would return 5xx status code which results in HttpWebRequest object throwing an exception. I,...
1
by: sfoxover | last post by:
Hi, Could someone please give me some suggestions on how to make this class robust. I need to be able to handle around 20 similtanious requests to this class which causes a web browser to...
6
by: Oliver | last post by:
I have a very wired problem requesting one specific url from within my application. I have struggeled with this for 5 hours now, and searched google withour any luck, so i hope that someone are...
0
by: Fred Herring | last post by:
I currently use httpwebrequest to download large byte array files from my server. I am curious about how to change my httpwebrequest code to allow posing a large byte array to a virtual foldeer. ...
0
by: boxboy | last post by:
Hi, I'm writing a console application and am having a problem with HttpWebRequest when posting data to a webserver. A "System.Net.WebException: The server committed a protocol violation" is always...
0
by: dattaforit | last post by:
I am using VC++ .Net (2003). In my application i create a HttpWebRequest object, add the method and header to the request. An now try to get the response. I get the response. to get the response i...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.