I have developed web application using Asp.net and Ms access database while developing in visual studio 2020 it working fine
once after hosting in IIS server i am getting below-mentioned error some time
still its working sometime client page client they can use all the functionality which not use database
once I start the IIS Web server they can able to access all the functionality
IIS version 7.0
.net version 4.5
Ms access 2007
Message: Unspecified error
StackTrace: at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionInternal.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.OleDb.OleDbConnection.Open()
at ncs2.dbcon.constate() in ....\leave_admin.aspx.cs:line 28
Source: Microsoft Office Access Database Engine
TargetSite: Void .ctor(System.Data.OleDb.OleDbConnectionString, System.Data.OleDb.OleDbConnection)

Jerald Jayaraj DPosted Oct 6, 2020, 12:34 AM
{
public static string connstring = ConfigurationManager.ConnectionStrings["dbcon"].ConnectionString;
public static OleDbConnection con = new OleDbConnection();
public static void constate()
{
try
{
con = new OleDbConnection(connstring);
if (con.State != ConnectionState.Open)
{
con.Open();
}
else if(con.State==ConnectionState.Closed)
{
con.Open();
}
}
catch (Exception ex)
{
Logfile.LogError(ex);
string conerror= con.State.ToString();
Logfile.Errorcon(conerror);
}
}
Sachin SinghPosted Oct 5, 2020, 10:06 AM
Go to IIS -> select your application pool -> Advanced Setting -> Process Model ->Identity=ApplicationPoolIdentity
Go to IIS -> select your application pool -> Advanced Setting -> Load User Profile = False