错误XmlSiteMapProvider不存在

时间:2012-03-09 07:39:51

标签: c# asp.net xml sitemapprovider

/// 这是我的Agent.sitemap

<siteMapNode url="default.aspx#" title="Start"  description="Start">

    <siteMapNode url="~/dirCommon/default.aspx" title="Home"  description="Home" />

    <siteMapNode url="dirAgent/profile.aspx#" title="Agent" description="Agent">
        <siteMapNode url="dirAgent/profile.aspx" title="My Profile" description="Agent:My Profile" />
        <siteMapNode url="dirUser/account.aspx" title="My Account" description="Agent:My Account" />
        <!--<siteMapNode url="dirUser/downloads.aspx" title="Downloads" description="Agent:Downloads" />-->
    </siteMapNode>

    <siteMapNode url="dirAgent/default.aspx" title="Calls" description="Calls">
        <siteMapNode url="dirAgent/CallQueue.aspx" title="Call Queue" description="Agent:Call Queue" />
        <siteMapNode url="dirAgent/myCalls.aspx" title="My Calls" description="Agent:My Calls" />
        <siteMapNode url="dirAgent/followupcalls.aspx" title="Follow-Up" description="Agent:Follow-Up" />
        <siteMapNode url="dirAgent/calls.aspx" title="Call History" description="Agent:Call History" />
    </siteMapNode>

    <siteMapNode url="dirAgent/default3.aspx" title="Environment" description="Environment">
        <siteMapNode url="dirAgent/facilities.aspx" title="Facilities" description="Agent:Facilities" />
        <!-->
        <siteMapNode url="dirAgent/contacts.aspx" title="Contacts" description="Agent:Contacts" />
        <!-->
    </siteMapNode>

</siteMapNode>

// 此Web.sitemap

<siteMapNode url="~/dirCommon/default.aspx" title="Home"  description="Home" />

//当我从iis运行应用程序时收到错误“XmlSiteMapProvider所需的AGENT.sitemap不存在。”

1 个答案:

答案 0 :(得分:0)

看起来您在web.config(或代码)中配置了XmlSiteMapProvider以使用 Agent.sitemap 而不是默认的〜/ web.sitemap 。检查该引用和Agent.sitemap的实际位置是否正确!