Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Entity Framework 5 IBM DB2 EntityException The underlying provider failed on ConnectionString

I am using Visual Studio 2012 to build a web application. The application uses webforms, Entity Framework 5 with an IBM DB2 database server. I have the latest IBM Drivers v10.1.2 installed on both my development machine and my web server. The web server is running Windows Server 2008 R2 Standard x64bit OS.

Problem Im having is running the app under Visual Studio's IIS Express on my local machine works fine, however when I deployed the app the web server I am getting problems EF and DB2 Drivers. Here is the error and stack trace. What am doing wrong?!

Server Error in '/' Application.
--------------------------------------------------------------------------------


 ERROR [] [IBM][CLI Driver] SQL0000W  Statement processing was successful. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: IBM.Data.DB2.DB2Exception: ERROR [] [IBM][CLI Driver] SQL0000W  Statement processing was successful.

Source Error: 




An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace: 





[DB2Exception (0x80004005): ERROR [] [IBM][CLI Driver] SQL0000W  Statement processing was successful.]
   IBM.Data.DB2.ConnSettingsFromXmlConfig.ProcessFromXmlConfig(DB2Connection connection, String dbname, String host, String port, String tmpClientEncAlg, String tmpAuthentication, String prevdb, String prevdb_ori, DB2ConnSettings& sSettings, DB2ConnSettingsInternal& sSettingsInternal, StringBuilder& modifiedValue) +21370
   IBM.Data.DB2.DB2ConnPool.ReplaceConnectionStringParms(DB2Connection connection, String szValue, DB2ConnSettings& pSettings, DB2ConnSettingsInternal& pSettingsInternal, Boolean bAttach, Boolean pushDownStrAppended) +19113
   IBM.Data.DB2.DB2Connection.set_ConnectionString(String value) +187
   System.Data.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString) +325

[EntityException: The underlying provider failed on ConnectionString.]
   System.Data.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString) +391
   System.Data.EntityClient.EntityConnection..ctor(String connectionString) +43
   System.Data.Entity.Internal.LazyInternalConnection.InitializeFromConnectionStringSetting(ConnectionStringSettings appConfigConnection) +78
   System.Data.Entity.Internal.LazyInternalConnection.TryInitializeFromAppConfig(String name, AppConfig config) +32
   System.Data.Entity.Internal.LazyInternalConnection.Initialize() +127
   System.Data.Entity.Internal.LazyInternalConnection.CreateObjectContextFromConnectionModel() +13
   System.Data.Entity.Internal.LazyInternalContext.InitializeContext() +281
   System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType) +18
   System.Data.Entity.Internal.Linq.InternalSet`1.Initialize() +52
   System.Data.Entity.Internal.Linq.InternalSet`1.get_InternalContext() +15
   System.Data.Entity.Infrastructure.DbQuery`1.System.Linq.IQueryable.get_Provider() +37
   System.Linq.Queryable.Where(IQueryable`1 source, Expression`1 predicate) +63

.... 
like image 843
Gerard Avatar asked May 10 '26 14:05

Gerard


1 Answers

I had the same problem and changing the app pool to Network Service did the trick.

like image 88
AWhatley Avatar answered May 12 '26 20:05

AWhatley