Win7 ASP連接數(shù)據(jù)庫(kù)“未找到提供程序.該程序可能未正確安裝”問題
后來(lái)搜索網(wǎng)絡(luò)得到了解決的辦法 。原來(lái)是自己裝的64位Windows 7系統(tǒng)的原因,默認(rèn)64位環(huán)境下,IIS應(yīng)用程序池未啟用32位應(yīng)用程序,我們只需要啟用一下就可以了。打開IIS 7,定位到“應(yīng)用程序池”,然后選擇使用OleDB方式連接數(shù)據(jù)庫(kù)的程序池,然后將啟用32位應(yīng)用程序設(shè)置為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).
- 完美解決ASP 不能更新。數(shù)據(jù)庫(kù)或?qū)ο鬄橹蛔x。
- ASP連接SQL2005數(shù)據(jù)庫(kù)連接代碼
- asp中用insert into語(yǔ)句向數(shù)據(jù)庫(kù)插入記錄(添加信息)的方法
- ASP連接Access數(shù)據(jù)庫(kù)的幾種方法
- ASP.NET web.config中數(shù)據(jù)庫(kù)連接字符串connectionStrings節(jié)的配置方法
- C#和asp.net中鏈接數(shù)據(jù)庫(kù)中參數(shù)的幾種傳遞方法實(shí)例代碼
- ASP.NET連接MySql數(shù)據(jù)庫(kù)的2個(gè)方法及示例
- ASP獲取數(shù)據(jù)庫(kù)表名、庫(kù)名、字段名的方法
- asp.net中EXCEL數(shù)據(jù)導(dǎo)入到數(shù)據(jù)庫(kù)的方法
- 淺談ASP數(shù)據(jù)庫(kù)下載漏洞
相關(guān)文章
數(shù)據(jù)庫(kù)寫不進(jìn)去IIS寫入權(quán)限怎么設(shè)置
后臺(tái)內(nèi)容無(wú)法更新,如基本設(shè)置保存不了,數(shù)據(jù)庫(kù)寫不進(jìn)去,很有可能是Everyone權(quán)限問題,即Everyone 無(wú)權(quán)操作文件夾,按照下面的步驟操作即可2014-05-05Win7/Windows2003下IIS6.0、IIS7.5的偽靜態(tài)組件安裝和偽靜態(tài)配置方法
Win7/Windows2003下IIS6.0、IIS7.5的偽靜態(tài)組件安裝和偽靜態(tài)配置方法,還包括常用的偽靜態(tài)規(guī)則使用方法2012-01-01cwrsync實(shí)現(xiàn)從linux到windows的數(shù)據(jù)同步備份
rsync是Linux系統(tǒng)下的數(shù)據(jù)鏡像備份工具,從軟件的命名上就可以看出來(lái)了——remote sync。rsync支持大多數(shù)的類Unix系統(tǒng),無(wú)論是Linux、Solaris還是BSD上都經(jīng)過了良好的測(cè)試。2008-09-09基于Win2008 R2的WSFC實(shí)現(xiàn) SQL Server 2012高可用性組(AlwaysOn Group)
SQL Server 2012高可用性組在實(shí)現(xiàn)過程中較之早起的SQL Server故障轉(zhuǎn)移群集來(lái)講,不依賴特別提供共享存儲(chǔ)磁盤陣列,每個(gè)節(jié)點(diǎn)獨(dú)立存儲(chǔ)一份數(shù)據(jù)庫(kù)的副本2013-06-06Win2008 網(wǎng)絡(luò)策略設(shè)置方法 讓訪問更安全
在局域網(wǎng)環(huán)境中,許多普通工作站由于沒有及時(shí)安裝系統(tǒng)補(bǔ)丁程序或者沒有更新病毒庫(kù),導(dǎo)致對(duì)應(yīng)系統(tǒng)可能存在很多安全隱患,當(dāng)這些工作站嘗試訪問局域網(wǎng)網(wǎng)絡(luò)時(shí),可能會(huì)給整個(gè)網(wǎng)絡(luò)的安全帶來(lái)比較大的威脅。2011-06-06Windows Server 2008 r2服務(wù)器無(wú)故自動(dòng)重啟故障的解決方法
Windows Server 2008服務(wù)器自動(dòng)重啟!登陸服務(wù)器之后,隨便做什么操作,一兩分鐘服務(wù)器就自動(dòng)重啟,這里就給大家分享一下解決方法2020-02-02Windows Server 2008 R2 下配置TLS1.2添加自簽名證書的圖文教程
這篇文章主要介紹了Windows Server 2008 R2 下配置TLS1.2添加自簽名證書的圖文教程,非常不錯(cuò),具有參考借鑒價(jià)值,需要的朋友參考下吧2016-12-12windows server 2008 R2 禁用ipv6和隧道適配器
這篇文章主要介紹了windows server 2008 R2 禁用ipv6和隧道適配器,需要的朋友可以參考下2015-09-09IIS 6.0 安裝與網(wǎng)站架設(shè)教程[圖文]
IIS是微軟推出的一套架設(shè)WEB、FTP、SMTP服務(wù)器的整合系統(tǒng)組件,主要捆綁在微軟的Windows 2003等服務(wù)器操作系統(tǒng)中2013-05-05安裝服務(wù)器常見組件之ISAPI_Rewrite組件圖文安裝教程
本教程共分八篇:系統(tǒng)安裝與設(shè)置篇、軟件安裝與設(shè)置篇、文件及文件夾權(quán)限篇、系統(tǒng)服務(wù)篇、安全策略篇、系統(tǒng)組件篇、注冊(cè)表篇、軟件安全篇。本篇討論的是第二篇軟件安裝與設(shè)置篇的第五部分:安裝常見組件之ISAPI_Rewrite組件安裝圖解。2010-05-05