By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,084 Members | 1,969 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,084 IT Pros & Developers. It's quick & easy.

Setting credentials

P: n/a
I have a logon page that my pages go to log a person on using
formsAuthentication.

Is there a way to jump directly to the logon page and have it set the
formsAuthentication cookie so that the next page (that would normally
require logging on - if not already done) would not jump to the logon page.

For example, I have a page with my submit function like so:
************************************************** ********
sub submit_click( sender as Object, e as EventArgs )
if Not IsValid then
exit sub
end if
if request("ReturnURL") = Nothing then
server.transfer("resumeSubmit.aspx")
else
FormsAuthentication.RedirectFromLoginPage(txtEmail .text,false)
end if
end Sub
************************************************** *********

I assume the FormsAuthentication.RedirectFromLoginPage normally sets the
cookie and jumps to the page that called it. Can I put a call just before
the server.transfer that does the same thing?

Thanks,

Tom.
Nov 19 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
not sure what you mean..
If I understand you want to bypass the login? Uh...... doesn't that defeat
the purpose of using auth?
You can add pages in the web.config that ignore the auth mode.. would that
suffice?

--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"tshad" <ts**********@ftsolutions.com> wrote in message
news:uM****************@TK2MSFTNGP10.phx.gbl...
I have a logon page that my pages go to log a person on using
formsAuthentication.

Is there a way to jump directly to the logon page and have it set the
formsAuthentication cookie so that the next page (that would normally
require logging on - if not already done) would not jump to the logon
page.

For example, I have a page with my submit function like so:
************************************************** ********
sub submit_click( sender as Object, e as EventArgs )
if Not IsValid then
exit sub
end if
if request("ReturnURL") = Nothing then
server.transfer("resumeSubmit.aspx")
else
FormsAuthentication.RedirectFromLoginPage(txtEmail .text,false)
end if
end Sub
************************************************** *********

I assume the FormsAuthentication.RedirectFromLoginPage normally sets the
cookie and jumps to the page that called it. Can I put a call just before
the server.transfer that does the same thing?

Thanks,

Tom.

Nov 19 '05 #2

P: n/a

"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
not sure what you mean..
If I understand you want to bypass the login? Uh...... doesn't that defeat
the purpose of using auth?
You can add pages in the web.config that ignore the auth mode.. would that
suffice?
No. What I want to do is allow the user to log on from a link. He will go
into the logon page.

The next page he goes to will require him to logon again, since he didn't go
through the normal FormsAuthentication mechanism that sets the cookie. This
would be irritating. I want to be able to set the cookie manually, if this
is the case.

Tom

--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"tshad" <ts**********@ftsolutions.com> wrote in message
news:uM****************@TK2MSFTNGP10.phx.gbl...
I have a logon page that my pages go to log a person on using
formsAuthentication.

Is there a way to jump directly to the logon page and have it set the
formsAuthentication cookie so that the next page (that would normally
require logging on - if not already done) would not jump to the logon
page.

For example, I have a page with my submit function like so:
************************************************** ********
sub submit_click( sender as Object, e as EventArgs )
if Not IsValid then
exit sub
end if
if request("ReturnURL") = Nothing then
server.transfer("resumeSubmit.aspx")
else
FormsAuthentication.RedirectFromLoginPage(txtEmail .text,false)
end if
end Sub
************************************************** *********

I assume the FormsAuthentication.RedirectFromLoginPage normally sets the
cookie and jumps to the page that called it. Can I put a call just
before the server.transfer that does the same thing?

Thanks,

Tom.


Nov 19 '05 #3

P: n/a
just send them to the page, the system will catch them and send them to
login page and then use the ReturnUrl to bring em back in, no "extra" login
page needed then. I guess I'm not sure why you are trying to send them to a
different login page?

--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"tshad" <ts**********@ftsolutions.com> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...

"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
not sure what you mean..
If I understand you want to bypass the login? Uh...... doesn't that
defeat the purpose of using auth?
You can add pages in the web.config that ignore the auth mode.. would
that suffice?


No. What I want to do is allow the user to log on from a link. He will
go into the logon page.

The next page he goes to will require him to logon again, since he didn't
go through the normal FormsAuthentication mechanism that sets the cookie.
This would be irritating. I want to be able to set the cookie manually,
if this is the case.

Tom

--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"tshad" <ts**********@ftsolutions.com> wrote in message
news:uM****************@TK2MSFTNGP10.phx.gbl...
I have a logon page that my pages go to log a person on using
formsAuthentication.

Is there a way to jump directly to the logon page and have it set the
formsAuthentication cookie so that the next page (that would normally
require logging on - if not already done) would not jump to the logon
page.

For example, I have a page with my submit function like so:
************************************************** ********
sub submit_click( sender as Object, e as EventArgs )
if Not IsValid then
exit sub
end if
if request("ReturnURL") = Nothing then
server.transfer("resumeSubmit.aspx")
else
FormsAuthentication.RedirectFromLoginPage(txtEmail .text,false)
end if
end Sub
************************************************** *********

I assume the FormsAuthentication.RedirectFromLoginPage normally sets the
cookie and jumps to the page that called it. Can I put a call just
before the server.transfer that does the same thing?

Thanks,

Tom.



Nov 19 '05 #4

P: n/a
There is only one login page.

But from my initial page (not logged on yet) I am allowing them to log in.
They press a link (logon.aspx) and go to that page. Now they are logged on.
But no cookie was generated as I don't use
FormsAuthentication.RedirectFromLoginPage as there is no redirect page to go
to.

Now, if they press a link to go to another page, they will go first to the
same logon page they just left from (because no cookie was generated).

Tom

"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
just send them to the page, the system will catch them and send them to
login page and then use the ReturnUrl to bring em back in, no "extra"
login page needed then. I guess I'm not sure why you are trying to send
them to a different login page?

--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"tshad" <ts**********@ftsolutions.com> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...

"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
not sure what you mean..
If I understand you want to bypass the login? Uh...... doesn't that
defeat the purpose of using auth?
You can add pages in the web.config that ignore the auth mode.. would
that suffice?


No. What I want to do is allow the user to log on from a link. He will
go into the logon page.

The next page he goes to will require him to logon again, since he didn't
go through the normal FormsAuthentication mechanism that sets the cookie.
This would be irritating. I want to be able to set the cookie manually,
if this is the case.

Tom

--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"tshad" <ts**********@ftsolutions.com> wrote in message
news:uM****************@TK2MSFTNGP10.phx.gbl...
I have a logon page that my pages go to log a person on using
formsAuthentication.

Is there a way to jump directly to the logon page and have it set the
formsAuthentication cookie so that the next page (that would normally
require logging on - if not already done) would not jump to the logon
page.

For example, I have a page with my submit function like so:
************************************************** ********
sub submit_click( sender as Object, e as EventArgs )
if Not IsValid then
exit sub
end if
if request("ReturnURL") = Nothing then
server.transfer("resumeSubmit.aspx")
else
FormsAuthentication.RedirectFromLoginPage(txtEmail .text,false)
end if
end Sub
************************************************** *********

I assume the FormsAuthentication.RedirectFromLoginPage normally sets
the cookie and jumps to the page that called it. Can I put a call just
before the server.transfer that does the same thing?

Thanks,

Tom.



Nov 19 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.