Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
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 22-Oct-12 21:35pm

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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
  Permalink  
Comments
Member 8901754 at 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 at 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)

  Print Answers RSS
0 OriginalGriff 270
1 Sergey Alexandrovich Kryukov 185
2 BillWoodruff 173
3 CPallini 155
4 Kamal Rocks 144
0 OriginalGriff 5,655
1 DamithSL 4,506
2 Maciej Los 3,997
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,180


Advertise | Privacy | Mobile
Web03 | 2.8.141216.1 | Last Updated 23 Oct 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100