Subject: NT authentication on main page
Posted By: mateenmohd Post Date: 2/4/2004 6:39:34 AM
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


Reply By: DaveGerard Reply Date: 2/9/2004 9:18:45 AM
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.

Reply By: mateenmohd Reply Date: 2/10/2004 11:17:10 PM
thanks.

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.

 




Go to topic 9287

Return to index page 1044
Return to index page 1043
Return to index page 1042
Return to index page 1041
Return to index page 1040
Return to index page 1039
Return to index page 1038
Return to index page 1037
Return to index page 1036
Return to index page 1035