System.Data.OleDb.OleDbException: Unspecified error

815492_30356691If you are getting an error like the one below in your ASP.Net application when trying to open an Excel or Access file, you may need to reset IIS.

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

To reset IIS:

  • Open a command prompt on the box running IIS.
  • Issue the command: iisreset

My situation was that I had code that had previously worked, but it just stopped working one day with the error mentioned above.

Hope this helps.

Share

3 thoughts on “System.Data.OleDb.OleDbException: Unspecified error

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>