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

HttpWebRequest only returning NOFRAMES part of page

Greetings

I have trouble catching the actual HTML Source code of a
HttpWebRequest when the result of a successful login is a Frameset (I
cant seem to get hold of the Frameset page Source code).

The request is an automated basic login post (HttpWebRequest.Method =
"POST" with username and password) which successfully catches Cookies
etc. But the sources code I get is the NOFRAMES part of the frameset
page:

"The page requires a frames-capable browser. Almost every modern
browser includes frame support, so you may wish to try upgrading to a
browser such as Netscape or Internet Explorer."

The underlaying pages are accessible withour the frameset but that
isnt the point. I need to get hold of the actual Frameset code all
well. I have gone through all HttpWebRequest and HttpWebResponse
properties but so far I couldnt find a solution to this little
kickup.

Anyone managed to do this?

Nov 18 '05 #1
2 1936
the site is probably looking at user agent to determine if the browser
supports frames. send a user agent header like IE's, to trick the site.

-- bruce (sqlwork.com)

"Toralf" <to***********@area26-dot-com.no-spam.invalid> wrote in message
news:41********@Usenet.com...
Greetings

I have trouble catching the actual HTML Source code of a
HttpWebRequest when the result of a successful login is a Frameset (I
cant seem to get hold of the Frameset page Source code).

The request is an automated basic login post (HttpWebRequest.Method =
"POST" with username and password) which successfully catches Cookies
etc. But the sources code I get is the NOFRAMES part of the frameset
page:

"The page requires a frames-capable browser. Almost every modern
browser includes frame support, so you may wish to try upgrading to a
browser such as Netscape or Internet Explorer."

The underlaying pages are accessible withour the frameset but that
isnt the point. I need to get hold of the actual Frameset code all
well. I have gone through all HttpWebRequest and HttpWebResponse
properties but so far I couldnt find a solution to this little
kickup.

Anyone managed to do this?

Nov 18 '05 #2
Hi,

This sounded interesting so I gave it a try. To get it working I had to set
my UserAgent to this:

objRequest.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0;
..NET CLR 1.0.3705; .NET CLR 1.1.4322)"

I tested on this page:

http://msdn.microsoft.com/library/default.asp

Worked good, returned the Frameset to me. I think then to get what you want
you'd have to parse it for the value of the src of each frame, then make a
request on those pages. Good luck! Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.

"Toralf" <to***********@area26-dot-com.no-spam.invalid> wrote in message
news:41********@Usenet.com...
Greetings

I have trouble catching the actual HTML Source code of a
HttpWebRequest when the result of a successful login is a Frameset (I
cant seem to get hold of the Frameset page Source code).

The request is an automated basic login post (HttpWebRequest.Method =
"POST" with username and password) which successfully catches Cookies
etc. But the sources code I get is the NOFRAMES part of the frameset
page:

"The page requires a frames-capable browser. Almost every modern
browser includes frame support, so you may wish to try upgrading to a
browser such as Netscape or Internet Explorer."

The underlaying pages are accessible withour the frameset but that
isnt the point. I need to get hold of the actual Frameset code all
well. I have gone through all HttpWebRequest and HttpWebResponse
properties but so far I couldnt find a solution to this little
kickup.

Anyone managed to do this?

Nov 18 '05 #3

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

Similar topics

2
by: Anna | last post by:
Hi all. I want to create a noframes version of a certain page (not written by me), that has three frames, each loading a page with few external stylesheets. If I copy the content of each...
11
by: annie | last post by:
Hello all. I am writing an XSL stylesheet that automatically converts a page with frames to a noframes equivalent of this page, using tables. I can get the positioning of each frame write in the...
3
by: Hardik Shah | last post by:
Hi, I am calling an ASP.Net page from an ASP classic application but need the .Net page to have access to ASP classic's session variables. I am using HTTPWebRequest to call ASP classic page...
0
by: Susan Van Houen | last post by:
Hi Everybody, I have a problem that is driving me crazy and I am hoping for some help here. I am building an application (vb.net, vs2003) that crawls selected websites. The application works...
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
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: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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
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.