A case of 32-bit asp.net application running on 64-bit Windows

Source: Internet
Author: User
Document directory
  • Server Error in '/'application.

Previously, the asp.net application compiled in 32-bit Windows 2008 was deployed in 64-bit Windows. After the application is deployed, the homepage can be run, however, this application also uses oledb to access the access database. the following error message is displayed:

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

After searching for half a day on the internet, I could not find the answer for the moment. Then I wondered if MDAC was not installed, but the SQL Server 2008 client was installed, the oledb driver may not be installed with the SQL Server 2008 client. Or find the reason from IIS. Remember that the program was compiled on a 32-bit operating system. This problem may be related to 32-bit, while the current system is 64-bit. In the IIS manager, find the settings related to 32 compatibility. Find it, and finally find the eye:

First, find the application pool corresponding to the site:

Find the advanced settings of the application pool:

Open Enable 32 Bit Applications. Restart the application pool. The above problems are solved.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.