Error 500 with BE 1.3.0.23 and mono 1.9

Topics: ASP.NET 2.0, Controls, Themes
Mar 22, 2008 at 4:19 PM
I'm using the latest BE.N and I've update my mono installation from 1.2.6 to 1.9 which is just release.

Starting directly from the directory with xsp2 or with mod_mono in apache2 result in the same error.

Server Error in '/' Application

--------------------------------------------------------------------------------

Must provide 'page' or 'control' attribute
Description: HTTP 500. Error processing request.

Stack Trace:

System.Web.Compilation.ParseException: Must provide 'page' or 'control' attribute
at System.Web.UI.BaseParser.ThrowParseException (System.String message, System.Object[] parms) 0x00000
at System.Web.UI.TemplateControlParser.AddDirective (System.String directive, System.Collections.Hashtable atts) 0x00000
at System.Web.Compilation.AspGenerator.TagParsed (ILocation location, TagType tagtype, System.String tagid, System.Web.Compilation.TagAttributes attributes) 0x00000
at System.Web.Compilation.AspParser.OnTagParsed (TagType tagtype, System.String id, System.Web.Compilation.TagAttributes attributes) 0x00000
at System.Web.Compilation.AspParser.Parse () 0x00000
at System.Web.Compilation.AspGenerator.Parse (System.String file, Boolean doInitParser) 0x00000
at System.Web.Compilation.AspGenerator.Parse (System.String file) 0x00000
at System.Web.Compilation.AspGenerator.Parse () 0x00000
at System.Web.Compilation.GenericBuildProvider`1System.Web.UI.TemplateParser.Parse () 0x00000
at System.Web.Compilation.GenericBuildProvider`1System.Web.UI.TemplateParser.get_CodeCompilerType () 0x00000
at System.Web.Compilation.BuildManager.GetCodeDomProviderType (System.Web.Compilation.BuildProvider provider) 0x00000
at System.Web.Compilation.BuildManager+BuildItem..ctor (System.Web.Compilation.BuildProvider provider) 0x00000
at System.Web.Compilation.BuildManager.LoadBuildProviders (System.String virtualPath, System.String virtualDir, System.Collections.Generic.Dictionary`2 vpCache, System.Web.Compilation.BuildKind& kind, System.String& assemblyBaseName) 0x00000
at System.Web.Compilation.BuildManager.BuildAssembly (System.String virtualPath) 0x00000
at System.Web.Compilation.BuildManager.GetCompiledType (System.String virtualPath) 0x00000
at System.Web.UI.TemplateControl.GetTypeFromControlPath (System.String virtualPath) 0x00000
at System.Web.UI.TemplateControl.LoadControl (System.String virtualPath) 0x00000
at Controls.WidgetZone.RenderControl (System.Web.UI.HtmlTextWriter writer) 0x00000
at ASP.themesstandardsidepanelascx._RenderTree (System.Web.UI.HtmlTextWriter __output, System.Web.UI.Control parameterContainer) 0x00000
at System.Web.UI.Control.RenderChildren (System.Web.UI.HtmlTextWriter writer) 0x00000
at System.Web.UI.Control.Render (System.Web.UI.HtmlTextWriter writer) 0x00000
at System.Web.UI.Control.RenderControl (System.Web.UI.HtmlTextWriter writer) 0x00000
at ASP.themesstandardsitemaster._Render_bctrl47 (System.Web.UI.HtmlTextWriter __output, System.Web.UI.Control parameterContainer) 0x00000
at System.Web.UI.Control.RenderChildren (System.Web.UI.HtmlTextWriter writer) 0x00000
at System.Web.UI.HtmlControls.HtmlForm.RenderChildren (System.Web.UI.HtmlTextWriter w) 0x00000
at System.Web.UI.HtmlControls.HtmlContainerControl.Render (System.Web.UI.HtmlTextWriter writer) 0x00000
at System.Web.UI.HtmlControls.HtmlForm.Render (System.Web.UI.HtmlTextWriter w) 0x00000
at System.Web.UI.Control.RenderControl (System.Web.UI.HtmlTextWriter writer) 0x00000
at System.Web.UI.HtmlControls.HtmlForm.RenderControl (System.Web.UI.HtmlTextWriter w) 0x00000
at ASP.themesstandardsitemaster._RenderTree (System.Web.UI.HtmlTextWriter __output, System.Web.UI.Control parameterContainer) 0x00000
at System.Web.UI.Control.RenderChildren (System.Web.UI.HtmlTextWriter writer) 0x00000
at System.Web.UI.Control.Render (System.Web.UI.HtmlTextWriter writer) 0x00000
at System.Web.UI.Control.RenderControl (System.Web.UI.HtmlTextWriter writer) 0x00000
at System.Web.UI.Control.RenderChildren (System.Web.UI.HtmlTextWriter writer) 0x00000
at System.Web.UI.Control.Render (System.Web.UI.HtmlTextWriter writer) 0x00000
at System.Web.UI.Page.Render (System.Web.UI.HtmlTextWriter writer) 0x00000
at BlogEngine.Core.Web.Controls.BlogBasePage.Render (System.Web.UI.HtmlTextWriter writer) 0x00000
at System.Web.UI.Control.RenderControl (System.Web.UI.HtmlTextWriter writer) 0x00000
at System.Web.UI.Page.RenderPage () 0x00000
at System.Web.UI.Page.InternalProcessRequest () 0x00000
at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context) 0x00000

--------------------------------------------------------------------------------
Version information: Mono Version: 2.0.50727.42; ASP.NET Version: 2.0.50727.42

Boris
May 20, 2008 at 9:03 PM
Great ! Seems now ok with BE 1.3.0.29 in mono 1.9.1 (ASP.NET Version: 2.0.50727.42)
May 20, 2008 at 10:06 PM
Infact, work ok with XSP2 but having problem with apache2.

Problems came with the path separator.
Please use "Path.DirectorySeparatorChar" when coding and not "\" in the source code. For example, it give problem like this : "Access to the path "/usr/BlogEngine.NET/App_Data/datastore\extensions\BBCode.xml"
Coordinator
May 22, 2008 at 4:58 AM
Boris, you'll need to make this change to Core/providers/xmlprovider/datastore.cs. I also had to comment out multiblog provider in web.config to make it work in linux. And dont't foget to set write access on app_data folder. You can also wait couple days till I check in this change in the source control and then just download latest.

    private string StorageLocation(ExtensionType exType)  {
      switch (exType) {
        case ExtensionType.Extension:
          return HostingEnvironment.MapPath(BlogSettings.Instance.StorageLocation + @"datastore\extensions\");
        case ExtensionType.Widget:
          return HostingEnvironment.MapPath(BlogSettings.Instance.StorageLocation + @"datastore\widgets\");
        case ExtensionType.Theme:
          return HostingEnvironment.MapPath(BlogSettings.Instance.StorageLocation + @"datastore\themes\");
      }
      return string.Empty;
    }
May 22, 2008 at 7:30 AM
A month or so ago, I sumitted issues #5998, #5999 & #6038 with relevant Mono bugs (and patches).

Other than those, the latest Mono & latest BlogEngine appear to work (can't say I've thoroughly tested it, but I am using it).

There's issues in earlier versions of Mono with HTTP posts.
And issues in later versions with master pages, and controls.
The very latest r103754 appears good.
May 22, 2008 at 8:33 AM
Add Mono bug #6211 to that list.
May 22, 2008 at 12:05 PM
Thanks a lot for the informations. At least, I'm not alone trying to use Mono :)
I have submitted issue #6196 for the path separator problem.