开发者

iis 7.5 not honoring global.asa session connection; What configuration change do I need to make?

开发者 https://www.devze.com 2023-03-04 03:45 出处:网络
What configuration change do I need to make? Hello, recently upgraded my laptop to windows7, I pulled down our site from subversion to make some updates.I always test the changes on localhost before I

What configuration change do I need to make? Hello, recently upgraded my laptop to windows7, I pulled down our site from subversion to make some updates. I always test the changes on localhost before I move them to our beta site. Now, I was able to set up IIS on windows 7 to run our site, but it seems only the non-dynamic asp pages are working. Any page that tries to connect to the DB returns an error message.

Microsoft OLE DB Provider for ODBC Drivers error '80040e4d'

[Microsoft][SQL Native Client][SQL Server]Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.

/include/chooseyear.inc, line 15

Here is the Global.asa file

'Added Lock to Session Onstart to protect Current Ye开发者_StackOverflowar variable ' from becoming corrupted

If isEmpty(Application("CURRENT_YEAR"))

then Application.lock Application("CURRENT_YEAR") = Year(now()) Application.Unlock END IF 'Doug Chamberlain 'continue to use ODBC connection to access data

Session("DBConnection")= "DSN=WITHHELD;UID=USER_NAME_WITHHELD;PWD=PASSWORD_WITHHELD;DATABASE=master;APP=www"

      Session("ConnectionTimeout") = 120  
      Session("CommandTimeout") = 102         'Doug Chamberlain       '09/10/2010

Update:

Here is the line of code that fails. but worked prior to upgrading to windows 7 and IIS7.5 PropConnection.Open Session("SCPAASPConnection")

I did a debug on the website when it failed, and the value of that variable is "DSN=WITHHELD;UID=USER_NAME_WITHHELD;PWD=PASSWORD_WITHHELD;DATABASE=master;APP=www"

but the error message is the same as below, it seems to just ignore the user/pass in the connection string variable. I did get the site to work slightly better by turning on windows auth & anonymous auth. However, other things break when I do that. Like the link scanner I use.


This isn't anything to do with ASP, as all ASP pages are dynamic (in that they will be parsed through by IIS), from what you're saying (and from the error message), it's only the ones with a database connection in that are failing.

This is because the user account the IIS application pool process runs under by default would not have access on the SQL box. You could add a SQL login for that account, or if it's only a local machine you're running it on then just change the app pool identity to run as NetworkService.

In IIS, select the app pool for the site, click Edit Application Pool > Advanced Settings and change Process Model > Identity from ApplicationPoolIdentity to NetworkService.

0

精彩评论

暂无评论...
验证码 换一张
取 消