Tuesday, March 13, 2012

Sitemap Deployment Problem

The following sitemap works fine on my dev box...
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="/TinaProject/DotNetDevelopment.aspx" title="Home
Page" description="">
<siteMapNode title="Propaganda" description="Tinas Project .Net
Development">
<siteMapNode url="/TinaProject/Advantages.aspx" title="Why
choose DBA?" description="" />
</siteMapNode>
<siteMapNode title="Tech Demos" description="Tinas Project .Net
Development">
<siteMapNode url="/TinaProject/PrintGrid.aspx" title="Print Grid
Component" description="" />
<siteMapNode url="/TinaProject/Intro.aspx" title="Image
Storage/Retrieval" description="" />
<siteMapNode url="/TinaProject/AJAXPage.aspx" title="AJAX
GridView" description="" />
</siteMapNode>
</siteMapNode>
</siteMap>

but when I deploy to my webhoster there is no /TiimaProject directory so the
sitemap doesn't work at the real website. Right now I have to remove all
references to /TimaProject. Is there a way to resolve this so it runs both
on the dev box and the website?
Thanks,
TYes, the best way is usually to use the tilde (~).
Here's an example.
<siteMapNode url="~/DotNetDevelopment.aspx" title="Home Page"
description="">

Here's more info:
http://SteveOrr.net/articles/SiteMaps.aspx
--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Tina" <TinaMSeaburn@.nospamexcite.comwrote in message
news:ONoS531rGHA.3680@.TK2MSFTNGP02.phx.gbl...

Quote:

Originally Posted by

The following sitemap works fine on my dev box...
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="/TinaProject/DotNetDevelopment.aspx" title="Home
Page" description="">
<siteMapNode title="Propaganda" description="Tinas Project .Net
Development">
<siteMapNode url="/TinaProject/Advantages.aspx" title="Why
choose DBA?" description="" />
</siteMapNode>
<siteMapNode title="Tech Demos" description="Tinas Project .Net
Development">
<siteMapNode url="/TinaProject/PrintGrid.aspx" title="Print
Grid Component" description="" />
<siteMapNode url="/TinaProject/Intro.aspx" title="Image
Storage/Retrieval" description="" />
<siteMapNode url="/TinaProject/AJAXPage.aspx" title="AJAX
GridView" description="" />
</siteMapNode>
</siteMapNode>
</siteMap>
>
but when I deploy to my webhoster there is no /TiimaProject directory so
the sitemap doesn't work at the real website. Right now I have to remove
all references to /TimaProject. Is there a way to resolve this so it runs
both on the dev box and the website?
Thanks,
T
>
>

0 comments:

Post a Comment