Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 27th, 2003, 08:21 AM
CW CW is offline
Authorized User
 
Join Date: Sep 2003
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default Authentication Problem

Hi experts.

I have created a website with an auhentication feature. It had been working until i stopped IIS server one time and re-estarted, then authentication is not working at all. Without authentication, every thing is OK. I really WONDER :-).

This is the code of the loginverification.asp.

---------------------------------------------------------------------

 <%
  Dim strSQL
  Dim objRS
  Dim objConn
  Set objConn = Server.CreateObject("ADODB.Connection")
  objConn.Open "DSN=MyDB"

Set objRS = Server.CreateObject("ADODB.Recordset")
strSQL = "qparmVerify '" & CStr(Request.Form("txtname")) & _
    "','" & CStr(Request.Form("txtpasswd")) & "'"
objRS.Open strSQL, objConn, adOpenForwardOnly, , adCmdStoredProc
If objRS.EOF or objRS.BOF Then
    Session("ErrorMessage") = "No record found - Please ensure all information was entered correctly"
    Response.Redirect "default.asp"
Else
    Session("ErrorMessage") = Empty
End If
%>

<%
'Close and dereference database objects
'If IsObject(objRS) Then
objRS.Close
Set objRS = Nothing
'End IF
objConn.Close
Set objConn = Nothing
%>


<%
'Authenticate the user for other web pages
Session("Authenticated") = True
%>

<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE> Student's Web Site</TITLE>
</HEAD>
<BODY>


<div align=center>
    <big><big>Student Registration Solution</big></big>
</div>
<br><br>
<%
  Response.Redirect "Welcome.asp"
%>
</BODY>
</HTML>
--------------------------------------------------------------------
When the login submit button is pressed, then This code is called, so that it will verify against the DB. If wrong info is put in the login page, then this error will be printed: "No record found - Please ensure all information was entered correctly".


If the passwd and username are Ok, Then "Welcome.asp" will be forwarded.

My problem is that : It does print any thing with wrong pass/username, nor forward with right info.

If don't use any authentication, then i can access my website.

What is going on ???

Thanks in advance






 
Old October 30th, 2003, 05:28 AM
CW CW is offline
Authorized User
 
Join Date: Sep 2003
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Never mind, i have solved this problem.

thanks

 
Old October 30th, 2003, 06:12 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 479
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via MSN to surendran Send a message via Yahoo to surendran
Default

Thank you for your information

surendran





Similar Threads
Thread Thread Starter Forum Replies Last Post
LDAP Authentication Problem zicaden Classic ASP Basics 6 January 14th, 2007 06:23 PM
Problem NTLM Authentication mmalik_altaf J2EE 1 November 18th, 2003 05:08 PM
IP authentication problem mateenmohd SQL Server 2000 0 August 24th, 2003 04:52 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.