[Mono-aspnet-list] Problem using a web service.

ionsol nabble at pasichnyk.net
Fri May 15 15:08:04 EDT 2009


Here is a bit more information.

If I run the following code in both a console application and a website
(hosted with fastcgi-mono-server2), I get two different results.


using (System.Net.WebClient client = new System.Net.WebClient())
         {
            using (System.IO.Stream stream =
client.OpenRead("http://www.google.com"))
            {
                  using (System.IO.StreamReader sr = new
System.IO.StreamReader(stream))
                  {
                     Console.WriteLine(sr.ReadToEnd());
                  }
            }

         }


With the console application, the stream sucessfully returns the html for
googles homepage.  With the webapp, it gives me:

Server Error in '/' Application

--------------------------------------------------------------------------------

Error: NameResolutionFailure
Description: HTTP 500. Error processing request.

Stack Trace: 

System.Net.WebException: Error: NameResolutionFailure
  at System.Net.HttpWebRequest.EndGetResponse (IAsyncResult asyncResult)
[0x00000] 
  at System.Net.HttpWebRequest.GetResponse () [0x00000] 
  at System.Net.WebClient.OpenRead (System.Uri address) [0x00000]  

--------------------------------------------------------------------------------
Version information: Mono Version: 2.0.50727.1433; ASP.NET Version:
2.0.50727.1433 
-- 
View this message in context: http://www.nabble.com/Problem-using-a-web-service.-tp23246075p23565344.html
Sent from the Mono - ASP.NET mailing list archive at Nabble.com.



More information about the Mono-aspnet-list mailing list