简体   繁体   中英

reading excel error on configuring IIS of running asp.net application

I am running my asp.net application on Window Server 2008.

IF I enable x86 application on ISS, it is running fine with excel 2003 files: xls

But then I got a problem of running excel 2007: (Microsoft.ACE.OLEDB.12.0). If I switch it back to x64 mode, then it is running fine with excel 2007.

So, how I config it or install something on my server in order to run both?

Thanks in advance.

If you compiled your app for "Any CPU" it will run as a 32bit process when you set IIS to enable 32bit applications. Once your app is running as a 32 bit process, any DLLs it needs to use during execution will be expecting to see 32bit binaries; It will not be able to chop and change between 32/64 bit images once the process is running. So, i suspect you need a 32 bit install of Excel 2007.

我通过始终将Excel 2007用于Excel 2003和Excel 2007来解决了该问题,并且它可以正常工作。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM