473,378 Members | 1,067 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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 2590
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
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
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
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
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
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
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
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
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
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
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 ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.