How are you doing the HTTP requests? Through WebRequest, WebClient or HttpClient?
The error is coming from System.Web.TraceManager which I believe handles application-level ASP.NET tracing<http://msdn.microsoft.com/en-us/library/1y89ed7z(v=vs.85).aspx> (so I'm not sure why it's being invoked with a console application). Do you have anything odd in your App.config file? On Fri, Sep 28, 2012 at 11:55 PM, Maurício Linhares < mauricio.linha...@gmail.com> wrote: > I'm getting the following error for some of the HTTP requests I'm making: > > Exception during TraceManager initialization: > System.Reflection.TargetInvocationException: Exception has been thrown > by the target of an invocation. ---> System.MissingMethodException: > Method not found: > 'System.Configuration.IConfigurationSectionHandler.Create'. > at System.Reflection.MonoMethod.Invoke (System.Object obj, > BindingFlags invokeAttr, System.Reflection.Binder binder, > System.Object[] parameters, System.Globalization.CultureInfo culture) > [0x000eb] in > /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/corlib/System.Reflection/MonoMethod.cs:234 > at System.Reflection.MethodBase.Invoke (System.Object obj, > System.Object[] parameters) [0x00000] in > > /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/corlib/System.Reflection/MethodBase.cs:96 > at System.Web.Configuration.WebConfigurationManager.GetSection > (System.String sectionName, System.String path, System.Web.HttpContext > context) [0x001e6] in > > /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationManager.cs:516 > at System.Web.Configuration.WebConfigurationManager.GetSection > (System.String sectionName, System.String path) [0x00000] in > > /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationManager.cs:418 > at > System.Web.Configuration.WebConfigurationManager.GetWebApplicationSection > (System.String sectionName) [0x0002c] in > > /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationManager.cs:670 > at System.Web.TraceManager..ctor () [0x0001c] in > > /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/System.Web/System.Web/TraceManager.cs:55 > > By looking at the source, the method doesn't really exists, so I'm > pretty puzzled as to why the mono runtime is making a direct call to > something that doesn't exist at all. > > Also, it seems like this code is related to webapplications but I'm > running a console app that makes HTTP requests, not a web server. Is > this some kind of configuration that I'm missing? > > What's funny is that many other HTTP requests do work, but some > specific ones fail with this error and the stack trace is not exactly > revealing as to why this class is being called at all. > > Any hints on how to solve this issue? > > - > Maurício Linhares > http://techbot.me/ - http://twitter.com/#!/mauriciojr > _______________________________________________ > Mono-list maillist - Mono-list@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/mono-list >
_______________________________________________ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list