網站之前運行一直很正常,但有一次用戶在導入格式為xls的excel文件,發生了錯誤,跟蹤錯誤后拋出如下的異常:

錯誤提示:
未處理System.Data.OleDb.OleDbException HResult=-2147467259 Message=外部數據庫驅動程序 (1) 中的意外錯誤。
原因:
由於微軟在2017-10-10更新了安全補丁(
KB4041678,
KB4041681),兩個補丁的更新內容中,都包含有這個更新內容(Security updates to Microsoft Windows Search Component, Windows kernel-mode drivers, Microsoft Graphics Component, Internet Explorer, Windows kernel, Windows Wireless Networking,Microsoft JET Database Engine, and the Windows SMB Server.)。其中我們注意到,由更新了Microsoft JET Database Engine。
在補丁的下面有說此次更新會導致的問題(如下),由此我們可以知道,是這個補丁導致的問題。
Installing this update may cause applications based on theMicrosoft JET Database Engine (Microsoft Access 2007 and older or non-Microsoft applications) to fail whencreating or opening Microsoft Excel .xls files. The error message is, “Unexpected error from external database driver (1). (Microsoft JET Database Engine)".
補丁后續說會及時更新這個問題。
解決方案:
1、網上的方案是:在控制面板>程序>程序和功能>已安裝更新中,找到對應的兩個補丁,進行卸載。不同系統對應不同的補丁,具體可以參考:
http://www.cnblogs.com/net-god/p/7661313.html
2、微軟給出的解決方案是:下載新的驅動引擎(
Microsoft Access Database Engine 2010 Redistributable),更改Provider=Microsoft.Jet.OLEDB.4.0為Provider=Microsoft.ACE.OLEDB.12.0。