473,326 Members | 2,124 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,326 software developers and data experts.

Question about Http Requests (HttpWebRequest)

Hi,

I am trying to write a class in C# that inherits from the
HttpWebRequest class to allow me to do dynamic binding (late binding)
of lower level methods.

For example, I would like to be able to figure out how long it takes
for the DNS resolution to take place. I assume that somewhere in the
HttpWebRequest (or inside a parent object) a call takes place to
resolve DNS? I would like to override this method to allow me to
calculate the time taken to complete this process. i.e. grab the time
before the call to resolve the DNS and grab the time when it returns.

Looking at the public methods in the HttpWebRequest class, and those
that it inherits from, I can't see anything obvious to allow me to do
this. I really would like to achieve this with one of the higher level
classes available in the .Net Framework, rather than having to resort
to using sockets (I need support for cookies, SSL, etc. and I don't
want to "reinvent the wheel").

Does anyone have any pointers as to where I should start looking?

Thanks in advance

Alan.
Nov 16 '05 #1
1 1697
Hello

Unfortunately you can't. I had a similar problem. I wanted to choose which
local IP address the underlying socket should bind to. I couldn't do it, I
even looked at ROTOR source code to understand how it works, my conclusion
was that if I wanted to change anything, I have to rewrite the whole thing,
which is not practical of course.

Best regards,
Sherif

"Alan" <al***********@hotmail.com> wrote in message
news:b0**************************@posting.google.c om...
Hi,

I am trying to write a class in C# that inherits from the
HttpWebRequest class to allow me to do dynamic binding (late binding)
of lower level methods.

For example, I would like to be able to figure out how long it takes
for the DNS resolution to take place. I assume that somewhere in the
HttpWebRequest (or inside a parent object) a call takes place to
resolve DNS? I would like to override this method to allow me to
calculate the time taken to complete this process. i.e. grab the time
before the call to resolve the DNS and grab the time when it returns.

Looking at the public methods in the HttpWebRequest class, and those
that it inherits from, I can't see anything obvious to allow me to do
this. I really would like to achieve this with one of the higher level
classes available in the .Net Framework, rather than having to resort
to using sockets (I need support for cookies, SSL, etc. and I don't
want to "reinvent the wheel").

Does anyone have any pointers as to where I should start looking?

Thanks in advance

Alan.

Nov 16 '05 #2

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

Similar topics

1
by: mrbog | last post by:
Hello, I'm making HTTP requests with System.Net.HTTPWebRequest and I want to capture the entire header of the request as a string. I'm able to do this with responses but now the requests. Am I...
6
by: mt404 | last post by:
Hi, I was wondering if someone might be able to provide some guidance on how I could make an http request from a C# library. Basically I have a library which accepts a couple of arguments that...
2
by: mt404 | last post by:
Hi everyone, I have what I think is a simple question concerning making an asynchronous web request using the BeginGetResponse / EndGetResponse methods of httpWebRequest. My app needs to fire...
3
by: Mattias Holmlund | last post by:
Hi, I'm looking for a C#-module that can cache the results of HTTP-requests persistently on disk. I want to write a program that fetches data by issuing a number of HTTP-get requests and process...
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...
4
by: jens Jensen | last post by:
Hello, I was given the task to build a .Net client that will talk to IBM integration server via HTTP post. The idea is that each http packet exchange should be authenticated via X09 "client...
0
by: Mike C# | last post by:
Hi all, I have a quick question. I'm trying to speed up an ASP.NET page I've put together. The page has to send 15 POST requests to a web server and retrieve the results. Each request is...
7
by: faser | last post by:
In a windows form I execute a lot of HttpWebRequest. Each request run in his own thread and every requests have the same target server. Looking at netstat and in the web server logs it seems to me...
2
by: Ken Fine | last post by:
I have a question about ASP.NET output caching. I want to use screen scraping as a temporary hack to pull in some complex Classic ASP-rendered content into some ASP.NET pages: protected String...
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...
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: 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: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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.