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.