Tuesday, February 11, 2014

Authontication

<?xml version="1.0"?>
 <configuration>

  <location path="Login.aspx">
    <system.web>
      <authorization>
        <allow users="*"/>
        <deny users="?"/>
      </authorization>
    </system.web>
  </location>

  <location path="FUCK.aspx">
    <system.web>
      <authorization>
        <allow roles="Admin"/>
        <deny users="?"/>
      </authorization>
    </system.web>
  </location>
 
  <system.web>
    <authorization>
      <deny users="?"/>
    </authorization>
  </system.web>
 
  </configuration>

/////////////////////////
Session["User"] = objEnt.UserName;
                    FormsAuthentication.SetAuthCookie(objEnt.UserName, ChkIsLog.Checked);
                    FormsAuthentication.RedirectFromLoginPage(objEnt.UserName, ChkIsLog.Checked);

/////////////////////////
    <authentication mode="Forms">
      <forms loginUrl="~/Account/Login.aspx" timeout="2880" defaultUrl="~/Profiler/UpdateInfo.aspx" />
    </authentication>


//////////////////////////
    <customErrors mode="On" defaultRedirect="Views/Shared/Error.aspx">
      <error statusCode="404" redirect="Views/Shared/NotFound.htm"/>
    </customErrors>
    <machineKey validationKey="AutoGenerate " decryptionKey="AutoGenerate" validation="SHA1"/>
    <trace enabled="true" pageOutput="false"/>

/////////////////////////////////






No comments:

Post a Comment

Sql server row level policy