Solved

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

Posted on 2010-11-09
1
622 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
1 Comment
 
LVL 19

Accepted Solution

by:
Melih SARICA earned 500 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

747 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now