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

Getting response from WebRequest throws Invalid URI

I have a strange problem with a WebRequest. It used to work just fine, but now I get an exception (Invalid URI: The hostname could not be parsed.) every time I try to get the response from that request.

Stack Trace:

Expand|Select|Wrap|Line Numbers
  1.    at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
  2.    at System.Uri..ctor(String uriString)
  3.    at System.Net.WebProxy.CreateProxyUri(String Address)
  4.    at System.Net.WebProxy..ctor(String Address, Boolean BypassOnLocal)
  5.    at System.Net.HttpWebRequest.SubmitRequest()
  6.    at System.Net.HttpWebRequest.finishGetResponse()
  7.    at System.Net.HttpWebRequest.GetResponse()
  8.    at StockQuotes.Form1.listBox_SelectedIndexChanged(Object sender, EventArgs e)
  9.    at System.Windows.Forms.ListBox.OnSelectedIndexChanged(EventArgs e)
And the value for the uri is: http://quote.yahoo.com/d/quotes.csv?s=MSFT&f=l1n . Which works just fine if I point my browser to it.

I appreciate any help.
Mar 18 '08 #1
0 2855

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Vivek Mehta | last post by:
I want to receive XML stream generated at another URL however when I try to load the XML it errors out with one error or the other. I beleive this XML comes back with HTTP header which actually...
0
by: Marcus | last post by:
Hi all, I have some code that downloads an XML tree from a web server. If there is a problem returning the requested XML tree from the server, it returns an XML tree with the error message in a...
2
by: Neal | last post by:
Hi, I try retrieve an XML stream from a webapp using a post...
1
by: William F. Robertson, Jr. | last post by:
I am having problems with using the WebRequest object (or HttpWebRequest ). I have created the WebRequest and set the credentials, but when I call GetResponse() it is throwing an internal server...
6
by: Keith Patrick | last post by:
I have to do some programmatic redirects (in several pages) based on URLs I am given from an external source. The URLs have querystrings at the end, but one in particular is about 240 chars long,...
0
by: z. f. | last post by:
Hi, i have asp.net vb.net wep application. i try to investigate performance issue. so first i built a vb.net windows application that makes http requests to my pages and show me the time taken...
8
by: Brent White | last post by:
If you need more information, I'd be glad to give it, but I am developing an ASPX page so that the user can select multiple values for a specific field, then pass them on (using Crystal Reports 10...
2
by: Zytan | last post by:
I know that WebRequest.GetResponse can throw WebException from internet tutorials. However in the MSDN docs: http://msdn2.microsoft.com/en-us/library/system.net.webrequest.getresponse.aspx It...
5
by: Archana | last post by:
Hi all, I am having application where i am downloading xml content using webrequest. my code is as below HttpWebRequest lWebRequest = (HttpWebRequest) WebRequest.Create(URL); HttpWebResponse...
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
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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...
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
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.