Solved

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

Posted on 2010-11-09
1
632 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

832 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