Basic Auth for ASP.NET
-
I need to present one of those nice Authentication boxes to get a Username and Password and then 'do something' with the info - think of it as Windows authentication, but using my own authenticator instead of checking against the Windows database. Now, my thinking is that in the Page_Load() function, I can take a look to see if the Basic Auth token is there, and if it isn't, return the challenge. If it is there, I can test it and allow the username/password through to the page if its ok. Page_Load() may not be the best place for it - perhaps Session_Start()? Does anyone have code for this? -Adrian
-
I need to present one of those nice Authentication boxes to get a Username and Password and then 'do something' with the info - think of it as Windows authentication, but using my own authenticator instead of checking against the Windows database. Now, my thinking is that in the Page_Load() function, I can take a look to see if the Basic Auth token is there, and if it isn't, return the challenge. If it is there, I can test it and allow the username/password through to the page if its ok. Page_Load() may not be the best place for it - perhaps Session_Start()? Does anyone have code for this? -Adrian
-
Check out Forms based authentication. .Net will handle it for you. The "login" form can verify the username and password any way you care to handle it.
Yes - I have that piece working - wanted to know if I could do Basic Auth though since I am replacing an app. that has Basic Auth already. -Adrian
-
Yes - I have that piece working - wanted to know if I could do Basic Auth though since I am replacing an app. that has Basic Auth already. -Adrian