Isaac
asked on
SiteMapPath Control
Hello All,
I have a book called "Beggining ASP.NET 2.0" by WROX.
Right now I am in Chapter 3 trying to do the example on SiteMapPath Control on page 88.
Whenever I run it, I get the following error and I can't figure out why it's happening.
Error:
"It is an error to use a section registered as allowDefinition='MachineTo Applicatio n' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS."
First of all, why is "IIS" being mentioned. Isn't it supposed to be "Cassini"?
Thank you any help will truly be appreciated. Thanks.
I have a book called "Beggining ASP.NET 2.0" by WROX.
Right now I am in Chapter 3 trying to do the example on SiteMapPath Control on page 88.
Whenever I run it, I get the following error and I can't figure out why it's happening.
Error:
"It is an error to use a section registered as allowDefinition='MachineTo
First of all, why is "IIS" being mentioned. Isn't it supposed to be "Cassini"?
Thank you any help will truly be appreciated. Thanks.
Well, I'd need more information, could you post your web.config file here, as it is most likely there the problem lies.
ASKER
<?xml version="1.0"?>
<!-- Note: As an alternative to hand editing this file you can use the web admin tool to
configure settings for your application. Use the Website->Asp.Net Configuration option
in Visual Studio.
A full list of settings and comments can be found in machine.config.comments usually
located in \Windows\Microsft.Net\Fram eworks\v2. x\Config -->
<configuration>
<!--
Mode defines certain feature availability:
Full: No restrictions
Real: Runs as if a real site, without the view code, download and user/role view links
-->
<appSettings>
<add key="mode" value="Full" />
</appSettings>
<!--
define the connection string to the database
-->
<connectionStrings>
<add name="WroxUnited"
connectionString="Data Source=.\SQLEXPRESS;Attach DbFilename =|DataDire ctory|Wrox United.mdf ;Integrate d Security=True;User Instance=True"
providerName="System.Data. SqlClient" />
</connectionStrings>
<system.web>
<httpModules>
<add name="Page" type="Wrox.Web.GlobalEvent s.ThemeMod ule" />
</httpModules>
<!--
Set compilation debug="true" to insert debugging symbols into the compiled page.
Because this affects performance, set this value to true only during development.
-->
<compilation debug="true">
</compilation>
<!--
Set forms authentication and define the login page
-->
<authentication mode="Forms">
<forms loginUrl="Default.aspx" />
</authentication>
<!--
Enable the role manager
This controls access to pages and the visibility of certain menu items
-->
<roleManager enabled="true"/>
<anonymousIdentification enabled="true"/>
<!--
The <customErrors> section enables configuration of what to do if/when an unhandled
error occurs during the execution of a request. Specifically, it enables developers
to configure html error pages to be displayed in place of a error stack trace.
-->
<customErrors mode="RemoteOnly">
<error statusCode="404" redirect="missingPage.aspx "/>
</customErrors>
<!--
Redefine the Site Map Provider, to add the security trimming attribute,
which is off by default
-->
<siteMap defaultProvider="AspXmlSit eMapProvid er" enabled="true">
<providers>
<clear/>
<add name="AspXmlSiteMapProvide r" type="System.Web.XmlSiteMa pProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d 50a3a"
siteMapFile="web.sitemap" securityTrimmingEnabled="t rue"/>
</providers>
</siteMap>
<!--
Define the SMTP Mail server settings
Required for the PasswordRecovery control (and possibly mailshots)
<smtpMail from="admin@wroxunited.com " serverName="your_smtp_serv er">
<fields>
</fields>
</smtpMail>
-->
<!--
Define the user profile properties
-->
<profile enabled="true">
<properties>
<add name="MemberName"/>
<add name="Name"/>
<add name="Address"/>
<add name="City"/>
<add name="County"/>
<add name="PostCode"/>
<add name="Country"/>
<add name="Mailings" type="System.Boolean"/>
<add name="Email"/>
<add name="Theme"/>
<add name="Cart" serializeAs="Binary" type="Wrox.Commerce.Shoppi ngCart" allowAnonymous="true"/>
</properties>
</profile>
</system.web>
</configuration>
<!-- Note: As an alternative to hand editing this file you can use the web admin tool to
configure settings for your application. Use the Website->Asp.Net Configuration option
in Visual Studio.
A full list of settings and comments can be found in machine.config.comments usually
located in \Windows\Microsft.Net\Fram
<configuration>
<!--
Mode defines certain feature availability:
Full: No restrictions
Real: Runs as if a real site, without the view code, download and user/role view links
-->
<appSettings>
<add key="mode" value="Full" />
</appSettings>
<!--
define the connection string to the database
-->
<connectionStrings>
<add name="WroxUnited"
connectionString="Data Source=.\SQLEXPRESS;Attach
providerName="System.Data.
</connectionStrings>
<system.web>
<httpModules>
<add name="Page" type="Wrox.Web.GlobalEvent
</httpModules>
<!--
Set compilation debug="true" to insert debugging symbols into the compiled page.
Because this affects performance, set this value to true only during development.
-->
<compilation debug="true">
</compilation>
<!--
Set forms authentication and define the login page
-->
<authentication mode="Forms">
<forms loginUrl="Default.aspx" />
</authentication>
<!--
Enable the role manager
This controls access to pages and the visibility of certain menu items
-->
<roleManager enabled="true"/>
<anonymousIdentification enabled="true"/>
<!--
The <customErrors> section enables configuration of what to do if/when an unhandled
error occurs during the execution of a request. Specifically, it enables developers
to configure html error pages to be displayed in place of a error stack trace.
-->
<customErrors mode="RemoteOnly">
<error statusCode="404" redirect="missingPage.aspx
</customErrors>
<!--
Redefine the Site Map Provider, to add the security trimming attribute,
which is off by default
-->
<siteMap defaultProvider="AspXmlSit
<providers>
<clear/>
<add name="AspXmlSiteMapProvide
siteMapFile="web.sitemap" securityTrimmingEnabled="t
</providers>
</siteMap>
<!--
Define the SMTP Mail server settings
Required for the PasswordRecovery control (and possibly mailshots)
<smtpMail from="admin@wroxunited.com
<fields>
</fields>
</smtpMail>
-->
<!--
Define the user profile properties
-->
<profile enabled="true">
<properties>
<add name="MemberName"/>
<add name="Name"/>
<add name="Address"/>
<add name="City"/>
<add name="County"/>
<add name="PostCode"/>
<add name="Country"/>
<add name="Mailings" type="System.Boolean"/>
<add name="Email"/>
<add name="Theme"/>
<add name="Cart" serializeAs="Binary" type="Wrox.Commerce.Shoppi
</properties>
</profile>
</system.web>
</configuration>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.