[Mono-aspnet-list] MenuTableRenderer System.NullReferenceException
magic-monoasp at damage.devloop.de
magic-monoasp at damage.devloop.de
Thu Oct 27 09:42:25 EDT 2011
Hi all,
I have created an ASP.NET Website in Visiual Studio 2010. When I try to run
it under Linux/Mono/Apache/mod_mono I get following Exception:
---------------------------------------------------------
System.NullReferenceException: Object reference not set to an instance of
an object
at System.Web.UI.WebControls.MenuTableRenderer.RenderMenuItem
(System.Web.UI.HtmlTextWriter writer, System.Web.UI.WebControls.MenuItem
item, Boolean vertical, Boolean notLast, Boolean isFirst,
System.Web.UI.WebControls.OwnerContext oc) [0x00000] in <filename unknown>:0
at System.Web.UI.WebControls.MenuTableRenderer.RenderMenuBody
(System.Web.UI.HtmlTextWriter writer,
System.Web.UI.WebControls.MenuItemCollection items, Boolean vertical,
Boolean dynamic, Boolean notLast) [0x00000] in <filename unknown>:0
at System.Web.UI.WebControls.MenuTableRenderer.RenderContents
(System.Web.UI.HtmlTextWriter writer) [0x00000] in <filename unknown>:0
at System.Web.UI.WebControls.Menu.RenderContents
(System.Web.UI.HtmlTextWriter writer) [0x00000] in <filename unknown>:0
at System.Web.UI.WebControls.WebControl.Render
(System.Web.UI.HtmlTextWriter writer) [0x00000] in <filename unknown>:0
at System.Web.UI.WebControls.Menu.Render (System.Web.UI.HtmlTextWriter
writer) [0x00000] in <filename unknown>:0
at System.Web.UI.Control.RenderControl (System.Web.UI.HtmlTextWriter
writer) [0x00000] in <filename unknown>:0
at System.Web.UI.Control.RenderChildren (System.Web.UI.HtmlTextWriter
writer) [0x00000] in <filename unknown>:0
at System.Web.UI.HtmlControls.HtmlForm.RenderChildren
(System.Web.UI.HtmlTextWriter w) [0x00000] in <filename unknown>:0
at System.Web.UI.HtmlControls.HtmlContainerControl.Render
(System.Web.UI.HtmlTextWriter writer) [0x00000] in <filename unknown>:0
at System.Web.UI.HtmlControls.HtmlForm.Render
(System.Web.UI.HtmlTextWriter w) [0x00000] in <filename unknown>:0
at System.Web.UI.Control.RenderControl (System.Web.UI.HtmlTextWriter
writer) [0x00000] in <filename unknown>:0
at System.Web.UI.HtmlControls.HtmlForm.RenderControl
(System.Web.UI.HtmlTextWriter w) [0x00000] in <filename unknown>:0
at System.Web.UI.Control.RenderChildren (System.Web.UI.HtmlTextWriter
writer) [0x00000] in <filename unknown>:0
at System.Web.UI.Control.Render (System.Web.UI.HtmlTextWriter writer)
[0x00000] in <filename unknown>:0
at System.Web.UI.Control.RenderControl (System.Web.UI.HtmlTextWriter
writer) [0x00000] in <filename unknown>:0
at System.Web.UI.Control.RenderChildren (System.Web.UI.HtmlTextWriter
writer) [0x00000] in <filename unknown>:0
at System.Web.UI.Control.Render (System.Web.UI.HtmlTextWriter writer)
[0x00000] in <filename unknown>:0
at System.Web.UI.Page.Render (System.Web.UI.HtmlTextWriter writer)
[0x00000] in <filename unknown>:0
at System.Web.UI.Control.RenderControl (System.Web.UI.HtmlTextWriter
writer) [0x00000] in <filename unknown>:0
at System.Web.UI.Page.RenderPage () [0x00000] in <filename unknown>:0
at System.Web.UI.Page.InternalProcessRequest () [0x00000] in <filename
unknown>:0
at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context)
[0x00000] in <filename unknown>:0
---------------------------------------------------------
I have used a dynamic Menu with SiteMapDataSource. If I remove the Menu
control the Website is shown. My Web.config is:
---------------------------------------------------------
<?xml version="1.0"?>
<configuration>
<appSettings/>
<connectionStrings>
<add name="KeymanagerConnectionString"
connectionString="server=ber06075;User Id=myuser;password=mysecret;Persist
Security Info=True;database=mydatabase"
providerName="MySql.Data.MySqlClient"/>
</connectionStrings>
<system.web>
<siteMap defaultProvider="XmlSiteMapProvider" enabled="true">
<providers>
<add name="XmlSiteMapProvider" description="Default SiteMap provider."
type="System.Web.XmlSiteMapProvider, System.Web, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" siteMapFile="Web.sitemap"
securityTrimmingEnabled="true"/>
</providers>
</siteMap>
<roleManager enabled="true"
defaultProvider="AspNetWindowsTokenRoleProvider"/>
<customErrors mode="Off"/>
<compilation debug="true" targetFramework="4.0">
</compilation>
<pages controlRenderingCompatibilityVersion="3.5"
clientIDMode="AutoID"/></system.web>
</configuration>
---------------------------------------------------------
The Site Map file:
---------------------------------------------------------
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="Default.aspx" title="Home" description="">
<siteMapNode url="admin/ManageKeys.aspx" title="Manage Keys"
description="" />
<siteMapNode url="LendKey.aspx" title="Lend Key" description="" />
</siteMapNode>
</siteMap>
---------------------------------------------------------
Any ideas what I have done wrong? How can I gather more informations? Is
there a flag on mono to compile/install it with debugging symbols?
regards
Daniel
More information about the Mono-aspnet-list
mailing list