MWPSK on 1and1 Microsoft Shared Hosting

Topics: User Forum
Jul 21, 2008 at 6:02 PM
I think I'm going to love MWPSK - if I get it to work properly!!

On 1and1 I had to get tech support to help get things set up - they had to activate ASP 2.0.  I also had to set my web address to point to my root directory, and have a redirect script in default.asp redirecting to the directory (MWPSK) where I had uploaded the website.  i.e. My test website is at www.mwpsk.2chq.com which points to the root directory of my shared hosting location http://s219431573.onlinehome.us/MWPSK/Default.aspx, where the file default.asp has the script:

<html>
<%EnableSessionState=False

 host = Request.ServerVariables("HTTP_HOST")
 
 if host = "mwpsk.2chq.com" or host = "www.mwpsk.2chq.com" then
 response.redirect("http://s219431573.onlinehome.us/MWPSK/Default.aspx")
 
 else
 response.redirect("http://s219431573.onlinehome.us/home.aspx")
 
 end if
%>

</html>

So - everything looked fine and I was able to experiment with MWPSK, and feeling pretty impressed with it.  Then I tried to reset the website to its original form.

On the page http://localhost:1915/MyWebPagesStarterKit_1.2.1/administration/website.aspx I clicked on the button (line 58 in the code) to reset the website.  In the process the site crashed and now I get the message below.  Any suggestions how to fix this so that this button works?

 

Server Error in '/MWPSK' Application.

Multiple nodes with the same URL '/MWPSK/homepage.aspx' were found. XmlSiteMapProvider requires that sitemap nodes have unique URLs.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Configuration.ConfigurationErrorsException: Multiple nodes with the same URL '/MWPSK/homepage.aspx' were found. XmlSiteMapProvider requires that sitemap nodes have unique URLs.

Source Error:

[No relevant source lines]

Source File: App_Web_8xkvj7s1.0.cs    Line: 0

Stack Trace:

[ConfigurationErrorsException: Multiple nodes with the same URL '/MWPSK/homepage.aspx' were found. XmlSiteMapProvider requires that sitemap nodes have unique URLs.]
   System.Web.XmlSiteMapProvider.AddNodeInternal(SiteMapNode node, SiteMapNode parentNode, XmlNode xmlNode) +618
   System.Web.XmlSiteMapProvider.ConvertFromXmlNode(Queue queue) +315
   System.Web.XmlSiteMapProvider.BuildSiteMap() +1161
   System.Web.XmlSiteMapProvider.get_RootNode() +12
   System.Web.UI.WebControls.SiteMapDataSource.GetNodes() +219
   System.Web.UI.WebControls.SiteMapDataSource.GetTreeView(String viewPath) +32
   System.Web.UI.WebControls.SiteMapDataSource.GetHierarchicalView(String viewPath) +29
   System.Web.UI.HierarchicalDataSourceControl.System.Web.UI.IHierarchicalDataSource.GetHierarchicalView(String viewPath) +7
   System.Web.UI.WebControls.HierarchicalDataBoundControl.GetData(String viewPath) +22
   System.Web.UI.WebControls.Menu.DataBindItem(MenuItem item) +42
   System.Web.UI.WebControls.Menu.PerformDataBinding() +117
   System.Web.UI.WebControls.HierarchicalDataBoundControl.PerformSelect() +82
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
   System.Web.UI.WebControls.Menu.DataBind() +4
   System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
   System.Web.UI.WebControls.Menu.EnsureDataBound() +29
   System.Web.UI.WebControls.Menu.OnPreRender(EventArgs e, Boolean registerScript) +21
   System.Web.UI.WebControls.Menu.OnPreRender(EventArgs e) +22
   System.Web.UI.Control.PreRenderRecursiveInternal() +86
   System.Web.UI.Control.PreRenderRecursiveInternal() +170
   System.Web.UI.Control.PreRenderRecursiveInternal() +170
   System.Web.UI.Control.PreRenderRecursiveInternal() +170
   System.Web.UI.Control.PreRenderRecursiveInternal() +170
   System.Web.UI.Control.PreRenderRecursiveInternal() +170
   System.Web.UI.Control.PreRenderRecursiveInternal() +170
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +7248
   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +213
   System.Web.UI.Page.ProcessRequest() +86
   System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +18
   System.Web.UI.Page.ProcessRequest(HttpContext context) +49
   ASP.default_aspx.ProcessRequest(HttpContext context) in App_Web_8xkvj7s1.0.cs:0
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +358
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64


Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433

<!-- [ConfigurationErrorsException]: Multiple nodes with the same URL '/MWPSK/homepage.aspx' were found. XmlSiteMapProvider requires that sitemap nodes have unique URLs. at System.Web.XmlSiteMapProvider.AddNodeInternal(SiteMapNode node, SiteMapNode parentNode, XmlNode xmlNode) at System.Web.XmlSiteMapProvider.ConvertFromXmlNode(Queue queue) at System.Web.XmlSiteMapProvider.BuildSiteMap() at System.Web.XmlSiteMapProvider.get_RootNode() at System.Web.UI.WebControls.SiteMapDataSource.GetNodes() at System.Web.UI.WebControls.SiteMapDataSource.GetTreeView(String viewPath) at System.Web.UI.WebControls.SiteMapDataSource.GetHierarchicalView(String viewPath) at System.Web.UI.HierarchicalDataSourceControl.System.Web.UI.IHierarchicalDataSource.GetHierarchicalView(String viewPath) at System.Web.UI.WebControls.HierarchicalDataBoundControl.GetData(String viewPath) at System.Web.UI.WebControls.Menu.DataBindItem(MenuItem item) at System.Web.UI.WebControls.Menu.PerformDataBinding() at System.Web.UI.WebControls.HierarchicalDataBoundControl.PerformSelect() at System.Web.UI.WebControls.BaseDataBoundControl.DataBind() at System.Web.UI.WebControls.Menu.DataBind() at System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() at System.Web.UI.WebControls.Menu.EnsureDataBound() at System.Web.UI.WebControls.Menu.OnPreRender(EventArgs e, Boolean registerScript) at System.Web.UI.WebControls.Menu.OnPreRender(EventArgs e) at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.default_aspx.ProcessRequest(HttpContext context) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\mwpsk\623337c9\a898c86a\App_Web_8xkvj7s1.0.cs:line 0 at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) --><!-- This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using <customErrors mode="Off"/>. Consider using <customErrors mode="On"/> or <customErrors mode="RemoteOnly"/> in production environments.-->

Jul 21, 2008 at 7:02 PM
Hi!
Have a look at the "Web.sitemap" file in the App_Data folder. Maybe you´ve got duplicate entries there. As you can read from the error message the urls there have to be unique.
Jul 21, 2008 at 7:31 PM

OK - I have a duplicate entry there:

<?

 

xml version="1.0" encoding="utf-8"?>

 

<

 

siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0">

 

<

 

siteMapNode>

 

<

 

siteMapNode url="~/administration/default.aspx" title="Administration">

 

<

 

siteMapNode url="~/administration/website.aspx" title="CMS Setup" />

 

<

 

siteMapNode url="~/administration/sections.aspx" title="Sections/Page Assignment" />

 

<

 

siteMapNode url="~/administration/navigation.aspx" title="Pages and Navigation" />

 

<

 

siteMapNode url="~/administration/users.aspx" title="User Management" />

 

</

 

siteMapNode>

 

<

 

siteMapNode title="Home" url="~/homepage.aspx" visible="True" pageId="c03bd1f0-8057-418c-8f23-78daa5144783" />

 

<

 

siteMapNode title="Home" url="~/homepage.aspx" visible="True" pageId="12ab45cf-1062-48dd-9ad8-5fb471e6c930" />

 

</

 

siteMapNode>

 

</

 

siteMap>

Hmmm... I'm new at this - only know HTML so far.  So how did it get there?  Is there a bug in MWPK?
Should I delete one (or both) of these?  How do I know which one to delete?  Or should I delete the whole App-data directory?

Thanks!
kdr

 

Jul 21, 2008 at 8:23 PM
Look here:
<siteMapNode title="Home" url="~/homepage.aspx" visible="True" pageId="c03bd1f0-8057-418c-8f23-78daa5144783" />
<
siteMapNode title="Home" url="~/homepage.aspx" visible="True" pageId="12ab45cf-1062-48dd-9ad8-5fb471e6c930"

The pageId attribute is most important to MWPSK. One can see you´re dealing with two different pages since these pageIds are not identical. But the url attribute is duplicate. And this is what poses a problem to some standard ASP.NET classes. As a rule of thumb just remember: Don´t use duplicate urls in sitemaps.

MWPSK writes the .sitemap file for you as soon as you begin to create new pages or reorder pages in the page administration. And I suppose this is where you did go wrong: there´s a field that will allow you to enter a "virtual path". A nice feature to make your urls look neat. The value you enter here will show up in the url attribute in your sitemap file. I don´t think MWPSK will prevent you from using a virtual path that you already assigned to another page. (maybe this a thing to care for in one of the next releases?!)

So you can end up with duplicate urls in your sitemap file without modifing that file manualy.

To get your site running again just try to replace one of the url attributes by "~/homepage2.aspx". Don´t alter the pageId attributes. And of course don´t delete your App_Data folder. This is where the content of your website really gets stored. Nothing more important than that!

Jul 21, 2008 at 9:25 PM
Thanks - got that figured out now!  I guess when you reset the website it does not remove the old pages - that would have to be done manually.
And the new home page automatically assumed the same vitual path creating a duplicate....  A bit of a bug, but easy to work around...
Thanks so much for your help!  Learning is sometimes a slow, painful process!
kdr