2

我正在使用Visual Studio 2012构建 Web 应用程序。该应用程序使用 Web 表单、Ent​​ity Framework 5 和 IBM DB2 数据库服务器。我的开发机器和 Web 服务器上都安装了最新的 IBM Drivers v10.1.2。Web 服务器正在运行Windows Server 2008 R2 Standard x64bit OS

问题我在本地机器上的 Visual Studio 的IIS Express下运行应用程序工作正常,但是当我将应用程序部署到 Web 服务器时,我遇到了 EF 和 DB2 驱动程序问题。这是错误和堆栈跟踪。做错了什么?!

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

.... 
4

1 回答 1

3

我遇到了同样的问题,将应用程序池更改为网络服务就可以了。

于 2016-05-01T22:42:10.327 回答