Authentication through web.config not authenticating in ASP.net 3.5

前端 未结 5 684
无人及你
无人及你 2020-12-16 17:04

This is one of this things that should be extremely simple and I just can\'t work out why it\'s not working.

I\'m trying to set up some very quick authentication for

5条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-16 17:56

    You have to specify when you store password in clear text.

    The alternatives are encrypted passwords using MD5 or SHA1.

    See http://msdn.microsoft.com/en-us/library/system.web.security.formsauthentication.hashpasswordforstoringinconfigfile.aspx for a function to encode a password.

    You might also consider using some of the available user controls that does a lot for you automatically. Look under the "Login" section in the control toolbox in Visual Studio.

    The following page will provide everything you need for this simple case, and the looks of the Login control is fully customizable:

    <%@ Page Language="C#" %>
    
    
    
    
    
    
    
        Login
    
    
        

提交回复
热议问题