Advertisement
Guest User

Untitled

a guest
Jun 30th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.72 KB | None | 0 0
  1. /* l'authentification est associée cette section du web.config
  2. <authentication mode="Forms">
  3.       <forms loginUrl="index.aspx" name=".ASPXAUTH">
  4.         <credentials passwordFormat="Clear">
  5.           <user name="marne" password ="marne"/>
  6.         </credentials>
  7.       </forms>
  8.     </authentication>
  9.     <authorization>
  10.       <deny users="?"/>
  11.     </authorization>
  12. */
  13.            #region authentification
  14.             string userName = Login1.UserName;
  15.             string pwd = Login1.Password;
  16.  
  17.             //authentification via web.config
  18.             if (FormsAuthentication.Authenticate(userName, pwd))
  19.             {
  20.                 FormsAuthentication.RedirectFromLoginPage(userName, false);
  21.             }
  22.             #endregion
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement