|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to get an https url when using Forms and Default login redirectUsing Forms authentication, I have in web.config <authentication mode="Forms"> <forms loginUrl="https://wwwmysite.com/secure/login.aspx" defaultUrl="~/DefaultPage.aspx" requireSSL="false" /> </authentication> A certificate is installed and working but when a non authenticated user try to access a protected page, he is redirected without the https scheme ? calling manually the url with https works perfectly Why FormAuthentication's redirect is removing the https scheme ???? Thanks for help. CS Here's a pretty good tutorial which can serve as a model for you:
http://tonesnotes.com/blog/2004/05/aspnet_forms_authentication_wi.html Also, there are those who say that making your login page https is not good practice. Your login page should be http and your *other* pages should be https. Check out these two discussions : http://forums.asp.net/t/1110341.aspx http://forums.asp.net/t/836624.aspx ....and this article with sample code: http://www.codeproject.com/KB/aspnet/WebPageSecurity.aspx Juan T. Llibre, asp.net MVP ¿ Estas probando VS 2010 y ASP.NET 4.0 ? Regístrate (gratis) en los Foros de VS 2010 y ASP.NET 4.0, en español http://asp.net.do/foros/forums/ ===================================================== Show quoteHide quote "ADNT" <christian.surieux@NOSPAMPaddonnice.com> wrote in message news:%23IOkH2m9JHA.1492@TK2MSFTNGP03.phx.gbl... > Hello, > > > Using Forms authentication, I have in web.config > > <authentication mode="Forms"> > <forms loginUrl="https://wwwmysite.com/secure/login.aspx" defaultUrl="~/DefaultPage.aspx" requireSSL="false" /> > </authentication> > > A certificate is installed and working but when a non authenticated user try to access a protected page, he is > redirected without the https scheme ? > > calling manually the url with https works perfectly > > Why FormAuthentication's redirect is removing the https scheme ???? > > Thanks for help. > > CS > Thanks Juan,
I know all this but it doesn't work in my case, may be articles are too old for net 3.5 web.config :) My problem is : when I do a redirect with https, I get http in the location header reaching the browser. CS Show quoteHide quote "Juan T. Llibre" <nomailrepl***@nowhere.com> a écrit dans le message de news:Orpco9o9JHA.1376@TK2MSFTNGP02.phx.gbl... > Here's a pretty good tutorial which can serve as a model for you: > > http://tonesnotes.com/blog/2004/05/aspnet_forms_authentication_wi.html > > Also, there are those who say that making your login page https is not > good practice. > Your login page should be http and your *other* pages should be https. > > Check out these two discussions : > > http://forums.asp.net/t/1110341.aspx > > http://forums.asp.net/t/836624.aspx > > ...and this article with sample code: > > http://www.codeproject.com/KB/aspnet/WebPageSecurity.aspx > > > > > Juan T. Llibre, asp.net MVP > ¿ Estas probando VS 2010 y ASP.NET 4.0 ? > Regístrate (gratis) en los Foros de VS 2010 y ASP.NET 4.0, en español > http://asp.net.do/foros/forums/ > ===================================================== > "ADNT" <christian.surieux@NOSPAMPaddonnice.com> wrote in message > news:%23IOkH2m9JHA.1492@TK2MSFTNGP03.phx.gbl... >> Hello, >> >> >> Using Forms authentication, I have in web.config >> >> <authentication mode="Forms"> >> <forms loginUrl="https://wwwmysite.com/secure/login.aspx" >> defaultUrl="~/DefaultPage.aspx" requireSSL="false" /> >> </authentication> >> >> A certificate is installed and working but when a non authenticated user >> try to access a protected page, he is redirected without the https scheme >> ? >> >> calling manually the url with https works perfectly >> >> Why FormAuthentication's redirect is removing the https scheme ???? >> >> Thanks for help. >> >> CS >> > > >
Other interesting topics
Problem with AddHandler (New CommandEventHandler) under framework 2.0
Disable Validation For Dynamically Created Control Multiple Drop-Downs ASP.NET System.OutOfMemoryException <forms loginUrl="https:// pb C# / VB.NET code which takes a datetime in as parameter and returns a string How to write metainformation in asp.net dll too many forms, what should I do? Value cannot be null. Parameter name: type Can't get started with this JavaScript |
|||||||||||||||||||||||