Click here to Skip to main content
15,914,795 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: Some help with a news site please Pin
ulikechicken11-Nov-04 15:19
ulikechicken11-Nov-04 15:19 
GeneralRe: Some help with a news site please Pin
DavidNohejl12-Nov-04 6:16
DavidNohejl12-Nov-04 6:16 
GeneralAdvice and help required Pin
colin mcadam10-Nov-04 11:01
colin mcadam10-Nov-04 11:01 
GeneralRe: Advice and help required Pin
john3parker22-Nov-04 5:38
john3parker22-Nov-04 5:38 
GeneralRe: Advice and help required Pin
colin mcadam23-Nov-04 3:38
colin mcadam23-Nov-04 3:38 
GeneralRe: Advice and help required Pin
john3parker23-Nov-04 6:53
john3parker23-Nov-04 6:53 
GeneralRe: Advice and help required Pin
colin mcadam23-Nov-04 8:39
colin mcadam23-Nov-04 8:39 
GeneralRe: Advice and help required Pin
john3parker23-Nov-04 11:54
john3parker23-Nov-04 11:54 
Colin,
Here's the basic override code. I write a static function called Logger() to write the info to a textbox; you'd want to probably write to a text file or database. For some reason the response length is -1 if you get it off the object itself. You can get the response length if you read the entire stream like I've done. This is all BEFORE deserialization so you're timing will be off a bit.
You don't have to explicitly call anything. These are base methods you're overriding and the proxy is taking care of calling them for you.


protected override System.Net.WebRequest GetWebRequest(Uri uri)
{
PersonClient.Form1.Logger("startTime=" + System.DateTime.Now);
return base.GetWebRequest (uri);
}

protected override System.Net.WebResponse GetWebResponse(System.Net.WebRequest request)
{
System.IO.StreamReader sr = new System.IO.StreamReader(request.GetResponse().GetResponseStream());
string buffer = sr.ReadToEnd();
sr.Close();

PersonClient.Form1.Logger("ReqLen=" + request.ContentLength);
//request.GetResponse().GetResponseStream().Length;
PersonClient.Form1.Logger("ResLen=" + buffer.Length );
PersonClient.Form1.Logger("endTime=" + System.DateTime.Now);
return base.GetWebResponse (request);
}


-John
GeneralRe: Advice and help required Pin
colin mcadam24-Nov-04 5:19
colin mcadam24-Nov-04 5:19 
GeneralRe: Advice and help required Pin
colin mcadam25-Nov-04 3:29
colin mcadam25-Nov-04 3:29 
GeneralCLR access policies Pin
fridtjof10-Nov-04 8:06
fridtjof10-Nov-04 8:06 
QuestionIf you are to design a shopping cart page that has a submit button, how do you prevent the user from clicking the submit button twice for the same transaction without using JavaScript? Pin
nicksun10-Nov-04 5:30
nicksun10-Nov-04 5:30 
AnswerRe: If you are to design a shopping cart page that has a submit button, how do you prevent the user from clicking the submit button twice for the same transaction without using JavaScript? Pin
Jack Puppy12-Nov-04 1:00
Jack Puppy12-Nov-04 1:00 
AnswerRe: If you are to design a shopping cart page that has a submit button, how do you prevent the user from clicking the submit button twice for the same transaction without using JavaScript? Pin
rgoyal13-Nov-04 0:53
rgoyal13-Nov-04 0:53 
Generalasp button Pin
cmarmr10-Nov-04 4:18
cmarmr10-Nov-04 4:18 
GeneralRe: asp button Pin
velkropie15-Nov-04 16:10
velkropie15-Nov-04 16:10 
GeneralMicrosoft Multimedia Control 6.0 Pin
andyleonhart9-Nov-04 21:18
andyleonhart9-Nov-04 21:18 
Generaljavascript problem Pin
samithas9-Nov-04 20:04
samithas9-Nov-04 20:04 
Questioncan more than one form be submitted at one time? Pin
nicksun9-Nov-04 16:38
nicksun9-Nov-04 16:38 
AnswerRe: can more than one form be submitted at one time? Pin
rgoyal9-Nov-04 20:53
rgoyal9-Nov-04 20:53 
AnswerRe: can more than one form be submitted at one time? Pin
rgoyal9-Nov-04 21:18
rgoyal9-Nov-04 21:18 
GeneralRe: can more than one form be submitted at one time? Pin
nicksun10-Nov-04 5:34
nicksun10-Nov-04 5:34 
GeneralRe: can more than one form be submitted at one time? Pin
Anonymous10-Nov-04 17:45
Anonymous10-Nov-04 17:45 
QuestionStrong name assembly in html page? Pin
fridtjof9-Nov-04 9:42
fridtjof9-Nov-04 9:42 
AnswerAdditional information for the problem Pin
fridtjof9-Nov-04 21:42
fridtjof9-Nov-04 21:42 

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.