[Mono-dev] Embedded Mono webservice problem

Robert Jordan robertj at gmx.net
Thu Jan 19 06:37:45 EST 2006


Janne,

Indeed, the exception looks slightly different if machine.config cannot
be found:

'.ctor()' invocation failed with: 
System.Reflection.TargetInvocationException: Exception has been thrown 
by the target of an invocation. ---> 
System.Configuration.ConfigurationException: Cannot find 
c:\Programme\Mono-1.1.13\xetc\mono\1.0\machine.config ()

in <0x000bb> System.Configuration.DefaultConfig:Init ()

in <0x0000d> System.Configuration.DefaultConfig:GetConfig (System.String 
sectionName)

in <0x0001a> System.Configuration.ConfigurationSettings:GetConfig 
(System.String sectionName)

in <0x00059> System.Web.Services.Configuration.WSConfig:get_Instance ()

in <0x00047> 
System.Web.Services.Protocols.SoapExtension:InitializeGlobalExtensions ()


Please fill a bug report at http://mono-project.com/Bugs

Robert

> Hi,
> 
> I have initialized paths, both lib and etc dirs are pointing to same
> directory, d:\monosetdirstest. My directory structure in that folder is
> 
> monosetdirstest
> --etc
>   --mono
>      --1.0
>      --2.0
> --mono
>   --1.0
>   --2.0
>   --gac
> 
> I've tried setting etc dir to d:\monosetdirstest\etc but it doesn't help
> either. Mono does find assemblies and gac with current setting though.
> 
> :janne
> 
> 
> 2006/1/19, Robert Jordan <robertj at gmx.net>:
>> Janne Rantala wrote:
>>> Hi,
>>>
>>> I'm having problems accessing webservice assembly from embedded mono.
>> Only
>>> thing that the assembly does is create the service stub class, it
>> doesn't
>>> even call the service method. Here's the error message I get:
>>>
>>> Unhandled Exception: System.Reflection.TargetInvocationException:
>> Exception
>>> has
>>> been thrown by the target of an invocation. --->
>>> System.NullReferenceException:
>>> Object reference not set to an instance of an object
>>> in <0x0004c>
>>> System.Web.Services.Protocols.SoapExtension:InitializeGlobalExtensi
>>> ons ()
>> It seems like you didn't initialize the runtime's paths. Try to call
>> mono_set_dirs (libdir, etcdir) somewhere before mono_jit_init.
>>
>> libdir: the path to mono's lib directory, i.e. /usr/local/lib
>> etcdir: the path to mono's etc directory, i.e. /usr/local/etc
>>
>> Robert
>>
>> _______________________________________________
>> Mono-devel-list mailing list
>> Mono-devel-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>>
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list




More information about the Mono-devel-list mailing list