Different Behavior of the Sitemapdatasource Object


E

Elan Dro

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 ???
 
Ad

Advertisements

S

Stan

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 ???

*** Sent via Developersdexhttp://www.developersdex.com***

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.
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Top