?
Solved

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

Posted on 2010-11-09
1
Medium Priority
?
699 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 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

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

Question has a verified solution.

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

An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
This shares a stored procedure to retrieve permissions for a given user on the current database or across all databases on a server.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Suggested Courses

807 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