Hi Luke,
If you want to specify settings for a different location in your web.config
file, you need to use <location> tags. There is documentation in the .NET
SDK documentation in VS.NET.
Jim Cheshire [MSFT]
MCP+I, MCSE, MCSD, MCDBA
Microsoft Developer Support
jamesche@online.microsoft.com
This post is provided "AS-IS" with no warranties and confers no rights.
--------------------
[quoted text, click to view] >From: "Luke Ward" <lukeward@campbelluk.com>
>Subject: web.config in subfolder
>Date: Thu, 12 Aug 2004 16:47:48 +0100
>Lines: 26
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
>Message-ID: <e6W95OIgEHA.3988@tk2msftngp13.phx.gbl>
>Newsgroups: microsoft.public.dotnet.framework.aspnet.security
>NNTP-Posting-Host: host217-40-41-241.in-addr.btopenworld.com 217.40.41.241
>Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13
.phx.gbl
[quoted text, click to view] >Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.aspnet.security:11166
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security
>
>Hi
>
>I am using remote web space and cannot seem to use my normal web.config
file
>to secure the folder :-(
>
><authentication mode="Forms">
> <forms name="CATSAuth"
> path="PVLTUpdateGrd"
> loginUrl="Login.aspx"
> protection="All"
> timeout="30"/>
></authentication>
>
><authorization>
> <deny users="*" />
></authorization>
>
>I only have one bin folder(in the root), where i have to store the Dlls,
>does anyone know if I can place a web.config in the root that will secure
>web pages in another folder?
>
>Any advice appreciated
>
>Luke
>
>
>
Hi I have just done that...
Modify your web config like this below.
This will allwo Anon users into your wesite.
<authentication mode="Forms">
<forms loginUrl="Agents_Login.aspx" name="sqlAuthCookie"
timeout="60" path="/" protection="All">
</forms>
</authentication>
<authorization>
<allow users="?" />
</authorization>
Now add this just after the last section of the config file. This will
work.
</system.web>
<!-- Folder
Deny access to this folder
-->
<location path="folder">
<system.web>
<authorization>
<deny users="?"/>
</authorization>
</system.web>
</location>
</configuration>
Thanks Daren
*** Sent via Developersdex
http://www.developersdex.com ***