web.config in subfolder

L

Luke Ward

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
 
J

Jim Cheshire [MSFT]

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
(e-mail address removed)

This post is provided "AS-IS" with no warranties and confers no rights.


--------------------
 
L

Luke Ward

Thanks

Jim Cheshire said:
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
(e-mail address removed)

This post is provided "AS-IS" with no warranties and confers no rights.


--------------------
From: "Luke Ward" <[email protected]>
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: <[email protected]>
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
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
 
D

Daren Hawes

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,137
Messages
2,570,798
Members
47,347
Latest member
edward_eden

Latest Threads

Top