Next we configure the Web.config
file of the TropicalGreen project to use Forms authentication.
Open the Web.config
file of the TropicalGreen project. Look for the <authentication>
tag. By default, it is set to use Windows authentication. Comment out the line <authentication mode="Windows"
/>
and add in the code highlighted below to change the authentication mechanism to Forms.
<!-- AUTHENTICATION
This section sets the authentication policies of the application.
Possible modes are "Windows", "Forms", "Passport" and "None"
-->
<!-- authentication mode="Windows" / -->
<authentication mode="Forms"></authentication>
Between the <authentication>
tags, add the <forms>
tag. Here, we name the cookie TropicalGreenAuthCookie
, set the login form path to /tropicalgreen/Login.aspx
(we will build this later), configure the protection level to all
and the cookie timeout period to 30 minutes.
<forms...