473,508 Members | 2,255 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Automatic login

A.M
Hi,

I have implemented forms authentication on my application, but I have to
fill the login form every time i run the web app during debugging phases. I
know that i can change the code to automatically login on development
machine, but i prefer to not to have such setting in the code.

Are there any special settings in web.config so Forms authentication login
automatically as certain UID and PWD?
Thanks,
Allan
Nov 18 '05 #1
4 2602
Hi Allan,

From your description, you're wondering whether there is any setting in
webconfig which can make the user auto-login when visiting a
FormsAuthentcation based web application, yes?

As for as I known, there seems no such setting. As my opinion, the
FormsAuthentication's Authenticate token is stored in the user's clientside
cookie and the serverside has no means to control the clientside cookie,
Also when rebuild our application which make the former authentication
cookie expired(since by default the FormsAuthenticate cookie is stored as
non-persistent cookie) so that when we debug again, we need to reinput the
authenticate tokens. If you do want to get rid of typing the login info
again and again in developing time, I suggest that you either change the
Authentication mode from "Forms" to "None" or make all the page's
protection as allow="*" such as:
<authorization>
<alow users="*" />
.....

Otherwise, we have to make the authentication cookie as persitent cookie in
code as you mentioned at start.
Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #2
Hi Allan,

From your description, you're wondering whether there is any setting in
webconfig which can make the user auto-login when visiting a
FormsAuthentcation based web application, yes?

As for as I known, there seems no such setting. As my opinion, the
FormsAuthentication's Authenticate token is stored in the user's clientside
cookie and the serverside has no means to control the clientside cookie,
Also when rebuild our application which make the former authentication
cookie expired(since by default the FormsAuthenticate cookie is stored as
non-persistent cookie) so that when we debug again, we need to reinput the
authenticate tokens. If you do want to get rid of typing the login info
again and again in developing time, I suggest that you either change the
Authentication mode from "Forms" to "None" or make all the page's
protection as allow="*" such as:
<authorization>
<alow users="*" />
.....

Otherwise, we have to make the authentication cookie as persitent cookie in
code as you mentioned at start.
Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #3
Hi Allan,

Have you had a chance to check out the suggestions in my last reply or have
you got any further ideas on this issue? If you have anything unclear or if
there're anything else we can help, please feel free to post here. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
Nov 18 '05 #4
A.M
Hi Steven,

I needed to keep all security structure in code and web.config, to be able
to test all aprts of the system.
So i used #if DEBUG preprocessor in login page's Page_load event to login
automatically if the application is in debug mode.

Thanks for followup,
Allan

"Steven Cheng[MSFT]" <v-******@online.microsoft.com> wrote in message
news:b0**************@cpmsftngxa10.phx.gbl...
Hi Allan,

Have you had a chance to check out the suggestions in my last reply or have you got any further ideas on this issue? If you have anything unclear or if there're anything else we can help, please feel free to post here. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2506
by: Tim Wade | last post by:
Does anyone have any ideas on how to do an automatic html form post using hidden fields without introducing client-side script nor using a server-side WebRequest by passing the information back up...
7
2130
by: Jack | last post by:
Hi, In my application, the main page is accessed via a login screen. A particular record is accessed based on the value of login page. Everything works fine. However, if this screen is kept idle...
1
2566
by: Piotr Kurpiel | last post by:
Hi, I am creating a site where I need to refer to another external file (aspx). I create the form and works fine. But as soon as I try to submit the form automatically (with form.submit()) I get...
1
1865
by: Jim | last post by:
I have an asp.net site and I want to provide automatic login when a user returns to my site, similar to amazon.com. Currently my site authenticates the user and generates a token when the user...
6
1928
by: Donald Williamson | last post by:
Hi Hope someone can help me with authentication and how the redirects work. I' ve already tried searching previous posts but didn't really find anything. for I have a page that checks to see...
4
1395
by: Paul M. | last post by:
Hi, we have 2 www systems one which we wrote ourselves the other is a parent company one over which we have no control. The 2nd system involves the user having to enter a username & password in a...
3
4232
by: Peter Ivarsson | last post by:
Hi, I have a program that's creates a .netrc in $HOME. When I at the AIX prompt write "ftp xxx.yyy.com", the ftp command transfers a file to the remote host as I want. When I in my code write...
3
6174
by: mikey.mor | last post by:
Hello everyone, i am trying to do the folowing : 1. login to HTTPS website ( gmail for example ). 2. go to a certain page in that website. 3. read the page's content. how is it best to...
10
8133
by: Victor | last post by:
hi guys. In my project, now I am using a asp.net login control and a customized membership provider to do the form authentication. Now I want some function that user can skip the login form and be...
8
3816
pentahari
by: pentahari | last post by:
Redirect to login page if session("UserName") is expired when the page useraccount.aspx load event My useraccount.aspx code : If Session("UserName") Is Nothing Then ...
0
7229
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,...
1
7061
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7502
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
5637
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
5057
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
3208
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...
0
3194
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1566
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
428
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...

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.