M
mdhaman
Hi
I have a ASP.Net 2.0 web site which dowloads the "#" delimited file from
FTP server and drop it onto a UNC share. This file is then loaded into a
dataset using Microsoft Jet 4.0 OleDB provider.
constr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\temp;Extended
Properties=""Text;HDR=Yes;FMT=Delimited"";"
oCon = New System.Data.OleDb.OleDbConnection(constr)
oAdp = New System.Data.OleDb.OleDbDataAdapter("Select * from test.csv",
oCon)
WeatherDs = New DataSet
oAdp.Fill(WeatherDs)
WeatherDt = WeatherDs.Tables(0)
In order to write to the UNC share I am using impersonation. The above line
of code works fine if is no impersonation, but as soon as I added the
impersonation stuff in the web.config file the code
gives me error when I try to fill the dataset (oAdp.Fill(WeatherDs)).
The OleDB Provider return "Unspecified Error"
System.Data.OleDb.OleDbException: Unspecified error
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 System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection,
ConnectionState& originalState)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset,
DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String
srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
I have given require to rights as well.... Any help appreciated...
cheers,
mayur
I have a ASP.Net 2.0 web site which dowloads the "#" delimited file from
FTP server and drop it onto a UNC share. This file is then loaded into a
dataset using Microsoft Jet 4.0 OleDB provider.
constr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\temp;Extended
Properties=""Text;HDR=Yes;FMT=Delimited"";"
oCon = New System.Data.OleDb.OleDbConnection(constr)
oAdp = New System.Data.OleDb.OleDbDataAdapter("Select * from test.csv",
oCon)
WeatherDs = New DataSet
oAdp.Fill(WeatherDs)
WeatherDt = WeatherDs.Tables(0)
In order to write to the UNC share I am using impersonation. The above line
of code works fine if is no impersonation, but as soon as I added the
impersonation stuff in the web.config file the code
gives me error when I try to fill the dataset (oAdp.Fill(WeatherDs)).
The OleDB Provider return "Unspecified Error"
System.Data.OleDb.OleDbException: Unspecified error
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 System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection,
ConnectionState& originalState)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset,
DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String
srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
I have given require to rights as well.... Any help appreciated...
cheers,
mayur