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

How to create a fast webrequest ?

Hi,

During the user's registration I wan't to geo-code an address using
localsearchmaps.com/geo. For that purpose I use a webrequest like this:

string url = "http://www.localsearchmaps.com/geo/?street=" +
StreetNumber + "+" + StreetName + "&city=" + City +
"&country=DK&google2=1";

System.Net.WebRequest webRequest =
System.Net.HttpWebRequest.Create(url);
webRequest.Timeout = webRequest.Timeout * 10;
System.Net.WebResponse webResponse = webRequest.GetResponse();
System.IO.StreamReader reader = new
System.IO.StreamReader(webResponse.GetResponseStre am());
string html = reader.ReadToEnd();
reader.Close();

I then pull out the information I need from the html-string.The problem
is, that it sometimes is a bit slow to request the information from the
Internet, and the user is therefore kept waiting. Is there a faster way
to do get the info from the net? Maybe an asynchronous call of some
sort?

TIA

May 31 '06 #1
0 1326

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

Similar topics

3
by: Mike | last post by:
I've seen a few examples of creating an thumbnail from a file directly from the server but.... does anyone know how i can grab a picture from another server (eg a seperate image server...
4
by: Bob | last post by:
I've got to use the http protocol to communicate with another machine as part of a Web Service using HttpWebRequest and HttpWebResponse. As such, timing is important. When I create the...
0
by: jesper.hvid | last post by:
Hi. I've noticed, after moving some of our code to 2.0, that System.Net.WebRequest.Create(System.String) and System.Uri(System.String) no longer behave as they did in 1.1 framework. Example:...
1
by: David Satz | last post by:
Hello--I just upgraded to Visual Studio .NET 2005 and suddenly, all my .NET 1.1 applications that accessed Web sites have broken. For example, this code: WebClient wc = new WebClient();...
4
by: John Daly | last post by:
Does anyone know how to create an image (JPEG) from an HTTPResponse object? I am working on system that has a map pop up from our GIS department. I want create an image at runtime from this popup...
4
by: Sathyaish | last post by:
The WebRequest class implements IWebRequestCreate and hence, a method Create. This method has two other overloads, one of which is a private method. Here's how it looks: public static...
3
by: eSolTec, Inc. 501(c)(3) | last post by:
Thank you in advance for any and all assistance. I'm trying to create a call to a web page to validate and register software. The code I'm using is: Private Sub OK_Click(ByVal sender As...
0
by: buccsailor | last post by:
Hell there, I tried to post a reply to a message thread created back in July 2006 regarding the override of WebRequest, Closed Conenctions and setting KeepAlive to false,but it's been over 60...
0
by: buu | last post by:
I have an small app. that uses WebRequest class in a scholar way like: dim imgWeReq=system.net.WebRequest.Create(some_url_string") dim imgWebRes as net.HttpWebResponse imgWebRes=...
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: 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: 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...
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
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...

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.