Having a problem importing an excel document after moving an asp.net 2.0 application to another server.
It worked fine before moving it and I suspect it's a permissions problem on a TEMP directory
Here's the error:
System.Data.OleDb.OleDbException: The Microsoft Jet database engine cannot open the file 'C:\Documents and Settings\DEXTERDR\Desktop\Stock Options Template ROW Dec 2005.xls'. It is already opened exclusively by another user, or you need permission to view its data.
at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.OleDb.OleDbConnection.Open()
at odsExcel.getEmpExcelData() in c:\Inetpub\wwwroot\OptionSys\App_Code\odsExcel.cs:line 65System.Data.OleDb.OleDbException: The Microsoft Jet database engine cannot open the file 'C:\Documents and Settings\DEXTERDR\Desktop\Stock Options Template ROW Dec 2005.xls'. It is already opened exclusively by another user, or you need permission to view its data.
at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.OleDb.OleDbConnection.Open()
at odsExcel.getEmpExcelData() in c:\Inetpub\wwwroot\OptionSys\App_Code\odsExcel.cs:line 65System.Data.OleDb.OleDbException: The Microsoft Jet database engine cannot open the file 'C:\Documents and Settings\DEXTERDR\Desktop\Stock Options Template ROW Dec 2005.xls'. It is already opened exclusively by another user, or you need permission to view its data.
at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.OleDb.OleDbConnection.Open()
at odsExcel.getEmpExcelData() in c:\Inetpub\wwwroot\OptionSys\App_Code\odsExcel.cs:line 65System.Data.OleDb.OleDbException: The Microsoft Jet database engine cannot open the file 'C:\Documents and Settings\DEXTERDR\Desktop\Stock Options Template ROW Dec 2005.xls'. It is already opened exclusively by another user, or you need permission to view its data.
at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.OleDb.OleDbConnection.Open()
at odsExcel.getEmpExcelData() in c:\Inetpub\wwwroot\OptionSys\App_Code\odsExcel.cs:line 65System.Data.OleDb.OleDbException: The Microsoft Jet database engine cannot open the file 'C:\Documents and Settings\DEXTERDR\Desktop\Stock Options Template ROW Dec 2005.xls'. It is already opened exclusively by another user, or you need permission to view its data.
at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.OleDb.OleDbConnection.Open()
at odsExcel.getEmpExcelData() in c:\Inetpub\wwwroot\OptionSys\App_Code\odsExcel.cs:line 65System.Data.OleDb.OleDbException: The Microsoft Jet database engine cannot open the file 'C:\Documents and Settings\DEXTERDR\Desktop\Stock Options Template ROW Dec 2005.xls'. It is already opened exclusively by another user, or you need permission to view its data.
at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.OleDb.OleDbConnection.Open()
at odsExcel.getEmpExcelData() in c:\Inetpub\wwwroot\OptionSys\App_Code\odsExcel.cs:line 65odsExcel.csgetEmpExcelData.csgetEmpExcelData.csgetEmpExcelData.csgetEmpExcelData.csgetEmpExcelData.csgetEmpExcelData.cs
Tried changing the permissions on:
C:\Documents and Settings\<machine name >\ASPNET\Local Settings\Temp
to include
IUSER_MACHINENAME
IWAM_MACHINENAME
ASPNET already has full rights..
Thanks!
Doug