System.Data.OleDb.OleDbConnectionInternal..ctor: Unspecified error

自古美人都是妖i 提交于 2019-12-05 07:14:23

Was there any progress in finding out the solution for this issue or more stabe workaround?

I have similar problem in ASP.NET application with reading Excel file. It is only visible in production environment where many users attempt to process different XLS files on the server side. After recycling IIS service at night there are around ~200 requests (to open excel) that hang JET engine. The problem is that all subsequent attempts fail so retry logic wouldn't help much. Only IIS reset heals the problem.

From the investigation I've made there are several options to take:

  1. Switch to other library to read XLS files: Excel OLE Automation - requires Excel to be installed on server and having many requests would create many instances of Excel process that's not acceptable. 3rd party library - are any of these free?
  2. Move excel processing to separate process. Exchange data with some other format as XML.
  3. Use some sort of smart handling to control number of OLEDB open and closes going on in the process.

Any thoughts?

I had the same problem. Recyling only the application pool in IIS worked for me.

I have written sample test application - the issue is caused by a bug somewhere in the internals of .NET System.Data.OleDb.

Test VS2008 SP1 solution is published here: System.Data.OleDb bug demonstration sample.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!