Wrox Programmer Forums
|
ASP Pro Code Clinic As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Pro Code Clinic 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 February 4th, 2004, 07:39 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 518
Thanks: 0
Thanked 0 Times in 0 Posts
Default NT authentication on main page

how can use authenticate on the default.asp page ?

I have use following coding in the default.asp page, it is main page of program, I want to use authentication on this page.
when user access default.asp page it check userid is available on the
table. if user available it work according on this coding otherwise
it should redirect to sign.asp.

if userid not found in table and then page redirect to signin.asp page.

after signin, user available on table it working main page coding

default.asp is the main page where autenticate are check.


when user again access this page
but it does not work on this coding
it again and again move to sign.asp page why ?

what logic (coding) I use for the maing page authentication (default.asp)?



for the NT authentication.


<%
name = Request.ServerVariables("logon_user")
user = mid(name, 9, (len(name)-8))

// connection

ssql="select userid from authen where userid= '" & user & "'"

set rs=cn.Execute(ssql)

if Not rs.EOF Then

// page main program coding her ie. default.asp

Else
    Response.Redirect("http://dcilweb/sas/signin.asp")
End If
%>




Mateen


 
Old February 9th, 2004, 10:18 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 171
Thanks: 0
Thanked 1 Time in 1 Post
Default

I am guessing that the default page has not been given a user name at the point where the user enters the page. Try setting a cookie on the user's machine that contains the user_name so that you may request that value when the page opens the next time they visit. If it is an internal machine you might be able to use Windows authentication.

 
Old February 11th, 2004, 12:17 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 518
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks.

Quote:
quote:Originally posted by DaveGerard
 I am guessing that the default page has not been given a user name at the point where the user enters the page. Try setting a cookie on the user's machine that contains the user_name so that you may request that value when the page opens the next time they visit. If it is an internal machine you might be able to use Windows authentication.






Similar Threads
Thread Thread Starter Forum Replies Last Post
NT Authentication Possible? acdsky Classic ASP Basics 6 February 13th, 2008 07:36 PM
iframe refresh scrolls main page down kdm260 ASP.NET 2.0 Professional 0 May 16th, 2006 02:06 PM
Connect to SQL Server using NT Authentication (ADO donnie200 Access VBA 5 July 15th, 2005 06:33 AM
NT Authentication yeewaitu JSP Basics 4 November 18th, 2004 02:14 AM
NT Authentication without Active Directory reyboy SQL Server 2000 0 October 15th, 2003 03:10 AM





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