[Mono-dev] webclient error

Pablo Iñigo Blasco pibgeus at gmail.com
Sun Feb 19 18:26:06 EST 2006


greetings.
I have a simple aspx file with this code snipet:

System.Net.WebClient wc = new System.Net.WebClient();
string url=Request.QueryString["url"];
if(url!=null)
  byte[] buffer =wc.DownloadData(new Uri(url));
...

im using xsp2, when the string gets a not null value I get this exception:

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

Stack Trace: System.TypeInitializationException: An exception was
thrown by the type initializer for System.Net.HttpWebRequest --->
System.Configuration.ConfigurationException: system.net/settings does
not implement System.Configuration.IConfigurationSectionHandler ()in
<0x000e1> System.Web.Configuration.ConfigurationData:CreateNewHandler
(System.String sectionName, System.Web.Configuration.SectionData
section)in <0x001d1>
System.Web.Configuration.ConfigurationData:GetHandler (System.String
sectionName)in <0x00055>
System.Web.Configuration.ConfigurationData:GetHandler (System.String
sectionName)in <0x00026>
System.Web.Configuration.ConfigurationData:GetConfigInternal
(System.String sectionName, System.Web.HttpContext context, Boolean
useLoc)in <0x00072>
System.Web.Configuration.ConfigurationData:GetConfigOptLocation
(System.String sectionName, System.Web.HttpContext context, Boolean
useLoc)in <0x00276>
System.Web.Configuration.ConfigurationData:GetConfig (System.String
sectionName, System.Web.HttpContext context)in <0x0005a>
System.Web.Configuration.WebDefaultConfig:GetConfig (System.String
sectionName, System.Web.HttpContext context)in <0x00022>
System.Web.Configuration.WebDefaultConfig:GetConfig (System.String
sectionName)in <0x0001a>
System.Configuration.ConfigurationSettings:GetConfig (System.String
sectionName)in <0x00015> System.Net.HttpWebRequest:.cctor ()--- End of
inner exception stack trace ---in <0x00000> <unknown method>in
<0x0001c> System.Net.HttpRequestCreator:Create (System.Uri uri)in
<0x0002e> System.Net.WebRequest:Create (System.Uri requestUri)in
<0x00045> System.Net.WebClient:SetupRequest (System.Uri uri)in
<0x00010> System.Net.WebClient:SetupRequest (System.Uri uri,
System.String method)in <0x0001c> System.Net.WebClient:DownloadData
(System.Uri address, System.String method)in <0x00012>
System.Net.WebClient:DownloadData (System.Uri address)in (wrapper
remoting-invoke-with-check) System.Net.WebClient:DownloadData
(System.Uri)in <0x00140> ASP.rss_aspx:Page_Load (System.Object o,
System.EventArgs e)in (wrapper delegate-invoke)
System.MulticastDelegate:invoke_void_object_EventArgs
(object,System.EventArgs)in <0x00117> System.Web.UI.Control:OnLoad
(System.EventArgs e)in <0x00112> System.Web.UI.Control:LoadRecursive
()in <0x001c4> System.Web.UI.Page:InternalProcessRequest ()in
<0x000be> System.Web.UI.Page:ProcessRequest (System.Web.HttpContext
context)

I think it is a bug, any suggestion or opinion?
it works on ms.net.
Thanks.
--
No hay viento favorable para el que no sabe donde va.
Pablo Iñigo Blasco - GeuS- www.geus.es.vg



More information about the Mono-devel-list mailing list