Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Components Discussions specific to components in ASP 3.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Components section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old February 14th, 2005, 02:07 PM
Authorized User
 
Join Date: Jan 2005
Location: ipaja, lagos, Nigeria.
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to p2ptolu Send a message via Yahoo to p2ptolu
Default sessions

I created a site with login,logout,validate,default.asp but after creating a username and password, i get logged on, but cannot use the log on page , because when i enter data and enter, it tells me MIME types is not allowed,please help me out so i can login in , log out and register users, please if possible send me the codes,thanks.

Reply With Quote
  #2 (permalink)  
Old February 15th, 2005, 02:25 AM
Authorized User
 
Join Date: Jan 2005
Location: Mumbai, Maharashtra, India.
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to askenkray
Default

tolu,

how can u log on without using the log-on page????
can u pls put the rpoblem in detail


Ashwin S.Kenkare
Programmer
CMI
Reply With Quote
  #3 (permalink)  
Old February 16th, 2005, 01:31 PM
Authorized User
 
Join Date: Jan 2005
Location: ipaja, lagos, Nigeria.
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to p2ptolu Send a message via Yahoo to p2ptolu
Default

Thanks for your concern,

This is the validation code below but it does not work
it comes up with the following
HTTP Error 405
405 method not allowed
This method specified in the request line is not allowed for the resource identified by the request............



please send me a logon.asp,validate.asp,logout.asp,and blank default.asp so i can try it out.
<%
Response.Buffer=true

'The following three lines of code are used to ensure that this page is not cached on the client.
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "no-cache"
Response.Expires = -1

Dim userid
Dim Pwd
'Assign the UserID, which the user supplies, to this variable.
userid= Request.Form("UID")
'Check whether userid is an empty string. If it is empty, redirect to Logon.asp.
'If it is not empty, connect to the database, and validate the user.

if userid <> "" then
    pwd = Request.Form("passwd")

    Dim Cn
    Dim Rs
    Dim StrConnect
    dim strcomp

'Specify the connection string to access the database.
'Remember to change the following connection string parameters to reflect the correct values
'for your SQL server.
    StrConnect = "Provider=SQLOLEDB.1;User ID=sa;Password=;Initial Catalog=tolu;Network Library=dbmssocn;Data Source=nodoubt"


    Set Cn = Server.CreateObject("ADODB.Connection")
    Cn.Open StrConnect
    Set Rs = Server.CreateObject("ADODB.Recordset")
    Rs.Open "Select * from Users where uid='" & userid & "'",Cn
'Check to see if this userID exists in your database.
    If Not Rs.EOF then
        If strcomp( pwd, Rs.Fields("password").value , 1) = 0 then
'Password is correct. Set a session variable, and redirect the user to a Default.asp page
'or the main page in your application.
            Session("UID") = userid
            Response.Redirect "Default.asp"
            Response.End
        Else
'Password is incorrect. Redirect the user to the logon page.
            Response.Redirect "Logon.asp"
            Response.End
        End if
    Else
'If the user is not in your database, point him or her to the Register.asp page
'so that he or she can register at your Web site.
        Response.Redirect "Register.asp"
        Response.End
    End if
Else
    Response.Redirect "Logon.asp"
    Response.End
End if

%>





Reply With Quote
  #4 (permalink)  
Old March 17th, 2005, 05:31 AM
Registered User
 
Join Date: Mar 2005
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Can you tell which line is causing the error?


Reply With Quote
Reply


Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sessions aegron BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 4 December 19th, 2005 06:49 AM
Sessions 2540EA BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 February 20th, 2005 04:42 AM
Mixing classic ASP sessions with ASP.NET sessions scorpion_king General .NET 2 August 4th, 2004 08:20 AM
Sessions aeejai Beginning PHP 3 April 22nd, 2004 01:51 PM
Help sessions ittorget Pro VB 6 2 April 20th, 2004 02:18 AM



All times are GMT -4. The time now is 03:35 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.