Authentication in ASP.NET using FormsAuthentication
<p>I am using <code>FormsAuthentication</code> and <code>ASP.NET Memberships and Roles</code> in my ASP.NET project. I have some aspx files which can be viewed / accessed by only authenticated users. I think I can do this using one of the following two ways. </p>

<ol>
<li><p>Configuring the web.config file. Allow users with roles 'admin' and 'members' to access those apsx files, and deny all other anonymous users.</p></li>
<li><p>In page_load events of those apsx files, just checking whether the curent user is authenticated or not using <code>HttpContext.Current.User.Identity.IsAuthenticated</code></p></li>
</ol>

<p>I am wondering whether these two approaches are equivalent or not for apsx files. </p>
