64位win Server 2003 ,读取excel错误解决方案.
2008-07-31 10:36
417 查看
使用连接字符串"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\d1.xls;Extended Properties=Excel 8.0;" 将会出现 System.InvalidOperationException: 未在本地计算机上注册“Microsoft.Jet.OLEDB.4.0”提供程序。
解决方案:
1.如果Jet引擎正常(打开"ODBC",转到“驱动程序”选项卡,有没有JET引擎),通过执行命令 cscript C:\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1 将64位的IIS转为32位方式运行,再用.Net Framework注册IIS,在IIS Web服务扩展中,激活ASP.NET v2.0.50727 (32bit),重启IIS。
FROM:
Enable 32-bit Server Applications on 64-bit Machines ASP.NET applications that use TX Text Control .NET Server must be compiled for 32-bit platforms (see this article). IIS must be configured to execute these 32-bit applications. Generally, all applications will be executed in 64-bit mode.
a). Enable IIS's 32-bit support Open a command prompt and type in the following command: cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1 This command enables the 32-bit mode in IIS. b). Install the IIS 32-bit extensions Open a command prompt and type the following command: %SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i This command installs the 32-bit web extensions for .NET Framework 2.0.
c). Activate .NET Framework 2.0 32-bit in IIS In the IIS-Manager, select the 'ASP.NET v2.0.50727 (32bit)' in the 'Web Service Extensions' panel and check 'allow' to activate it.
d). Restart the IIS by opening a command prompt: iisrestart
总的思路就是先允许IIS支持32位程序,然后再用.Net Framework注册IIS。
2.换二进制读取方式,可用第三方控件Aspose.cells.dll,这个控件不是免费的,我这里有个破解版。
Aspose.cells.dll下载
示例源码下载
解决方案:
1.如果Jet引擎正常(打开"ODBC",转到“驱动程序”选项卡,有没有JET引擎),通过执行命令 cscript C:\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1 将64位的IIS转为32位方式运行,再用.Net Framework注册IIS,在IIS Web服务扩展中,激活ASP.NET v2.0.50727 (32bit),重启IIS。
FROM:
Enable 32-bit Server Applications on 64-bit Machines ASP.NET applications that use TX Text Control .NET Server must be compiled for 32-bit platforms (see this article). IIS must be configured to execute these 32-bit applications. Generally, all applications will be executed in 64-bit mode.
a). Enable IIS's 32-bit support Open a command prompt and type in the following command: cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1 This command enables the 32-bit mode in IIS. b). Install the IIS 32-bit extensions Open a command prompt and type the following command: %SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i This command installs the 32-bit web extensions for .NET Framework 2.0.
c). Activate .NET Framework 2.0 32-bit in IIS In the IIS-Manager, select the 'ASP.NET v2.0.50727 (32bit)' in the 'Web Service Extensions' panel and check 'allow' to activate it.
d). Restart the IIS by opening a command prompt: iisrestart
总的思路就是先允许IIS支持32位程序,然后再用.Net Framework注册IIS。
2.换二进制读取方式,可用第三方控件Aspose.cells.dll,这个控件不是免费的,我这里有个破解版。
Aspose.cells.dll下载
示例源码下载
相关文章推荐
- 64位 Win Server 2008 R2 发布配置B/S程序错误解决方案
- WinServer2003 iis6 部署 .net mvc 各种奇葩错误的根本原因
- Server SQL 发布复制事物时的错误提示:读取代理器未运行 进程无法在“WIN-XXX”上执行“sp_replcmds”
- Windows Web Server 2003,2008或者64位操作系统安装sqlserver2000企业版的解决方案
- server2003 64位系统odbc读取execl问题
- Windows 2008 64位 + Office 2003 读取excel权限问题
- 【mysql】错误号码2003 can't connect to mysql server on 'localhost' (0)解决方案
- 2003 - Can connect to MySQL server on localhost (10038)mysql 读取描述文件失败 错误代码:2【亲测可用】
- windows 2003 server sp2安装vs2010出现错误解决方案
- 无法连接远程mysql 错误2003,无法连接远程winserver
- windows 2003 server 机器检查错误解决方案
- 64位机器上 DOM 找不到MicrosoftExcelApplication的解决方案及调用检索COM 类工厂中 CLSID 为...错误解决方案
- iis常见问题解决方案(404.3 Not Found;HTTP 错误 500.19 - Internal Server Error;32位无法在64位运行)
- 2003 - Can connect to MySQL server on localhost (10038)mysql 读取描述文件失败 错误代码:2【亲测可用】
- 64位机器上 DOM 找不到MicrosoftExcelApplication的解决方案及调用检索COM 类工厂中 CLSID 为...错误解决方案
- IIS服务器错误Server Application Error最有效最详细的解决方案
- 在没有安装office2010的64位系统上C#读取excel内容出现 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the loca
- HTTP 错误 500.21 - Internal Server Error 解决方案
- 问题:C#发布的项目浏览时出现“Server Application Unavailable”错误;结果:Server Application Unavailable出现的原因及解决方案小结
- Server_Virtual PC 2007在64位 win8系统兼容性解决方案;