ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

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 Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old July 18th, 2003, 11:52 AM
subhashls subhashls is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Florida
Posts: 13 subhashls User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to subhashls Send a message via Yahoo to subhashls
problem running ASP login script on PWS

Hi,

I am trying to run an ASP script (a login script) using IIS on winxp pro. I know the script works because it works when I upload it online, but when I try to run it from home, it doesnt do anything. I tried running another ASP script that retrieves information from an access database, and it worked, but when I try this one, nothing happens. If there is an error, it shows that, but nothing happens if you use the code right. I am totally confused. Here is the code I am using:

Conn.asp:
<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "FILEDSN=c:\dsn\mailing.dsn"
%>

m_log.asp:
<!-- #include file="Conn.asp" -->
<%
uid = Request.Form("uid")
pwd = Request.Form("pwd")

SQL = "Select adminemail, passw From standard Where adminemail = '" & uid & "' And passw = '" & pwd & "'"
Set RS = Conn.Execute(SQL)

If Not RS.EOF Then
Session("listadmin") = True
Set RS = Nothing
Conn.Close
Response.Redirect "index.asp"
Else
Set RS = Nothing
Conn.Close
Response.Redirect "login.htm"
End If
%>

I have tried to use both a DSN and DSN-Less connection for Conn.asp
When I put the default login/password, nothing happens at all. Any thoughts? Thanks

Reply With Quote
  #2  
Old July 18th, 2003, 03:51 PM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 12th Plane (10500 - 10999 posts)
 
Join Date: Jun 2003
Posts: 10,712 Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 4 Weeks 1 Day 23 h 47 m 6 sec
Reputation Power: 688
Are you sure there is data in your database? Is the file dsn present on your computer and edited to match your local computer's file locations?

Reply With Quote
  #3  
Old July 18th, 2003, 04:05 PM
subhashls subhashls is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Florida
Posts: 13 subhashls User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to subhashls Send a message via Yahoo to subhashls
Hi,

Thank you for your reply. Yes, I am sure there is data in the database. Like I said, it works online. The file dsn is present on my computer and it is pointing to the location of the database. What did you mean by "edited to match your local computer's file locations?" ? Is there something extra I should do? Thanks again

Reply With Quote
  #4  
Old July 18th, 2003, 04:44 PM
subhashls subhashls is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Florida
Posts: 13 subhashls User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to subhashls Send a message via Yahoo to subhashls
code in my DSN file

I dont know if this will help, but here is the code in the DSN file I made:

[ODBC]
DRIVER=Microsoft Access Driver (*.mdb)
UID=admin
UserCommitSync=no
Threads=3
SafeTransactions=0
PageTimeout=5
MaxScanRows=8
MaxBufferSize=2048
FIL=MS Access
DriverId=25
DefaultDir=C:\Inetpub\wwwroot\list
DBQ=C:\Inetpub\wwwroot\list\list.mdb

The DefaultDir and DBQ values are both correct. Thanks

Reply With Quote
  #5  
Old July 18th, 2003, 04:46 PM
subhashls subhashls is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Florida
Posts: 13 subhashls User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to subhashls Send a message via Yahoo to subhashls
change UID?

Hmm...maybe because my UID=admin in the DSN and the UID=adminemail, I should change that. Will try it. Thanks

Reply With Quote
  #6  
Old July 18th, 2003, 06:22 PM
subhashls subhashls is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Florida
Posts: 13 subhashls User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to subhashls Send a message via Yahoo to subhashls
I changed it, but to no avail. damn! Help anybody?!

Reply With Quote
  #7  
Old July 18th, 2003, 10:00 PM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 12th Plane (10500 - 10999 posts)
 
Join Date: Jun 2003
Posts: 10,712 Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 4 Weeks 1 Day 23 h 47 m 6 sec
Reputation Power: 688
I was referring to the physical file locations in the file dsn. I assume the path in the dsn file matches the actual location of your database file.

You can inject some selected "response.write" statements to help debug. For example, you can add a response.write SQL to see what the actual sql you're going to send to tha database looks like.

Reply With Quote
  #8  
Old July 19th, 2003, 01:58 PM
subhashls subhashls is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Florida
Posts: 13 subhashls User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to subhashls Send a message via Yahoo to subhashls
Thanks for your reply. Yes, the path in the DSN file matches the actual location of your database file. What would those selected "response.write" statements be? Thanks

Subhash

Reply With Quote
  #9  
Old July 19th, 2003, 04:28 PM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 12th Plane (10500 - 10999 posts)
 
Join Date: Jun 2003
Posts: 10,712 Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 4 Weeks 1 Day 23 h 47 m 6 sec
Reputation Power: 688
Something like this:

SQL = "Select adminemail, passw From standard Where adminemail = '" & uid & "' And passw = '" & pwd & "'"
response.write SQL
Set RS = Conn.Execute(SQL)

If Not RS.EOF Then
Session("listadmin") = True
Set RS = Nothing
Conn.Close
Response.Redirect "index.asp"
Else
response.write "Oops, no login record"
Set RS = Nothing
Conn.Close
Response.Redirect "login.htm"
End If
%>

Don't forget to remove these debug statements when you fix the problem.
__________________
======
Doug G
======
"Hide, hide witch! The good folk come to burn thee. Their keen enjoyment hid behind their gothic mask of duty." -Mark Clifton

Reply With Quote
  #10  
Old July 19th, 2003, 04:48 PM
subhashls subhashls is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Florida
Posts: 13 subhashls User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to subhashls Send a message via Yahoo to subhashls
Thanks. I will give it a try, and let you know what it comes up with.

Reply With Quote
  #11  
Old July 19th, 2003, 08:10 PM
subhashls subhashls is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Florida
Posts: 13 subhashls User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to subhashls Send a message via Yahoo to subhashls
I added the two debug statements, and when I tried to login again, the same thing happend. It looked like it was just refreshing login.htm, but it did not give me anything after writing the response.write statements. Any ideas? Thanks in advance

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > problem running ASP login script on PWS


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 |