Look at other people's code and find the following sentence:
Formsauthentication. redirectfromloginpage (userid, false );
Can be redirected to another page, but I didn't specify the page to be redirected here,
I used to have configuration in Web. config.
[Code] <Authentication mode = "forms">
<Forms loginurl = "login. aspx"> </Forms>
</Authentication>
<Authorization>
<Deny users = "? "/>
</Authorization> [/Code]
Haha, this is a good thing. When using form authentication, if you do not log on, no matter which page you open, you will go to the specified logon page. After logging on, can return the page you specified...
Authentication mode = "forms">
<Forms loginurl = "login. aspx"> </Forms>
</Authentication>
----------------------------- The above is the identity verification
----------------- The following are authorized
<Authorization>
<Deny users = "? "/>
</Authorization>
Redirects authenticated users back to the original requested URL
Why is context. User. Identity. name always blank ??
Create an ihttpmodule and register it in Web. config.
Then, user tags are recorded in cookies or sessions,
During each application. axxxxxrequest (I do not know how to write, verify the request), the context. User = new myprincipal (userid) is re-executed based on the session information based on cookies );