473,586 Members | 2,839 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
formsAuthentica tion.

Is there a way to jump directly to the logon page and have it set the
formsAuthentica tion 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("Return URL") = Nothing then
server.transfer ("resumeSubmit. aspx")
else
FormsAuthentica tion.RedirectFr omLoginPage(txt Email.text,fals e)
end if
end Sub
*************** *************** *************** **************

I assume the FormsAuthentica tion.RedirectFr omLoginPage 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 1066
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**********@f tsolutions.com> wrote in message
news:uM******** ********@TK2MSF TNGP10.phx.gbl. ..
I have a logon page that my pages go to log a person on using
formsAuthentic ation.

Is there a way to jump directly to the logon page and have it set the
formsAuthentica tion 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("Return URL") = Nothing then
server.transfer ("resumeSubmit. aspx")
else
FormsAuthentica tion.RedirectFr omLoginPage(txt Email.text,fals e)
end if
end Sub
*************** *************** *************** **************

I assume the FormsAuthentica tion.RedirectFr omLoginPage 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_da rkfalz.com> wrote in message
news:%2******** **********@TK2M SFTNGP12.phx.gb l...
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 FormsAuthentica tion 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**********@f tsolutions.com> wrote in message
news:uM******** ********@TK2MSF TNGP10.phx.gbl. ..
I have a logon page that my pages go to log a person on using
formsAuthenti cation.

Is there a way to jump directly to the logon page and have it set the
formsAuthentica tion 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("Return URL") = Nothing then
server.transfer ("resumeSubmit. aspx")
else
FormsAuthentica tion.RedirectFr omLoginPage(txt Email.text,fals e)
end if
end Sub
*************** *************** *************** **************

I assume the FormsAuthentica tion.RedirectFr omLoginPage 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**********@f tsolutions.com> wrote in message
news:%2******** **********@TK2M SFTNGP12.phx.gb l...

"Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message
news:%2******** **********@TK2M SFTNGP12.phx.gb l...
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 FormsAuthentica tion 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**********@f tsolutions.com> wrote in message
news:uM******** ********@TK2MSF TNGP10.phx.gbl. ..
I have a logon page that my pages go to log a person on using
formsAuthent ication.

Is there a way to jump directly to the logon page and have it set the
formsAuthentica tion 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("Return URL") = Nothing then
server.transfer ("resumeSubmit. aspx")
else
FormsAuthentica tion.RedirectFr omLoginPage(txt Email.text,fals e)
end if
end Sub
*************** *************** *************** **************

I assume the FormsAuthentica tion.RedirectFr omLoginPage 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
FormsAuthentica tion.RedirectFr omLoginPage 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_da rkfalz.com> wrote in message
news:%2******** **********@TK2M SFTNGP12.phx.gb l...
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**********@f tsolutions.com> wrote in message
news:%2******** **********@TK2M SFTNGP12.phx.gb l...

"Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message
news:%2******** **********@TK2M SFTNGP12.phx.gb l...
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 FormsAuthentica tion 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**********@f tsolutions.com> wrote in message
news:uM******** ********@TK2MSF TNGP10.phx.gbl. ..
I have a logon page that my pages go to log a person on using
formsAuthen tication.

Is there a way to jump directly to the logon page and have it set the
formsAuthentica tion 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("Return URL") = Nothing then
server.transfer ("resumeSubmit. aspx")
else
FormsAuthentica tion.RedirectFr omLoginPage(txt Email.text,fals e)
end if
end Sub
*************** *************** *************** **************

I assume the FormsAuthentica tion.RedirectFr omLoginPage 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
11148
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 modify header information - headers already sent by ... The abbreviated code on the login page looks like this: <?php session_start(); ?>
4
11811
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 again to enter their login ID and password? I have not been able to find anything on microsoft or google. Other than this, the only way a user will...
2
1271
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. However, I found that the authentication cookie never expires. I thought the default timeout is 30 minutes. Please tell me if I miss any step...
4
12449
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 object use the current users credentials if i use <identity impersonate="true" /> ? or do i have to set the Credentials property of the web...
1
1331
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 Machine 3 types (http://servername(machine 2)/myusercontrol.aspx.
4
19598
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 for this one for weeks. I am using the DirectoryEntry & DirectorySearcher classes as follows: 'strCN is the username I am editing...
0
1537
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 servers. My application keeps throwing a 401 Access Denied error. Most web sites say to set the proxy.Credentials property to...
1
6460
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 but I have no idea how to set the credential for the WebClient. I went through the .Net document and only found an example of reading credentials....
0
3089
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 environments: //Set proxy credentials ServiceB.ServiceB remoteService = new ServiceB.ServiceB();
0
843
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 something really simple like the following on the client: // The Webservice HelloServer.Service1 service = new Service1(); NetworkCredential...
0
7911
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7839
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8200
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8338
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8215
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6610
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3836
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1448
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1179
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.