32位asp.net应用程序在64位Windows上运行时的问题一例
2011-01-25 10:54
429 查看
之前在32位Windows 2008下编译的asp.net应用程序部署到64位的Windows下,部署上去以后,首页还可以运行,但是该应用程序还用了oledb去访问access数据库. 结果出现了如下错误信息:
Exception Details: System.InvalidOperationException: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine.
Source Error:
Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927
在网络上搜索了半天,暂时没有找到答案,然后想是不是没有装MDAC,但是已经装了Sql Server 2008的客户端,这个oledb的驱动没有可能不随Sql Server 2008的客户端安装的。还是从IIS上找原因。记得该程序是在32位操作系统上编译的,这个问题可能与32位有关,而当前系统是64位的。于是在IIS管理器里面找与32兼容有关的设置。找来找去,终于找到点眉目:
首先找到该站点所对应的应用程序池:
再找到该应用程序池的高级设置:
将”Enable 32 Bit Applications”打开。再将此应用程序池重启一下。发现上述问题就解决了。
Server Error in '/' Application.
The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine.
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.InvalidOperationException: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine.
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:
[InvalidOperationException: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine.] System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) +1818735 System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection) +148 System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) +100 System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) +45 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +6264718 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +6265031 System.Data.OleDb.OleDbConnection.Open() +47 Microsoft.ApplicationBlocks.Data.OleDbHelper.PrepareCommand(OleDbCommand command, OleDbConnection connection, OleDbTransaction transaction, CommandType commandType, String commandText, OleDbParameter[] commandParameters) in E:\mydotnet\WorkCopy\DAAB\OleDbHelper.cs:106 Microsoft.ApplicationBlocks.Data.OleDbHelper.ExecuteDataset(OleDbConnection connection, CommandType commandType, String commandText, OleDbParameter[] commandParameters) in E:\mydotnet\WorkCopy\DAAB\OleDbHelper.cs:486 DataAccess.DALUserLogins.FindUserByName(OleDbConnection conn, String username) in D:\mydotnet\WorkCopy\TemplateCompile\DALUserLogins.cs:122 TemplateCompile._Default.btnLogin_Click(Object sender, EventArgs e) in D:\mydotnet\WorkCopy\TemplateCompile\Default.aspx.cs:32 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +115 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +140 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +29 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2981
Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927
在网络上搜索了半天,暂时没有找到答案,然后想是不是没有装MDAC,但是已经装了Sql Server 2008的客户端,这个oledb的驱动没有可能不随Sql Server 2008的客户端安装的。还是从IIS上找原因。记得该程序是在32位操作系统上编译的,这个问题可能与32位有关,而当前系统是64位的。于是在IIS管理器里面找与32兼容有关的设置。找来找去,终于找到点眉目:
首先找到该站点所对应的应用程序池:
再找到该应用程序池的高级设置:
将”Enable 32 Bit Applications”打开。再将此应用程序池重启一下。发现上述问题就解决了。
相关文章推荐
- 在windows64位服务器上运行windows32位机器上开发的asp.net应用程序
- 配置IIS在64位Windows上运行32位ASP.NET应用程序
- 在windows应用程序中运行asp.net程序的几个问题
- 配置IIS在64位Windows上运行 32 位 ASP.NET 应用程序
- 在windows应用程序中运行asp.net程序的中文乱码问题
- 64位Windows操作系统部署ASP.NET Web应用常见问题
- 64位windows上启用32位asp.net方法与工具
- ASP.NET项目中在64位环境下运行32位dll的配置
- 64位系统运行32位asp.net程序iis配置
- IIS6+64位系统 VS 32位APP 在64位机器上运行32位版本的ASP.NET 2.0.****
- Sqlite在32位和64位Windows操作系统上运行的问题
- ASP 32位程序运行与64位问题:ADODB.Connection 错误 '800a0ea9' 未指定提供程序,也没有指派的默认提供程序。
- Win7中64位IIS运行32位Asp.net提示错误:未能加载文件或程序集或它的某一个依赖项,系统找不到指定的文件(已解决)
- 64位windows上启用32位asp.net方法与工具
- 64位Win7 IIS7运行 32位Asp.Net出错
- asp.net在32位与64位的平台上运行设置
- 64位的系统可以让IIS在32位的环境下运行asp.net程序(转)
- 64位Win7 IIS7运行 32位Asp.Net出错
- 64位操作系统(Windows 2008 R2 X64)ASP.NET 调用32位Excel,word 出现401 – 未授权: 由于凭据无效,访问被拒绝。
- 64为操作系统,64位IIS,运行32位应用程序的问题