Hello,
When your writing SharePoint Custom solutions for file upload or importing excel file data into SharePoint list.If you get the below error.
When your writing SharePoint Custom solutions for file upload or importing excel file data into SharePoint list.If you get the below 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()"
Solution:
Go to Web.Config file of your SharePoint Web Application application.The location of web.Config File is looks like this .C:\inetpub\wwwroot\wss\VirtualDirectories\80\web.config. My Web application port number is 80 so I am navigating to above Folder. Check you Web Application port number and navigate to Web.Config file folder.
Then Open Web.Config File and Find The below Tags as shown below.By default Impersonate will be set to true so you neeed to change it to false as shown in below screen shot:
More about Impersonation:
Impersonation, a feature that was added in Windows SharePoint Services 3.0, enables you to perform actions on behalf of another user. Impersonation is useful in scenarios such as timer operations that need to update something asynchronously on behalf of a user long after the user has stopped using the Web site (that is, when their workflow is completed).
Thanks for Reading!
Hope Your Issue Resolved!
Regards,
Kiny :)