Win7 ASP连接数据库“未找到提供程序.该程序可能未正确安装”问题
更新时间:2012年01月08日 18:42:18 作者:
今天调试了基于Access数据库的ASP应用,没想到IIS7报错,提示ADODB.Connection 错误 '800a0e7a' 未找到提供程序。该程序可能未正确安装
ASP连接数据库的连接字符串是Provider=Microsoft.Jet.OLEDB.4.0; Data Source=路径,采用的是OleDB方式连接,问题可能就出在OleDB方式连接这一环节上。
后来搜索网络得到了解决的办法 。原来是自己装的64位Windows 7系统的原因,默认64位环境下,IIS应用程序池未启用32位应用程序,我们只需要启用一下就可以了。打开IIS 7,定位到“应用程序池”,然后选择使用OleDB方式连接数据库的程序池,然后将启用32位应用程序设置为True就可以了。
Using MyODBC with ASP.NET in IIS7 on Vista x64
That's a heck of a title, but it's a problem I hit recently. I have a bunch of ASP.NET sites that use MySQL as their datastore, but I hadn't tried the on IIS7 yet. It took a while to get them to work at all (I had to set permissions on web.config and the other website files so that they could be read by both the Users group and the IIS_IUSRS group), but then I was left with an error about my MySQL connection. “ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified” – another very general error that basically means “Something is wrong with your ODBC driver, somewhere.”
After some searching, I learned two things. The first is that if you're running 64-bit you can't use the standard ODBC Data Source Administrator in Administrative Tools with MySQL. You've got to go to C:\Windows\SysWOW64\odbcad32.exe and set up your DSN, if that's your thing. The other thing is that the MyODBC driver is 32-bit only. So to use it at all, you need to make sure you're calling it from 32-bit apps only. That means you've got to tweak the Application Pool you're using to run all its ASP.NET applications as 32-bit. To do this, go to Administrative Tools > Internet Information Services (IIS) Manager (or just hit the Windows key and type “IIS”). Then go to “Application Pools” and select whichever application pool your ASP.NET app uses (or create a new one just for your MySQL apps. Click “Advanced Settings…” and set “Enable 32-Bit Applications”. Now the AppPool will use the 32-bit .NET CLR to run your app, and it'll be able to see your MyODBC driver (whether you use a DSN or not).
后来搜索网络得到了解决的办法 。原来是自己装的64位Windows 7系统的原因,默认64位环境下,IIS应用程序池未启用32位应用程序,我们只需要启用一下就可以了。打开IIS 7,定位到“应用程序池”,然后选择使用OleDB方式连接数据库的程序池,然后将启用32位应用程序设置为True就可以了。
Using MyODBC with ASP.NET in IIS7 on Vista x64
That's a heck of a title, but it's a problem I hit recently. I have a bunch of ASP.NET sites that use MySQL as their datastore, but I hadn't tried the on IIS7 yet. It took a while to get them to work at all (I had to set permissions on web.config and the other website files so that they could be read by both the Users group and the IIS_IUSRS group), but then I was left with an error about my MySQL connection. “ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified” – another very general error that basically means “Something is wrong with your ODBC driver, somewhere.”
After some searching, I learned two things. The first is that if you're running 64-bit you can't use the standard ODBC Data Source Administrator in Administrative Tools with MySQL. You've got to go to C:\Windows\SysWOW64\odbcad32.exe and set up your DSN, if that's your thing. The other thing is that the MyODBC driver is 32-bit only. So to use it at all, you need to make sure you're calling it from 32-bit apps only. That means you've got to tweak the Application Pool you're using to run all its ASP.NET applications as 32-bit. To do this, go to Administrative Tools > Internet Information Services (IIS) Manager (or just hit the Windows key and type “IIS”). Then go to “Application Pools” and select whichever application pool your ASP.NET app uses (or create a new one just for your MySQL apps. Click “Advanced Settings…” and set “Enable 32-Bit Applications”. Now the AppPool will use the 32-bit .NET CLR to run your app, and it'll be able to see your MyODBC driver (whether you use a DSN or not).
相关文章
win2003 关闭不需要的数据库服务 禁止不用的web服务扩展的方法 图文
主机默认装有的数据库有SQL Server 2005和MySQL等,服务默认都是启用的,启用中对CPU的使用和内存的使用都很大,如果主机中不需要数据库或者不需要某一个数据库可以对其服务进行停止2012-04-04本地远程Windows服务器远程桌面不能相互复制粘贴的两种解决方案
这篇文章主要给大家分享了本机远程Windows服务器远程桌面不能相互复制粘贴的两种解决方案,对我们解决问题有一定的帮助,需要的朋友可以参考下2023-08-08Windows下安装php7提示VCRUNTIME140.DLL
windows服务器安装php环境推荐使用护卫神·PHP套件。笔者目前遇到一台旧的windows服务器已经安装使用php5.2,想安装php7.1,为了不影响php5.2的正常使用,选择手动安装php7.1。记录遇到的一些问题,包括提示丢失VCRUNTIME140.DLL。2023-06-06Win7/Windows2003下IIS6.0、IIS7.5的伪静态组件安装和伪静态配置方法
Win7/Windows2003下IIS6.0、IIS7.5的伪静态组件安装和伪静态配置方法,还包括常用的伪静态规则使用方法2012-01-01asp.net RewritePath重定向HTTP头Content-Location暴露真实路径解决方法
这篇文章主要介绍了asp.net RewritePath重定向HTTP头Content-Location暴露真实路径解决方法,需要的朋友可以参考下2016-07-07IIS7.0、IIS7.5、IIS8.0等提示“请求筛选模块被配置为拒绝包含双重转义序列的请求”的解决方法小结
这篇文章主要介绍了访问网站时提示请求筛选模块被配置为拒绝包含双重转义序列的请求错误的解决方法,需要的朋友可以参考下2016-09-09
最新评论