Code Bank
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingCode Bank

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 July 8th, 2004, 10:50 AM
commekid commekid is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Location: UK
Posts: 19 commekid User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to commekid Send a message via MSN to commekid Send a message via Yahoo to commekid
ASP login code/script error

hi all,
i recently aquired a sample login script and tested on asp enabled webservers, then i wanted to add it to my iis 5.1 assembly for a simple login script for my web site but do not know howto do this properly, i know it is not already activated as i get an error reading:
Error Type:
Server object, ASP 0177 (0x800401F3)
Invalid class string
/asp/check_user.asp, line 18

any ideas?
thanks,
commekid

Reply With Quote
  #2  
Old July 8th, 2004, 11:34 AM
selwonk's Avatar
selwonk selwonk is offline
Contributing User
ASP Free Frequenter (2500 - 2999 posts)
 
Join Date: Jun 2004
Posts: 2,942 selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 6 Days 9 h 49 m 28 sec
Reputation Power: 62
Can you post your script here?

MK

Reply With Quote
  #3  
Old July 8th, 2004, 12:11 PM
commekid commekid is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Location: UK
Posts: 19 commekid User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to commekid Send a message via MSN to commekid Send a message via Yahoo to commekid
the page where i get the error is coded as follows

<%

'Dimension variables

Dim adoCon 'Database Connection Variable

Dim strCon 'Holds the Database driver and the path and name of the database

Dim rsCheckUser 'Database Recordset Variable

Dim strAccessDB 'Holds the Access Database Name

Dim strSQL 'Database query sring

Dim strUserName 'Holds the user name

'Initalise the strUserName variable

strUserName = Request.Form("txtUserName")

'Check the database to see if user exsits and read in there password

'Initialise the strAccessDB variable with the name of the Access Database

strAccessDB = "users"

'Create a connection odject

Set adoCon = Server.CreateObject("ADODB.Connection")



'Database connection info and driver

strCon = "DRIVER={Microsoft Access Driver (*.mdb)};uid=;pwd=letmein; DBQ=" & Server.MapPath(strAccessDB)

'Set an active connection to the Connection object

adoCon.Open strCon

'Create a recordset object

Set rsCheckUser = Server.CreateObject("ADODB.Recordset")

'Initalise the strSQL variable with an SQL statement to query the database

strSQL = "SELECT tblUsers.Password FROM tblUsers WHERE tblUsers.UserID ='" & strUserName & "'"

'Query the database

rsCheckUser.Open strSQL, strCon

'If the recordset finds a record for the username entered then read in the password for the user

If NOT rsCheckUser.EOF Then



'Read in the password for the user from the database

If (Request.Form("txtUserPass")) = rsCheckUser("Password") Then



'If the password is correct then set the session variable to True

Session("blnIsUserGood") = True



'Close Objects before redirecting

Set adoCon = Nothing

Set strCon = Nothing

Set rsCheckUser = Nothing



'Redirect to the authorised user page and send the users name

Response.Redirect"authorised_user_page.asp?name=" & strUserName

End If

End If



'Close Objects

Set adoCon = Nothing

Set strCon = Nothing

Set rsCheckUser = Nothing



'If the script is still running then the user must not be authorised

Session("blnIsUserGood") = False

'Redirect to the unautorised user page

Response.Redirect"unauthorised_user_page.htm"

%>


Reply With Quote
  #4  
Old July 8th, 2004, 12:22 PM
selwonk's Avatar
selwonk selwonk is offline
Contributing User
ASP Free Frequenter (2500 - 2999 posts)
 
Join Date: Jun 2004
Posts: 2,942 selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 6 Days 9 h 49 m 28 sec
Reputation Power: 62
Hi

I seem to remember this problem being fixed by installing the last MDAC:

http://www.microsoft.com/downloads/...&displaylang=en

Might be worth a try?

MK

Reply With Quote
  #5  
Old July 8th, 2004, 03:31 PM
commekid commekid is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Location: UK
Posts: 19 commekid User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to commekid Send a message via MSN to commekid Send a message via Yahoo to commekid
hay thanks 4 reply,

i have done as you have instructed but now i get this error:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0xe58 Thread 0xf48 DBC 0x159178c Jet'.
/asp/check_user.asp, line 24


any ideas?
ty

Reply With Quote
  #6  
Old July 8th, 2004, 04:08 PM
commekid commekid is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Location: UK
Posts: 19 commekid User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to commekid Send a message via MSN to commekid Send a message via Yahoo to commekid
red another thread and fixed error
ty anyway
great forum

Reply With Quote
  #7  
Old July 8th, 2004, 04:20 PM
selwonk's Avatar
selwonk selwonk is offline
Contributing User
ASP Free Frequenter (2500 - 2999 posts)
 
Join Date: Jun 2004
Posts: 2,942 selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level)selwonk User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 6 Days 9 h 49 m 28 sec
Reputation Power: 62
Can you post the solution here for other users? This issue can often be solved by reinstalling MDAC and rebooting the server

MK

Reply With Quote
  #8  
Old July 9th, 2004, 02:29 PM
commekid commekid is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Location: UK
Posts: 19 commekid User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to commekid Send a message via MSN to commekid Send a message via Yahoo to commekid
sure, the link to the thread is here:

http://forums.aspfree.com/t18145/s.html

i did the bit that set some more permissions

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingCode Bank > ASP login code/script error


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 2 hosted by Hostway