Different Behavior of the Sitemapdatasource Object

Discussion in 'ASP .Net Web Controls' started by Elan Dro, Jul 15, 2009.

  1. Elan Dro

    Elan Dro Guest

    I have developed a web application using VB.Net 2008 (3.5
    SP1). I have used ASP Menu Control along with the
    Sitemapdatasource for the left side menu of my application.
    It works great from my VS.Net Built in Web Service. It's
    displaying the menu details from the site map.

    But after publishing the web site to the IIS. i'm not
    getting the menu. becaz the sitemapdatasource is not
    returning anything to the menu control now.

    But i'm not sure about this behavior of the
    Sitemapdatasource Object.

    some of the config details for your reference,

    Web.Config file
    <siteMap defaultProvider="LeftMenuProvider">
    <providers>
    <add name="LeftMenuProvider"
    type="System.Web.XmlSiteMapProvider"
    siteMapFile="SiteMaps/MasterLeftMenu.sitemap"
    securityTrimmingEnabled="true"/>
    </providers>
    </siteMap>

    ASPX file
    <asp:Menu ID="Menu1" runat="server"
    DataSourceID="SiteMapDataSource1" >
    </asp:Menu>
    <asp:SiteMapDataSource ID="SiteMapDataSource1"
    runat="server" SiteMapProvider ="LeftMenuProvider"
    ShowStartingNode ="false" />

    Can anyone help me to come out of this ???
     
    Elan Dro, Jul 15, 2009
    #1
    1. Advertisements

  2. Elan Dro

    Stan Guest

    The problem is very likely to be the named provider which isn't set up
    properly on the actual site. The code for it may be missing from the
    assembly.

    Try removing all references to that from the web.config and aspx
    files. It should work by default using the built-in sitemap provider.
    If you name one you have to supply all the code to meet the interface
    requirements.
     
    Stan, Jul 16, 2009
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.