|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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?
|
|
#3
|
|||
|
|||
|
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 |
|
#4
|
|||
|
|||
|
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 |
|
#5
|
|||
|
|||
|
change UID?
Hmm...maybe because my UID=admin in the DSN and the UID=adminemail, I should change that. Will try it. Thanks
|
|
#6
|
|||
|
|||
|
I changed it, but to no avail. damn! Help anybody?!
|
|
#7
|
|||
|
|||
|
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. |
|
#8
|
|||
|
|||
|
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 |
|
#9
|
|||
|
|||
|
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 |
|
#10
|
|||
|
|||
|
Thanks. I will give it a try, and let you know what it comes up with.
|
|
#11
|
|||
|
|||
|
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
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > problem running ASP login script on PWS |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|