?
Solved

"The file web.sitemap required by XmlSiteMapProvider does not exist." error in ASP.Net

Posted on 2010-11-09
1
Medium Priority
?
671 Views
Last Modified: 2012-05-10
Hi experts – Need help with this error. Its running fine in my localhost, but after IIS deployment I’m getting the error. The environment is VS2005, VB.Net and SQL Server 2005. The default.aspx page uses a master page that has the following in the markup

<asp:SiteMapDataSource ID="smds" runat="server" />
<asp:TreeView ID="trvNavigation" runat="server" NodeIndent="5" NodeWrap="True" PopulateNodesFromClient="False" ShowLines="True">
<RootNodeStyle ForeColor="#000000" Font-Size="16px" Font-Bold="true" />
     <HoverNodeStyle CssClass="NavTreeNodeHover"  />
     <NodeStyle CssClass="NavTreeNode" />
</asp:TreeView>

The sitemap is Initialized as follows during Session_OnStart:
 
Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
        ' Code that runs when a new session is started
        SharedCode.InitializeSiteMap(User.Identity.Name, Me.Context)
End Sub
 
Public Shared Sub InitializeSiteMap(ByVal username As String, ByVal context As HttpContext)
        Dim smp As SOC2005.ccSiteMapProviderLDAP = New SOC2005.ccSiteMapProviderLDAP()

        smp.BuildSiteMap(username)
        context.Session("smp") = smp
End Sub

‘This is the code for the Init event of Master page
Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
        smds.Provider = CType(Session("smp"), SiteMapProvider)
        trvNavigation.DataSourceID = "smds"
        'trvNavigation.DataBind()
End Sub
0
Comment
Question by:pb102674
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 19

Accepted Solution

by:
Melih SARICA earned 2000 total points
ID: 34099558
default xmlsitemapprovider is added in ur project
remove that provider in ur web.config file ( dont forget inhetitance from the machine.config) add romove all in ur sitemap section
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question