Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I,m working out form authentication by reading this page:
http://www.asp.net/web-forms/tutorials/security/introduction/forms-authentication-configuration-and-advanced-topics-cs
everything was ok till I reach to "Writing Information to UserData" section, I copy the code to VS 2010 and run the app, but when I input the username and password, page reload the default.aspx and still I'm not login,
where I'm wrong you think?
Posted

1 solution

First how do you know you are not logged in???
Second if you did exactly what they do that is the right thing to happen to be redirected again to the default.aspx,why?
simply because the defaultUrl property in the web.config file hasn't been set, so what is the defaultUrl property?
it's the page that you will be redirected to after being authenticated and if you dont set it you will be redirected to your home page which I think the default.aspx, so make sure you set this property to the page you want
 
Share this answer
 
Comments
Z@db@khsh 27-Oct-12 3:48am    
Thanks for reply...
for your first question: because I see the default.aspx link in adress bar but by this configuration apear LoggIn link in center. this mean I'm not loggin.
second: you right... my defaultUrl not set, but this is not important, caiuse I'm loking for log in to site, and that's not happend... why? I can't understand...
a1mimo 27-Oct-12 14:46pm    
It seems that you posted your web.config but for some reason it isn't appear in here so try to improve question and put it there in the question, and I can't quite understand the next part of your reply

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900