Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reusing user controls, forms, etc...
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00884626
Message ID:
00885755
Views:
15
Hi doru,

I see Keith has already stated why you were getting the error. You don't include everything in the sub-directories web.config but just the authentication information. It looks like you already figured that out as well.

>Hi Cathi,
>I had success with adding a sub directory to the project and a form in it, and I could navigate between the forms in the application root directory and the form in the subdirectory. However, as soon as I add a web.config file in the subdir I get an error when I try to navigate to the form:
>
>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.
>Source Error:
>Line 52: lt authentication mode="Windows" /gt
>

>
>I looked at the location tag in web.config as Eugenio suggested - that seems to use one config for different settings in different directories.
>In all, I'm totally confused...
>I thought this should be the simplest thing:
>- the root dir containing forms accessible to all users (including login and registration forms)
>- the 'members' sub directory with forms that require authentication
>I notice you said 'forms authentication at the root directory' - that seems the oposite to what I thought, but in the end I stil won't know how to set it up...
>
>
>
>>Hi Doru,
>>
>>If I am understanding you correctly, you don't want to create two ASP.NET projects. When you do that you have two separate virual directories and you will not be able to treat them as one application. You set forms authentication at the root directory of the application then you can have different web.config files for each directory that have different rights associated with the files contained in them. One ASP.NET project can have multiple web.config files associated with it by placing them in the different subfolders.
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform