[Mono-list] Npgsql.NpgsqlClosedState.Open An exception was thrown by the type initializer for System.Net.Dns

Andrus kobruleht2 at hot.ee
Mon Oct 30 09:19:07 EST 2006


>>>>> It looks like Mono can't find its machine.config.
>>>>> How do you invoke mono.exe?
>>>> I use shortcut icon in quick launch. Target is
>>>>
>>>> "C:\Program Files\Mono-1.1.17.1\bin\mono.exe"  i:\mydir\myapp\myapp\bin\debug\myapp.exe
>>> Assure that the "run directory" of the shortcut is
>>> "C:\Program Files\Mono-1.1.17.1\bin\".
>>
>> Thank you. This is my "run directory" but the problem persists.
>> After deleting   i:\mydir\myapp\myapp\bin\debug\myapp.exe.config file my application starts.
>> So it seems that something in application config file causes this error.
>> Why this confing file causes error ?
>
> The content of the config is probably irrelevant. I guess
> solely the existence of the config is triggering the error.

I created config file containing

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
</configuration>

In this case error does not occur.
It seems that some contents in application config file causes npgsql to fail.

I have no idea why mono opens application config file at all. I don't have such command in my 
application.

Andrus. 



More information about the Mono-list mailing list