2017-09-13 71 views
0

我遇到了问题,试图让我的Web应用程序在我们的IIS服务器上正确发布和运行。在已发布的Web应用程序中通过ODBC连接到Progress数据库的问题

当我使用相同的ODBC驱动程序设置从Visual Studio 2015进行测试时,一切正常。只有一次我尝试发布Web应用程序,并在我遇到问题的浏览器中从IIS Web服务器访问它。

我使用Visual Studio 2015年v14.0.25431.01更新3

的IIS服务器在64位Windows 2016服务器

ODBC驱动程序是一个进展OpenEdge 11.6驱动程序 - 32位

使用位于c:\ windows \ sysWOW64 \ odbcad32中的32位ODBC管理器设置ODBC连接我使用了很多论坛来说明如何确保ODBC驱动程序正确设置并使用正确的ODBC管理器,我t是。

我还遇到过一些参考编译Web应用程序并在配置管理器中指定使用x86而不是任何CPU的文章。当我进入配置管理器时,x86不是一个选项。

我不知道如何解决这个错误,以便我可以从IIS服务器访问新的Web应用程序。

我得到的是错误...

Server Error in '/' Application.

ERROR [IM014] [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application

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: System.Data.Odbc.OdbcException: ERROR [IM014] [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application

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:

[OdbcException (0x80131937): ERROR [IM014] [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application] System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode) +1358681 System.Data.Odbc.OdbcConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) +78

任何建议,意见,建议?

回答

1

的问题是错误消息试图说些什么(也许有点不清楚):

ERROR [IM014] [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application

这意味着,你正在尝试使用32位ODBC驱动程序与IIS的64位版本,而且在64位应用程序中不可能使用32位驱动程序/库(不仅适用于IIS,而且适用于任何Windows应用程序)。

您对VS 2015没有任何问题,因为它是32-bit application,所以驱动程序和应用程序相匹配。您需要为IIS安装64位ODBC驱动程序并配置64位ODBC。

+0

感谢您的快速回复。我不确定我是否能够在服务器上使用32位驱动程序。我将着手尝试获得一个合适的64位驱动程序,看看是否能解决我所有的问题。 – shadderk

相关问题