Ask a Question related to ASP, Design and Development.
-
Rich #1
best way to redirect asp to login htm page?
Hello,
I need users to access a data entry asp page via a login
page. If they bookmark the data entry asp I want to
redirect them to the login page (using IIS). Here is what
I had in mind:
<%@ LANGUAGE=JScript %>
<HTML>
<HEAD>
<TITLE>Home Page</TITLE>
<script language="JavaScript">
function myFunction(s){
....
location.href='insert.htm';}
</SCRIPT>
</HEAD>
<body onLoad="myFunction('<%Response.write(Request.Form
("testfld"));%>')">
....
Isn't there some kind of authentication method for IIS, or
at least a less kludgy way of doing this than what I have
above? Just checking.
Thanks,
Rich
Rich Guest
-
Login Redirect
Hi, all I have this login script that calls on itself to authenticate the username and the password. It redisplays the login page if there is an... -
Login redirect back to previous page
I have a number of secured pages and a login process that works. When a user tries to access a secure page prior to logging in, he is redirected to... -
Forms Authentication won't redirect to login page
I'm trying to set basic form authentication on a webapp. I allaccess restricted to authenticated users. After changing theWeb.config file in the... -
login redirect doesn't work
Hello, I'm working on a asp.net/C# project, but I haven't got a lot of experience with programming with C# and the dotnet framework. I've build... -
Login User and Redirect to a specific page - help required
I'm using ASP/Access 2000. This is what I would like to do. A site has a limited number of users - User Bert logs in and assuming gets thru... -
Curt_C [MVP] #2
Re: best way to redirect asp to login htm page?
have the login place a cookie/session variable...check for it...if it's not
there redirect
--
----------------------------------------------------------
Curt Christianson (Software_AT_Darkfalz.Com)
Owner/Lead Designer, DF-Software
[url]http://www.Darkfalz.com[/url]
---------------------------------------------------------
...Offering free scripts & code snippits for everyone...
---------------------------------------------------------
"Rich" <rpng123@aol.com> wrote in message
news:4e8f01c3765f$6887b240$a401280a@phx.gbl...> Hello,
>
> I need users to access a data entry asp page via a login
> page. If they bookmark the data entry asp I want to
> redirect them to the login page (using IIS). Here is what
> I had in mind:
>
> <%@ LANGUAGE=JScript %>
> <HTML>
> <HEAD>
> <TITLE>Home Page</TITLE>
> <script language="JavaScript">
> function myFunction(s){
> ...
> location.href='insert.htm';}
> </SCRIPT>
> </HEAD>
> <body onLoad="myFunction('<%Response.write(Request.Form
> ("testfld"));%>')">
> ...
>
> Isn't there some kind of authentication method for IIS, or
> at least a less kludgy way of doing this than what I have
> above? Just checking.
>
> Thanks,
> Rich
Curt_C [MVP] Guest
-
Rich #3
Re: best way to redirect asp to login htm page?
Thank you for your reply. This sounds logical. May I
request one more thing? I took a course in javascript
which used some asp examples a few years ago (didn't work
with it since then). Now I am back at it for real. We
did infact work with cookies, but I only vaguely remember
how to set/read them. Would have any sample syntax or
point me where I could see some examples? JS/vbs either
or.
Thanks again for your reply.
Rich
for it...if it's not>-----Original Message-----
>have the login place a cookie/session variable...checkwhat>there redirect
>
>--
>----------------------------------------------------------
>Curt Christianson (Software_AT_Darkfalz.Com)
>Owner/Lead Designer, DF-Software
>[url]http://www.Darkfalz.com[/url]
>---------------------------------------------------------
>...Offering free scripts & code snippits for everyone...
>---------------------------------------------------------
>
>
>"Rich" <rpng123@aol.com> wrote in message
>news:4e8f01c3765f$6887b240$a401280a@phx.gbl...>> Hello,
>>
>> I need users to access a data entry asp page via a login
>> page. If they bookmark the data entry asp I want to
>> redirect them to the login page (using IIS). Here isor>> I had in mind:
>>
>> <%@ LANGUAGE=JScript %>
>> <HTML>
>> <HEAD>
>> <TITLE>Home Page</TITLE>
>> <script language="JavaScript">
>> function myFunction(s){
>> ...
>> location.href='insert.htm';}
>> </SCRIPT>
>> </HEAD>
>> <body onLoad="myFunction('<%Response.write(Request.Form
>> ("testfld"));%>')">
>> ...
>>
>> Isn't there some kind of authentication method for IIS,have>> at least a less kludgy way of doing this than what I>>> above? Just checking.
>>
>> Thanks,
>> Rich
>
>.
>Rich Guest
-
Curt_C [MVP] #4
Re: best way to redirect asp to login htm page?
VBScript
string = Request.Cookies("name")
Response.Cookies("name") = string
--
----------------------------------------------------------
Curt Christianson (Software_AT_Darkfalz.Com)
Owner/Lead Designer, DF-Software
[url]http://www.Darkfalz.com[/url]
---------------------------------------------------------
...Offering free scripts & code snippits for everyone...
---------------------------------------------------------
"Rich" <rpng123@aol.com> wrote in message
news:4f6801c37671$67141fe0$a601280a@phx.gbl...> Thank you for your reply. This sounds logical. May I
> request one more thing? I took a course in javascript
> which used some asp examples a few years ago (didn't work
> with it since then). Now I am back at it for real. We
> did infact work with cookies, but I only vaguely remember
> how to set/read them. Would have any sample syntax or
> point me where I could see some examples? JS/vbs either
> or.
>
> Thanks again for your reply.
>
> Rich
>
>> for it...if it's not> >-----Original Message-----
> >have the login place a cookie/session variable...check> what> >there redirect
> >
> >--
> >----------------------------------------------------------
> >Curt Christianson (Software_AT_Darkfalz.Com)
> >Owner/Lead Designer, DF-Software
> >[url]http://www.Darkfalz.com[/url]
> >---------------------------------------------------------
> >...Offering free scripts & code snippits for everyone...
> >---------------------------------------------------------
> >
> >
> >"Rich" <rpng123@aol.com> wrote in message
> >news:4e8f01c3765f$6887b240$a401280a@phx.gbl...> >> Hello,
> >>
> >> I need users to access a data entry asp page via a login
> >> page. If they bookmark the data entry asp I want to
> >> redirect them to the login page (using IIS). Here is> or> >> I had in mind:
> >>
> >> <%@ LANGUAGE=JScript %>
> >> <HTML>
> >> <HEAD>
> >> <TITLE>Home Page</TITLE>
> >> <script language="JavaScript">
> >> function myFunction(s){
> >> ...
> >> location.href='insert.htm';}
> >> </SCRIPT>
> >> </HEAD>
> >> <body onLoad="myFunction('<%Response.write(Request.Form
> >> ("testfld"));%>')">
> >> ...
> >>
> >> Isn't there some kind of authentication method for IIS,> have> >> at least a less kludgy way of doing this than what I> >> >> above? Just checking.
> >>
> >> Thanks,
> >> Rich
> >
> >.
> >
Curt_C [MVP] Guest
-
Dave Mitchell #5
Re: best way to redirect asp to login htm page?
Hey rich, does your login page submit straight to the data entry page?
If so then at the start of the data entry page you could just check that one
of the fields from your login page actually has data in it, and if it
doesn't then redirect the user back there.
so put this at thge start of your data entry page..
<%
if request.form("yourformfield")="" then
response.write "<script>alert('you must come here from the login
page.')</script>";
response.redirect "login.htm"
else
'show the data entry page
end if
%>
hoope this helps
dave
"Rich" <rpng123@aol.com> wrote in message
news:4e8f01c3765f$6887b240$a401280a@phx.gbl...> Hello,
>
> I need users to access a data entry asp page via a login
> page. If they bookmark the data entry asp I want to
> redirect them to the login page (using IIS). Here is what
> I had in mind:
>
> <%@ LANGUAGE=JScript %>
> <HTML>
> <HEAD>
> <TITLE>Home Page</TITLE>
> <script language="JavaScript">
> function myFunction(s){
> ...
> location.href='insert.htm';}
> </SCRIPT>
> </HEAD>
> <body onLoad="myFunction('<%Response.write(Request.Form
> ("testfld"));%>')">
> ...
>
> Isn't there some kind of authentication method for IIS, or
> at least a less kludgy way of doing this than what I have
> above? Just checking.
>
> Thanks,
> Rich
Dave Mitchell Guest
-
Rich #6
best way to redirect asp to login htm page?
Thank you all for your responses. This really helps me
out. I actually know how to do this stuff in JSP, but I
don't want to use Tomcat because I am all hooked up with
IIS/SqlServer now. My vbscripting is weak, at best. Oh
well. I will be hanging around here a lot :).
Thanks again,
Rich
what>-----Original Message-----
>Hello,
>
>I need users to access a data entry asp page via a login
>page. If they bookmark the data entry asp I want to
>redirect them to the login page (using IIS). Here isor>I had in mind:
>
><%@ LANGUAGE=JScript %>
><HTML>
><HEAD>
><TITLE>Home Page</TITLE>
><script language="JavaScript">
>function myFunction(s){
>....
> location.href='insert.htm';}
></SCRIPT>
></HEAD>
><body onLoad="myFunction('<%Response.write(Request.Form
>("testfld"));%>')">
>....
>
>Isn't there some kind of authentication method for IIS,>at least a less kludgy way of doing this than what I have
>above? Just checking.
>
>Thanks,
>Rich
>.
>Rich Guest
-
Tom Bates #7
Re: best way to redirect asp to login htm page?
Rich, how about this? A friend of mine found this (or invented it).
Put it in your global.asa file in the Session_OnStart routine.
' If someone initially tries to load any page other than the
' start page, redirect them.
' NOTE - If the redirect happens, the rest of this function
' is not executed, so be sure this is LAST!
Session("requestedPage") = Request.ServerVariables("SCRIPT_NAME")
if not (STRCOMP(Application("StartPage"), Session("requestedPage"),
vbTextCompare)=0) then
Response.Redirect Application("StartPage")
end if
Works for me. No cookies (other than ASP's own). Just set
Application("StartPage") to "login.asp" (or whatever you're using) in
your Application_OnStart routine.
Tom
On Tue, 9 Sep 2003 07:52:56 -0700, "Rich" <rpng123@aol.com> wrote:
>Thank you all for your responses. This really helps me
>out. I actually know how to do this stuff in JSP, but I
>don't want to use Tomcat because I am all hooked up with
>IIS/SqlServer now. My vbscripting is weak, at best. Oh
>well. I will be hanging around here a lot :).
>
>Thanks again,
>Rich
>>what>>-----Original Message-----
>>Hello,
>>
>>I need users to access a data entry asp page via a login
>>page. If they bookmark the data entry asp I want to
>>redirect them to the login page (using IIS). Here is>or>>I had in mind:
>>
>><%@ LANGUAGE=JScript %>
>><HTML>
>><HEAD>
>><TITLE>Home Page</TITLE>
>><script language="JavaScript">
>>function myFunction(s){
>>....
>> location.href='insert.htm';}
>></SCRIPT>
>></HEAD>
>><body onLoad="myFunction('<%Response.write(Request.Form
>>("testfld"));%>')">
>>....
>>
>>Isn't there some kind of authentication method for IIS,>>at least a less kludgy way of doing this than what I have
>>above? Just checking.
>>
>>Thanks,
>>Rich
>>.
>>Tom Bates Guest



Reply With Quote

