Weather Report control redux

NOAA has been changing its weather forecast Web service and my Weather Report control has been broken for quite some time now. Web service location moved here:

Another (bigger) issue is that apparently NOAA Web service sometimes returns chunked HTTP response which is legal in HTTP 1.1, but .NET 2.0 has issues with parsing chinky HTTP responses. See excellent Rob Garrett's blog post on the subject. Chunked response caused control to fail sometimes depending on the size of the response. The fix is to override GetWebRequest in the proxy generated from WSDL and set HTTP version to 1.0. The tricky part is that you can't then use "Add Web Reference" in VS 2005 as it no loger generates visible proxy. I generated proxy by using WSDL.EXE from the 2.0 framework folder, tweaked it and added it to App_Code.

The attached ZIP includes control as well as sample Web site project for Visual Studio 2005 and Visual Web Developer Express 2005. Please also look at the README file.


Weather forecast control preview

Comments (7)

  1. Several people complained that Weather Report control which fetches data off the NOAA Web service recently…

  2. Some time ago I published a Web user control that employed NOAA Web Service and displayed weather forecast….

  3. I am posting source code for the weather report control that I am using on my Web site. It looks like…

  4. jtdavies says:

    I’m getting an exception on this line:

    xmlWeather = weatherFetcher.NDFDgen(_latitude, _longtitude, "glance", dtStart, dtStart.AddYears(1), weatherParams);

    [System.Net.WebException] {"The server committed a protocol violation. Section=ResponseStatusLine"} System.Net.WebException

  5. I have this application that has been consuming NOAA’s web service for quite some time and all of a sudden

Skip to main content