The underlying provider failed on Open

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
eldjon
Posts: 2
Joined: Fri 06 Apr 2012 13:08

The underlying provider failed on Open

Post by eldjon » Fri 06 Apr 2012 13:16

I downloaded the 'Postgres connector' few days ago and i was using it on a
x64 project in Visual Studio 2010. For certain reasons i changed the configuration of the project to x86 and once i did that it gives me the error
" The underlying provider failed on Open". I searched on google but unsuccessfully. I was hoping that maybe you guys here can know sth more abt it.

Code: Select all

-		$exception	{"The underlying provider failed on Open."}	System.Exception {System.Data.EntityException}
-		[System.Data.EntityException]	{"The underlying provider failed on Open."}	System.Data.EntityException
-		base	{"The underlying provider failed on Open."}	System.Data.DataException {System.Data.EntityException}
-		base	{"The underlying provider failed on Open."}	System.SystemException {System.Data.EntityException}
-		base	{"The underlying provider failed on Open."}	System.Exception {System.Data.EntityException}
		_className	"System.Data.EntityException"	string
+		_data	{System.Collections.ListDictionaryInternal}	System.Collections.IDictionary {System.Collections.ListDictionaryInternal}
		_dynamicMethods	null	object
+		_exceptionMethod	{Void OpenStoreConnectionIf(Boolean, System.Data.Common.DbConnection, System.Data.Common.DbConnection, System.String, System.String, Boolean ByRef)}	System.Reflection.MethodBase {System.Reflection.RuntimeMethodInfo}
		_exceptionMethodString	null	string
		_helpURL	null	string
		_HResult	-2146233087	int
+		_innerException	{"The requested service provider could not be loaded or initialized"}	System.Exception {Devart.Data.PostgreSql.PgSqlException}
+		_ipForWatsonBuckets	0	System.UIntPtr
		_message	"The underlying provider failed on Open."	string
		_remoteStackIndex	0	int
		_remoteStackTraceString	null	string
+		_safeSerializationManager	{System.Runtime.Serialization.SafeSerializationManager}	System.Runtime.Serialization.SafeSerializationManager
		_source	"System.Data.Entity"	string
+		_stackTrace	{sbyte[640]}	object {sbyte[]}
		_stackTraceString	null	string
+		_watsonBuckets	{byte[5616]}	object {byte[]}
		_xcode	-532462766	int
+		_xptrs	0	System.IntPtr
+		Data	{System.Collections.ListDictionaryInternal}	System.Collections.IDictionary {System.Collections.ListDictionaryInternal}
		HelpLink	null	string
		HResult	-2146233087	int
+		InnerException	{"The requested service provider could not be loaded or initialized"}	System.Exception {Devart.Data.PostgreSql.PgSqlException}
		IsTransient	false	bool
		Message	"The underlying provider failed on Open."	string
		Source	"System.Data.Entity"	string
		StackTrace	"   at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure)\r\n   at System.Data.EntityClient.EntityConnection.Open()\r\n   at System.Data.Objects.ObjectContext.EnsureConnection()\r\n   at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)\r\n   at System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable.GetEnumerator()\r\n   at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)\r\n   at System.Data.Objects.ELinq.ObjectQueryProvider.b__0[TResult](IEnumerable`1 sequence)\r\n   at System.Data.Objects.ELinq.ObjectQueryProvider.ExecuteSingle[TResult](IEnumerable`1 query, Expression queryRoot)\r\n   at System.Data.Objects.ELinq.ObjectQueryProvider.System.Linq.IQueryProvider.Execute[S](Expression expression)\r\n   at System.Linq.Queryable.First[TSource](IQueryable`1 source)\r\n   at MakimFingerprint.LoginForm.loginButton_Click(Object sender, EventArgs e) in C:\Users\eldi\Documents\Visual Studio 2008\Projects\MakimFingerprint\MakimFingerprint\LoginForm.cs:line 28\r\n   at System.Windows.Forms.Control.OnClick(EventArgs e)\r\n   at System.Windows.Forms.Button.OnClick(EventArgs e)\r\n   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)\r\n   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)\r\n   at System.Windows.Forms.Control.WndProc(Message& m)\r\n   at System.Windows.Forms.ButtonBase.WndProc(Message& m)\r\n   at System.Windows.Forms.Button.WndProc(Message& m)\r\n   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)\r\n   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)\r\n   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)\r\n   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)\r\n   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)\r\n   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)\r\n   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)\r\n   at System.Windows.Forms.Application.Run(Form mainForm)\r\n   at MakimFingerprint.Program.Main() in C:\Users\eldi\Documents\Visual Studio 2008\Projects\MakimFingerprint\MakimFingerprint\Program.cs:line 21"	string
+		TargetSite	{Void OpenStoreConnectionIf(Boolean, System.Data.Common.DbConnection, System.Data.Common.DbConnection, System.String, System.String, Boolean ByRef)}	System.Reflection.MethodBase {System.Reflection.RuntimeMethodInfo}
+		Static members		
		_className	"System.Data.EntityException"	string
+		_data	{System.Collections.ListDictionaryInternal}	System.Collections.IDictionary {System.Collections.ListDictionaryInternal}


eldjon
Posts: 2
Joined: Fri 06 Apr 2012 13:08

Post by eldjon » Sat 07 Apr 2012 00:15

the exception i keep getting
'Devart.Data.Linq.LinqCommandExecutionException'.
And it happens only for x86. (in x64 works normally)

Code: Select all

'WindowsFormsApplication5.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.Wrapper.dll'
A first chance exception of type 'System.Net.Sockets.SocketException' occurred in System.dll
A first chance exception of type 'Devart.Data.PostgreSql.PgSqlException' occurred in Devart.Data.PostgreSql.dll
A first chance exception of type 'Devart.Data.PostgreSql.PgSqlException' occurred in Devart.Data.PostgreSql.dll
A first chance exception of type 'Devart.Data.PostgreSql.PgSqlException' occurred in Devart.Data.PostgreSql.dll
A first chance exception of type 'Devart.Data.PostgreSql.PgSqlException' occurred in Devart.Data.PostgreSql.dll
A first chance exception of type 'Devart.Data.PostgreSql.PgSqlException' occurred in Devart.Data.PostgreSql.dll
A first chance exception of type 'Devart.Data.Linq.LinqCommandExecutionException' occurred in Devart.Data.Linq.dll
System.Transactions Critical: 0 : http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/UnhandledUnhandled exceptionWindowsFormsApplication5.vshost.exeDevart.Data.Linq.LinqCommandExecutionException, Devart.Data.Linq, Version=3.2.64.0, Culture=neutral, PublicKeyToken=09af7300eec23701Error on opening DbConnection.   at Devart.Data.Linq.LinqCommandExecutionException.CanThrowLinqCommandExecutionException(String message, Exception e)
   at Devart.Data.Linq.Provider.k.a.g()
   at Devart.Data.Linq.Provider.k.a.b(IConnectionUser A_0)
   at Devart.Data.Linq.Provider.k.b(IConnectionUser A_0)
   at Devart.Data.Linq.Provider.DataProvider.ExecuteQuery(CompiledQuery compiledQuery, Object[] parentArgs, Object[] userArgs, Object lastResult)
   at Devart.Data.Linq.Provider.DataProvider.ExecuteAllQueries(CompiledQuery compiledQuery, Object[] userArguments)
   at Devart.Data.Linq.Provider.DataProvider.Devart.Data.Linq.Provider.IProvider.Execute(Expression query)
   at Devart.Data.Linq.DataQuery`1.System.Linq.IQueryProvider.Execute[S](Expression expression)
   at System.Linq.Queryable.Count[TSource](IQueryable`1 source)
   at WindowsFormsApplication5.Form1.button1_Click(Object sender, EventArgs e) in c:\users\eldi\documents\visual studio 2010\Projects\WindowsFormsApplication5\WindowsFormsApplication5\Form1.cs:line 25
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.Run(Form mainForm)
   at WindowsFormsApplication5.Program.Main() in c:\users\eldi\documents\visual studio 2010\Projects\WindowsFormsApplication5\WindowsFormsApplication5\Program.cs:line 18
   at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
   at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()Devart.Data.Linq.LinqCommandExecutionException: Error on opening DbConnection. ---> Devart.Data.PostgreSql.PgSqlException: The requested service provider could not be loaded or initialized
   at Devart.Data.PostgreSql.ag.ag()
   at Devart.Data.PostgreSql.ag.a()
   at Devart.Common.DbConnectionInternal.ao()
   at Devart.Common.DbConnectionFactory.b(DbConnectionBase A_0)
   at Devart.Common.DbConnectionClosed.Open(DbConnectionBase outerConnection)
   at Devart.Common.DbConnectionBase.Open()
   at Devart.Data.PostgreSql.PgSqlConnection.Open()
   at Devart.Data.Linq.Provider.k.a.g()
   --- End of inner exception stack trace ---
   at Devart.Data.Linq.LinqCommandExecutionException.CanThrowLinqCommandExecutionException(String message, Exception e)
   at Devart.Data.Linq.Provider.k.a.g()
   at Devart.Data.Linq.Provider.k.a.b(IConnectionUser A_0)
   at Devart.Data.Linq.Provider.k.b(IConnectionUser A_0)
   at Devart.Data.Linq.Provider.DataProvider.ExecuteQuery(CompiledQuery compiledQuery, Object[] parentArgs, Object[] userArgs, Object lastResult)
   at Devart.Data.Linq.Provider.DataProvider.ExecuteAllQueries(CompiledQuery compiledQuery, Object[] userArguments)
   at Devart.Data.Linq.Provider.DataProvider.Devart.Data.Linq.Provider.IProvider.Execute(Expression query)
   at Devart.Data.Linq.DataQuery`1.System.Linq.IQueryProvider.Execute[S](Expression expression)
   at System.Linq.Queryable.Count[TSource](IQueryable`1 source)
   at WindowsFormsApplication5.Form1.button1_Click(Object sender, EventArgs e) in c:\users\eldi\documents\visual studio 2010\Projects\WindowsFormsApplication5\WindowsFormsApplication5\Form1.cs:line 25
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.Run(Form mainForm)
   at WindowsFormsApplication5.Program.Main() in c:\users\eldi\documents\visual studio 2010\Projects\WindowsFormsApplication5\WindowsFormsApplication5\Program.cs:line 18
   at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
   at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()Devart.Data.PostgreSql.PgSqlException, Devart.Data.PostgreSql, Version=5.80.332.0, Culture=neutral, PublicKeyToken=09af7300eec23701The requested service provider could not be loaded or initialized   at Devart.Data.PostgreSql.ag.ag()
   at Devart.Data.PostgreSql.ag.a()
   at Devart.Common.DbConnectionInternal.ao()
   at Devart.Common.DbConnectionFactory.b(DbConnectionBase A_0)
   at Devart.Common.DbConnectionClosed.Open(DbConnectionBase outerConnection)
   at Devart.Common.DbConnectionBase.Open()
   at Devart.Data.PostgreSql.PgSqlConnection.Open()
   at Devart.Data.Linq.Provider.k.a.g()Devart.Data.PostgreSql.PgSqlException (0x80004005): The requested service provider could not be loaded or initialized
   at Devart.Data.PostgreSql.ag.ag()
   at Devart.Data.PostgreSql.ag.a()
   at Devart.Common.DbConnectionInternal.ao()
   at Devart.Common.DbConnectionFactory.b(DbConnectionBase A_0)
   at Devart.Common.DbConnectionClosed.Open(DbConnectionBase outerConnection)
   at Devart.Common.DbConnectionBase.Open()
   at Devart.Data.PostgreSql.PgSqlConnection.Open()
   at Devart.Data.Linq.Provider.k.a.g()
An unhandled exception of type 'Devart.Data.Linq.LinqCommandExecutionException' occurred in Devart.Data.Linq.dll

Additional information: Error on opening DbConnection.

The program '[9660] WindowsFormsApplication5.vshost.exe: Managed (v4.0.30319)' has exited with code 0 (0x0).


Shalex
Site Admin
Posts: 8247
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Tue 10 Apr 2012 09:26

eldjon wrote:The underlying provider failed on Open.
eldjon wrote:The requested service provider could not be loaded or initialized
1. Tell us the exact version (x.xx.xxx) of your dotConnect for PostgreSQL.
2. You are working on the x64 operating system, aren't you? Also specify version and edition of your OS.
3. Please create a simple x86 console application and open a PgSqlConnection in it. Does it work in this case?
If not, post here the call stack.

Post Reply