Microsoft IIS
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsSystem AdministrationMicrosoft IIS

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old February 15th, 2004, 07:32 AM
bjmcintosh bjmcintosh is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 2 bjmcintosh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question IIS 5.1 dsn-less database probs

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

Reply With Quote
  #2  
Old February 15th, 2004, 09:28 AM
Doug G Doug G is offline
Grumpier Old Moderator
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Sep 2003
Posts: 10,143 Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 4 Days 21 h 28 m 48 sec
Reputation Power: 180
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

Reply With Quote
  #3  
Old February 17th, 2004, 01:42 PM
bjmcintosh bjmcintosh is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 2 bjmcintosh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #4  
Old February 17th, 2004, 09:02 PM
Doug G Doug G is offline
Grumpier Old Moderator
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Sep 2003
Posts: 10,143 Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 4 Days 21 h 28 m 48 sec
Reputation Power: 180
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.

Reply With Quote
Reply

Viewing: ASP Free ForumsSystem AdministrationMicrosoft IIS > IIS 5.1 dsn-less database probs


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway