Wrox Programmer Forums
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 20th, 2005, 04:28 AM
Authorized User
 
Join Date: May 2005
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default web.config in subfolder

I have a main directory with many aspx pages created in VB.net.
I have a sub-directory with the backend aspx pages. I want to protect these pages with forms authentication.
(I want to implement form authentication in the sub folder only)

In my subdirectory, I have just added web.config file and getting following error.



Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.


 
Old May 20th, 2005, 09:09 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Take a look at the ASP.NET configuration settings schema:

http://msdn.microsoft.com/library/en...tionschema.asp

Look at the "location" node. The default web.config does not have this node. However, you can create a whole additional <system.web> configuration section for a second location. This way you could define forms authentication for the "sub-directory/" path. This leaves the authentication node in the main application web.config so you don't get the error you posted.

You can use this same technique to make one particular path NON authenticated if you have an entire application that uses some form of authentication.

-Peter





Similar Threads
Thread Thread Starter Forum Replies Last Post
web.config dpkbahuguna ASP.NET 3.5 Basics 2 August 26th, 2008 09:41 AM
web.config vs. app.config darlo Visual Studio 2005 11 August 20th, 2008 07:23 AM
web.config sonny1 ASP.NET 2.0 Basics 1 October 20th, 2007 01:40 PM
web.config nagsumam .NET Framework 1.x 3 November 29th, 2006 10:09 AM
Web Config C# akshay144 VS.NET 2002/2003 0 November 10th, 2006 10:21 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.