[Mono-list] Npgsql1.0 Protocol option not supported

Atsushi Eno atsushi at ximian.com
Sat Jan 13 12:14:08 EST 2007


I don't have any direct answers, but looks like the error message comes
from our Win32Exception. So, probably there is either some
misconfiguration (either in yours or mono's) or some kind of mono bug.
These days I have been able to connect to pgsql successfully on linux.

Atsushi Eno

Andrus wrote:
> My C# application returns error
>
> Protocol option not supported
>
> Error occurs in line
>
> Connection.Open();
>
> Npgsql1.0 source code and docs does not contain such message.
> When running under .NET 2 this error does not occur.
>
> Any idea how to fix it ?
>
> Environment:
>
> Npgsql1.0
> MONO 1.2  .net 2 profile
> monocharge-20070112
> Windows XP
> VCS 2005 Express
>
> Code where error occurs is:
>
> public static void CreateConnection(string Server, string Database,
>        string User, string Password) {
>
> NpgsqlEventLog.Level = LogLevel.Debug;
> NpgsqlEventLog.LogName = @"c:\NpgsqlLogFile.txt";
>
> if (Connection != null)
>     Connection.Close();
>
> ConnectionString = "ENCODING=UNICODE;" +
>        "SERVER=" + Server + ";" +
>        "DATABASE=" + Database + ";" +
>        "USER ID=" + User + ";" +
>        "PASSWORD=" + Password + ";";
>
> Connection = new NpgsqlConnection(ConnectionString);
> IDbCommand Command = new NpgsqlCommand(@"
>         SET search_path TO firma1,public;
>         SELECT sfirmanimi FROM prpalk",
>      (NpgsqlConnection)Connection);
> // Follwing line causes error Protocol Option not supported in MONO
> Connection.Open();
> }
>
> Stack trace:
>
> Protocol option not supportedStack trace:   at Npgsql.NpgsqlClosedState.Open
> (Npgsql.NpgsqlConnector context) [0x00000]
>   at Npgsql.NpgsqlConnector.Open () [0x00000]
>   at Npgsql.NpgsqlConnectorPool.GetPooledConnector (Npgsql.NpgsqlConnection
> Connection) [0x00000]
>
>
> npgsql Log file:
>
> 13.01.2007 18:12:45 2364 Debug Entering
> NpgsqlConnection.NpgsqlConnection(NpgsqlConnection())
> 13.01.2007 18:12:45 2364 Debug ConnectionString Option: ENCODING = UNICODE
> 13.01.2007 18:12:45 2364 Debug ConnectionString Option: SERVER = localhost
> 13.01.2007 18:12:45 2364 Debug ConnectionString Option: DATABASE = mydb
> 13.01.2007 18:12:45 2364 Debug ConnectionString Option: USER ID = admin
> 13.01.2007 18:12:45 2364 Debug ConnectionString Option: PASSWORD = p
> 13.01.2007 18:12:45 2364 Debug Entering NpgsqlCommand.NpgsqlCommand()
> 13.01.2007 18:12:45 2364 Debug Entering
> NpgsqlParameterCollection.NpgsqlParameterCollection()
> 13.01.2007 18:12:45 2364 Debug Set NpgsqlCommand.Transaction =
> 13.01.2007 18:12:45 2364 Debug Entering NpgsqlConnection.Open()
> 13.01.2007 18:12:46 2364 Debug Get NpgsqlClosedState.Instance
> 13.01.2007 18:12:46 2364 Debug Get NpgsqlClosedState.Instance
> 13.01.2007 18:12:46 2364 Debug Entering NpgsqlClosedState.Open()
> 13.01.2007 18:12:46 2364 Debug Get NpgsqlClosedState.Instance
>
> Andrus.
>
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
>   



More information about the Mono-list mailing list