How best implement ASP.NET Forms Authentication?

  • Thread starter Thread starter Ronald S. Cook
  • Start date Start date
R

Ronald S. Cook

In my ASP.NET app, I have a few pages that I want to be public (i.e.
accessible by everyone) and the rest private (user has to be signed in). In
the examples I've seen, the public files have been in the root folder with
it's own Web.config file and the private ones in a subfolder with a separate
Web.config file.

Must I necessarily use a subfolder to separate private from public files?
Could I maybe have them all in the same root folder but then perhaps list
the public pages somehow in the Web.config file? I'm just looking for the
best, most standard way to do this.

Thanks,
Ron
 
Thanks.. that works great. But, would I have to create a locatio section
for every public page or is there a more abbreviated way to do it?

<location path="About.aspx">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
<location path="Help.aspx">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>

Thanks,
Ron
 
Back
Top