|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
I have just started to use IIS 5.1 on a local XP machine. I am a newbie at IIS admin, but have played with a lot of ASP and HTML with other hosting providers. I have a live web site with some asp that is coming up with errors and I wanted to run the sites locally to see if I can see where the problems are.IIS 5.1 has been loadd with its default settings, and I have published the web site to the local web site location using FrontPage. Everything went OK. ASP is running, and the publish process went smoothly. I tried some of the scripts that have some database access locally and got a few errors due to relative file location problems in the connection string - cannot find the database file sort of errors - those I understand. But, the problem comes up when I try a DSN-less connection and I am 99 % sure I have the correct path to the database. Acessing the asp page with the database script simply hangs there - no errors, nothing. I thought this was a problem with databases in general, so I tried to access the same database with the 'database results' feature in FrontPage - which worked fine. I was able to access and see the data fine. This means that the database is in a folder with the proper access rights, etc. But, going back to the page where I have my own DSN-less connection string, it doesn't work. I have 2 scripts that seem to have this behavior. These were scripts from the WWW - #1 is a commercial script, the other a freebie. These both worked on the commercial online server. The connection strings are as follows: #1 strConn = "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("fpdb/calendar.mdb") Set dbc = Server.CreateObject("ADODB.Connection") dbc.open strConn #2 'Set the variable to hold an ADO connection Set adoCon = Server.CreateObject("ADODB.Connection") '------------------------------------------------------------------------------------ 'Change this value to the path of the database strDataBasePath = "../wwwroot/fpdb/users.mdb" '------------------------------------------------------------------------------------ 'Connection string for the database 'If the following line does not work comment it out with a ' at the start of the line and uncomment another string cString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(strDataBasePath) 'Uncomment this connection string if you are using Access Database 2000 or 2002 'cString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath(strDataBasePath) 'Uncomment this connection string if you are using a DSN (note: DSN is slower than the above connection strings) 'cString = "DSN=NAME_OF_DSN" 'Replace the NAME_OF_DSN with the DSN 'Request the users details 'Set the variable to the value in the users cookie str_userscode = Request.cookies("Login")("userCode") 'If the users code is not empty then IF str_userscode <> "" THEN 'Create a new record set set rsUserLog = server.createobject("ADODB.RecordSet") 'Set the new sql string StrSql="SELECT * FROM tbl_authors WHERE code='" & str_userscode & "';" 'Open the recordset and execute the sql rsUserLog.open StrSql,cString ------------------------------ I am looking for any suggestions as to what I can check to track this problem down. I have done the following already: - reinstalled IIS - looked in the error logs with the even viewer. Are there any other IIS specific or FP specific error logs I should look at? Thanks in advance, Brian |
|
#2
|
|||
|
|||
|
If you are running norton script blocking turn it off
Also try disabling any firewall software for testing purposes. You could look in the system event log (in administrative tools on XP) and see if any errors are logged. Script blocking is one of the common reasons for your symptoms, though.
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
|
#3
|
|||
|
|||
|
Doug:
Thanks a bunch - I had Norton script blocking on. I also had Zone Alarm enables as well - I figured since I was not going outside the machine, Zone Alarm would not be a problem. Can you tell me what script blocking would have to do with this behaviour? Maybe I can actually learn something from this Cheers, Brian |
|
#4
|
|||
|
|||
|
I'm not 100% sure why it happens, but script blocking is designed to intercept and prevent vbscript and javascript code from hurting your computer. asp code is typically either vbscript or jscript, and when you are running the asp code on your own computer Norton seems to think it's a foreign untrusted script and prevents it from executing.
|
![]() |
| Viewing: ASP Free Forums > System Administration > Microsoft IIS > IIS 5.1 dsn-less database probs |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|