vendredi 14 juin 2019

On click of a button, authenticate the user

I have a home page which can be accessed by anyone(without authentication).For few specific pages in the same web application i want to authenticate, which i did by using below web.config file. But now the issue is i have a button in home page, on click of that button i want to ask for authentication. How do I do this?

<configuration>
    <system.web>
      <authorization>
        <allow roles="BUILTIN\Administrators" />
        <deny users="?" />
      </authorization>
    </system.web>
    <system.webServer>
        <security>
            <authentication>
              <anonymousAuthentication enabled="true" />
              <basicAuthentication enabled="false" />
              <windowsAuthentication enabled="true" />
            </authentication>
        </security>
    </system.webServer>
</configuration>




Aucun commentaire:

Enregistrer un commentaire