Automatic login

A

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
 
S

Steven Cheng[MSFT]

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
 
S

Steven Cheng[MSFT]

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
 
A

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top