I am having the exact same problem. I have been searching for an answer for over 5 hours now. Scenario, I'm not using IIS - I'm using the default IIS-lite that is built into VS.NET 2005. I have one web.config and have tried <location> and another web.config which you should be able to do according to the docs but get the above allowDefinition="MachineToApplication" error. Browsing to the root/default.aspx works great, it only blows up after entering "TheScoop/Default.aspx"
Directory Structure
Root
TheScoop
Default.aspx
Here is the root web.config
1
2 <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
3 <appSettings/>
4 <connectionStrings/>
5 <location path="TheScoop">
6 <system.web>
7 <siteMap defaultProvider="siteMapHeader1">
8 <providers>
9 <clear />
10 <add name="siteMapHeader1"
11 description="The Scoop SiteMap provider."
12 type="DevExpress.Web.ASPxSiteMapControl, DevExpress.Web.v7.1, Version=7.1.2.0, Culture=neutral, PublicKeyToken=79868B8147B5EAE4"
13 siteMapFile="~/App_Data/TheScoop.sitemap"
14 securityTrimmingEnabled="true" />
15 </providers>
16 </siteMap>
17 </system.web>
18 </location>
19
20 <system.web>
21 <compilation debug="true">
22 <assemblies>
23 <add assembly="DevExpress.Web.v7.1, Version=7.1.2.0, Culture=neutral, PublicKeyToken=79868B8147B5EAE4" />
24 <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
25 <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
26 </assemblies>
27 </compilation>
28 <authentication mode="None"/>
29 </system.web>
30 </configuration>
Here you can see I'm using the <location> tag and really nothing special here. Here is a sample of the web.config for "TheScoop" directory - keep in mind that I comment out the <location> tag when I try this. Also this is under the "TheScoop" directory.
1
2 <!--
3 Note: As an alternative to hand editing this file you can use the
4 web admin tool to configure settings for your application. Use
5 the Website->Asp.Net Configuration option in Visual Studio.
6 A full list of settings and comments can be found in
7 machine.config.comments usually located in
8 \Windows\Microsoft.Net\Framework\v2.x\Config
9 -->
10 <configuration>
11 <system.web>
12 <siteMap defaultProvider="siteMapHeader1">
13 <providers>
14 <clear />
15 <add name="siteMapHeader1"
16 description="The Scoop SiteMap provider."
17 type="DevExpress.Web.ASPxSiteMapControl, DevExpress.Web.v7.1, Version=7.1.2.0, Culture=neutral, PublicKeyToken=79868B8147B5EAE4"
18 siteMapFile="~/App_Data/TheScoop.sitemap"
19 securityTrimmingEnabled="true" />
20 </providers>
21 </siteMap>
22 </system.web>
23 </configuration>
Here is the error produced.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
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.
Source Error:
Line 5: <location path="TheScoop">
Line 6: <system.web>
Line 7: <siteMap defaultProvider="siteMapHeader1">
Line 8: <providers>
Line 9: <clear /> |
Source File: C:\Documents and Settings\jcrosby\My Documents\Visual Studio 2005\Projects\ScoopologyWeb\ScoopologyWeb\web.config Line: 7
I have tried "right-clicking" on "TheScoop" folder to "Convert to Web Application" in the Solution Explorer and that seems to do nothing.
Thanks for all the help in advance
Josh
PS. For some reason pasting the code has eliminated the first line of code.