By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,333 Members | 1,391 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,333 IT Pros & Developers. It's quick & easy.

How best implement ASP.NET Forms Authentication?

P: n/a
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
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
JKJ
No, you don't have to. Just use a location element within
your web.config. Go here for an example:

http://www.wilsondotnet.com/Code/?pa...ile=Web.config

-----Original Message-----
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). Inthe examples I've seen, the public files have been in the root folder withit's own Web.config file and the private ones in a subfolder with a separateWeb.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 listthe public pages somehow in the Web.config file? I'm just looking for thebest, most standard way to do this.

Thanks,
Ron
.

Nov 13 '05 #2

P: n/a
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
"JKJ" <je**************@mchsi.com> wrote in message
news:05****************************@phx.gbl...
No, you don't have to. Just use a location element within
your web.config. Go here for an example:

http://www.wilsondotnet.com/Code/?pa...ile=Web.config

-----Original Message-----
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
.

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.