Click here to Skip to main content
15,894,955 members
Home / Discussions / C#
   

C#

 
GeneralRe: Compilation error CS0006 Pin
Judah Gabriel Himango10-Dec-04 12:10
sponsorJudah Gabriel Himango10-Dec-04 12:10 
GeneralRe: Compilation error CS0006 Pin
thepersonof10-Dec-04 23:18
thepersonof10-Dec-04 23:18 
GeneralRe: Compilation error CS0006 Pin
thepersonof11-Dec-04 3:20
thepersonof11-Dec-04 3:20 
GeneralFrames in HTTPWebRequest Pin
JeromeKJerome10-Dec-04 7:08
JeromeKJerome10-Dec-04 7:08 
GeneralRe: Frames in HTTPWebRequest Pin
Heath Stewart10-Dec-04 12:41
protectorHeath Stewart10-Dec-04 12:41 
GeneralRe: Frames in HTTPWebRequest Pin
JeromeKJerome10-Dec-04 14:42
JeromeKJerome10-Dec-04 14:42 
GeneralRe: Frames in HTTPWebRequest Pin
Heath Stewart10-Dec-04 20:24
protectorHeath Stewart10-Dec-04 20:24 
GeneralRe: Frames in HTTPWebRequest Pin
JeromeKJerome11-Dec-04 2:24
JeromeKJerome11-Dec-04 2:24 
Well, that 1k I'm getting IS the frameset page. I showed it on my first post, but here it is again:



<title>MSU Schedule Of Courses










To view this page, your browser must support
frames.



Here is the request header:

1 POST /ScheduleBook/schedule.asp HTTP/1.1
2 Content-Type: application/x-www-form-urlencoded
3 Connection: close
4 Accept-Language: en-us,en;q=0.5
5 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
6 Referer: http://ntweb8.ais.msu.edu/ScheduleBook/selection.asp
7 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.3) Gecko/20040910
8 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1
9 Content-Length: 248
10 Expect: 100-continue
11 Host: ntweb8.ais.msu.edu

Here is the response header:

1 HTTP/1.1 200 OK
2 Server: Microsoft-IIS/5.0
3 Date: Fri, 10 Dec 2004 17:34:28 GMT
4 X-Powered-By: ASP.NET
5 Connection: close
6 Content-Length: 1043
7 Content-Type: text/html
8 Set-Cookie: ASPSESSIONIDQCQCQDBS=OEFOLADCEDMDCKNNFEEJJBOJ; path=/
9 Cache-control: private


As you can see, I am setting the user agent to "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.3) Gecko/20040910."

I see from your comments that if the length is large I should pay attention to the content-length and don't use ReadToEnd. So for this particular application, where I expect to get about 40k each request, I could check the length and halt if the length is over say, 100k. This would not require me to learn how to use something other than ReadToEnd, since I am comfortable with that and don't have the lead time to learn more new tricks than necessary right now.

I am only interested in the frame named "Courses." This application is very specific, I will always only want the frame named "Courses," so I don't even need to parse the frames page unless the name of the "Courses" frame changes.

In your first post to my question, you said "...you can resolve relative URLs like so: Uri newUrl = new Uri(oldUrl, 'HeadingBlank.asp')..." My HTTPWebRequest POSTS is constructed using this statement based on UriBuilder:

uBuild2.Path = "ScheduleBook/schedule.asp";
Uri location = uBuild2.Uri;

So can I infer that on my POST for the "Courses" frame, I should simply reconstruct my Uri using this statement?:

uBuild2.Path = "ScheduleBook/intro.asp";

If so, how does the server know what page to return? From the cookie? From the postData?

If these assumptions are correct, then my process would be two-step: request frames page and cookie, then request "Courses" page (intro.asp). Can I short-circuit this process and just repeatedly request subsequent courses pages?

BTW, I am using Proxy Sniffer from David Fisher ( http://www.d-fischer.com) to compare my browser requests with my C# requests. It doesn't show that my browser is making multiple requests to get these frames, although it does show my browser making multiple requests to get other things like images.
GeneralRe: Frames in HTTPWebRequest Pin
Dave Kreskowiak11-Dec-04 4:35
mveDave Kreskowiak11-Dec-04 4:35 
GeneralRe: Frames in HTTPWebRequest Pin
Heath Stewart11-Dec-04 21:51
protectorHeath Stewart11-Dec-04 21:51 
GeneralRe: Frames in HTTPWebRequest Pin
JeromeKJerome14-Dec-04 6:37
JeromeKJerome14-Dec-04 6:37 
GeneralHelp in Delimiter! Pin
ahjiefreak10-Dec-04 5:25
ahjiefreak10-Dec-04 5:25 
GeneralRe: Help in Delimiter! Pin
Alexander Kent10-Dec-04 17:00
Alexander Kent10-Dec-04 17:00 
GeneralHelp in Delimiter! Pin
ahjiefreak10-Dec-04 5:23
ahjiefreak10-Dec-04 5:23 
GeneralRe: Help in Delimiter! Pin
Alexander Kent10-Dec-04 17:00
Alexander Kent10-Dec-04 17:00 
GeneralRe: Help in Delimiter! Pin
ahjiefreak11-Dec-04 2:11
ahjiefreak11-Dec-04 2:11 
GeneralRe: Help in Delimiter! Pin
Alexander Kent11-Dec-04 13:28
Alexander Kent11-Dec-04 13:28 
GeneralRe: Help in Delimiter! Pin
ahjiefreak16-Dec-04 4:48
ahjiefreak16-Dec-04 4:48 
GeneralILDASM and Memory. Some confusion... Pin
...---...10-Dec-04 5:23
...---...10-Dec-04 5:23 
GeneralRe: ILDASM and Memory. Some confusion... Pin
leppie10-Dec-04 5:58
leppie10-Dec-04 5:58 
GeneralRe: ILDASM and Memory. Some confusion... Pin
...---...10-Dec-04 6:39
...---...10-Dec-04 6:39 
GeneralRe: ILDASM and Memory. Some confusion... Pin
Alex Korchemniy10-Dec-04 8:41
Alex Korchemniy10-Dec-04 8:41 
GeneralRe: ILDASM and Memory. Some confusion... Pin
Heath Stewart10-Dec-04 12:46
protectorHeath Stewart10-Dec-04 12:46 
GeneralRe: ILDASM and Memory. Some confusion... Pin
Alex Korchemniy10-Dec-04 13:28
Alex Korchemniy10-Dec-04 13:28 
GeneralRe: ILDASM and Memory. Some confusion... Pin
Judah Gabriel Himango10-Dec-04 12:05
sponsorJudah Gabriel Himango10-Dec-04 12:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.