vs2013 asp.net System.BadImageFormatException
2015-12-09 14:32
621 查看
The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine.
Description: An unhandled exception occurredduring the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine.
Source Error:
The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL: 1. Add a "Debug=true" directive at the top of the file that generated the error. Example: <%@ Page Language="C#" Debug="true" %> or: 2) Add the following section to the configuration file of your application: <configuration> <system.web> <compilation debug="true"/> </system.web> </configuration> Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode. Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario. |
[InvalidOperationException: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine.] System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) +1761342 System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection) +1777302 System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) +100 System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) +43 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +6296143 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +6296606 System.Data.OleDb.OleDbConnection.Open() +48 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +292 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +420 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +306 System_HumanResources_KQ_Analysis.Data_Binding() +344 System_HumanResources_KQ_Analysis.Page_Load(Object sender, EventArgs e) +247 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25 System.Web.UI.Control.LoadRecursive() +71 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3048 |
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
把程序放在windows 2008 R2 64bit的服务器上,处理Excel时出现上面的错误。
解决方法,是到服务器的打开IIS管理器。go to Application Pool,找到对应站点的池。右击Advanced setting... 参考下图,把Enable 32-Bit Application 设为由False 为True。
相关文章推荐
- ASP.NET Web API 应用教程(一) ――数据流使用
- but no declaration can be found for element 'aop:aspectj-autoproxy'.
- ASP.NET Web API 应用教程(一) ——数据流使用
- ASP.NET MVC 实现与SQLSERVER的依赖缓存
- ASP.NET状缓存Cache的应用-提高数据库读取速度
- MVC6 (ASP.NET5) 认证 (Asp.net identity) cookie模式 自定义认证
- 阿里云ESC(Windows Server 2012 40G系统盘+10G数据盘)搭建IIS+ASP.NET运行环境详解
- .NET中First,FirstOrDefault,Single,SingleOrDefault
- ASP.NET中JSON的序列化和反序列化
- 树莓派(raspberry)启用root账户
- linkbutton的点击事件,在asp.net后台无法取到百度编辑器的值
- ASP.NET弹出消息框、确认框的代码
- 21、ASP.NET MVC入门到精通——ASP.NET MVC4优化
- Asp.net带Iframe的页面跳转解决方案
- asp.net生成二维码
- ASP.NET MVC 下拉列表使用小结
- 从JSP,ASP等动态页面生成静态页面的实现方式
- ASP.NET Excel数据导入数据库
- ASP.NET Web API 应用教程(一) ——数据流使用
- ASP连接MySQL数据库