473,509 Members | 11,437 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Setting credentials

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
4 1064
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

"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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
11140
by: deko | last post by:
I have a login page that is supposed to redirect the user to his private page after login. But header("Location: $url") does not work after I set the $_SESSION variable - I get "Warning: Cannot...
4
11791
by: Joseph | last post by:
I have an intranet application that I setup using windows authentication through IIS basic authentication. Is there a way to set a timeout, so that after ten minutes the user will be prompted...
2
1262
by: Kian Goh | last post by:
Hi there, I am trying to use an entry level security for my resources website. I followed the procedures in the MS published Self-Paced Training Kit, everything seems working as expected....
4
12423
by: Jamie | last post by:
I'm trying to create a HttpWebRequest object that uses the current logged in users credentials. The site is using Windows Authentication, Anonymous access is turned off. Will the HttpWebRequest...
1
1324
by: Robin Patra | last post by:
Hi All, We have the following scenerio. Machine 1: webservice is deployed in this machine. Machine 2: UserControl is deployed in this machine. Case 1: Now my requirement is a person from...
4
19587
by: Stac | last post by:
I have a web service which provides updates / additions to active directory. I can add accounts, change values etc, for everything I need to except the accountexpires field. I have been searching...
0
1528
by: Jim_H | last post by:
I am trying to set the Credentials property of my web service proxy and I cannot seem to get anything to work. I am calling a remote asmx page from an aspx and they each reside on different web...
1
6438
by: Tedmond | last post by:
Dear all, I wrote a function to use WebClient to retrieve information from the Web. It worked fine. However, the proxy setting of our firm has been changed. Proxy authentication is required now...
0
3079
by: WSchaub | last post by:
Has anyone got any referece documentation on how to set the proxy credentials and set proxy server details in WCF proxies? Basically I want to do the following two scenarios we have done in pre-WCF...
0
839
by: Bob1 | last post by:
Hi all, I have a situation where I have a client calling into a webservice. I am trying to change the security context of the client before I make the call to the webservice. I've got...
0
7237
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7349
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7417
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7506
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5659
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5063
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4734
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3219
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
780
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.