GLOBAL.ASA不工作IIS7.5 [英] Global.ASA does not work in IIS7.5
问题描述
我已经写在旧传统的ASP的Global.asa那里曾经工作完全正常了许多项目。既然我已经安装了Windows 7 IIS7.5,没有我的项目都在工作。
I have many projects written in old classic ASP where Global.asa used to work perfectly fine. Since I have installed Windows 7 with IIS7.5, none of my projects are working.
下面是code代表的Global.asa
Below is the code for Global.asa
<Script language=vbscript runat = server>
Sub Application_OnStart()
dim objConn, connectionString
set objConn = Server.CreateObject("ADODB.Connection")
connectionString = "DSN=otsDSN; UID=admin;PWD=;"
objConn.ConnectionTimeout = 5
这个错误来自于这条线。提到许多网站,甚至IIS.Net但仍没有运气。
The error comes in this line. Have referred many websites, even IIS.Net but still no luck.
objConn.Open connectionString
Application("otsAppConn") = objConn
end Sub
由IIS抛出的误差
The error thrown by IIS is
错误80004005
/ot/admin/page1.asp,33行的并用来携带老年家庭IIS的连接字符串对象现在显示的应用程序对象的提供程序= MSDASQL.1; 而不是完整的连接字符串。
error '80004005' /ot/admin/page1.asp, line 33 and the Application object which used to carry the connection object string in older family of IIS now showing, Provider=MSDASQL.1; instead of complete connection string.
所有这些项目被列为应用IIS7.5中,我可以看到使用 APPCMD列表应用
All the projects are listed as Application in IIS7.5 which I could see using the appcmd list apps
鸭preciate,如果有人能够帮助这个..
Appreciate if someone can help on this..
推荐答案
托管在IIS长时间后,故障排除,以解决该问题。
Managed to resolve the issue after long troubleshooting in IIS.
-
转换的DSN连接提供商Microsoft Access驱动程序(的 .mdb)中,而不是Microsoft Access驱动程序(的的.mdb,* .ACCDB)
Converted the DSN connection provider to Microsoft Access Driver (.mdb) instead of Microsoft Access Driver (.mdb, *.accdb)
创建的自定义下下我的网站在IIS连接字符串
Created Connection String in IIS under my website under Custom
"/commit:MACHINENAME /section:connectionStrings /+"[connectionString='Data Source=localhost;Integrated Security=SSPI;Initial Catalog=otmasterdb;',name='otmasterdb',providerName='Provider=Microsoft.Jet.OLEDB.4.0;']"
和给连接名称相同DSN连接
and gave the Connection Name same as the DSN connection
这改变了Global.asa中的connectionStringDSN = AAA; UID =管理员; PWD =;到AAA仅通过去除后者部分上。结果,
新的code是这样的:
Changed the Global.asa connectionString from "DSN=aaa;UID=admin;PWD=;" to "aaa" only by removing the latter portion.
The new code looks like this:
Sub Application_OnStart()
dim objConn, connectionString
set objConn = Server.CreateObject("ADODB.Connection")
connectionString = "otsDSN"
objConn.ConnectionTimeout = 5
objConn.Open connectionString
Application("otsAppConn") = objConn
end Sub
这篇关于GLOBAL.ASA不工作IIS7.5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!