I have installed and "customized" all of the default css, themes, etc in Monox a few times now. However, I've never been able to get started on a custom project so that my MonoX could be updated when new versions come out.
I'm trying again to get that working and am still having trouble.
I'm following this article:
http://www.mono-software.com/blog/post/Mono/95/Building-a-custom-ASP-NET-project-based-on-MonoX/?blogcommentspageno=1
I have my folder structure like this:
RootFolder >
App_Browsers
App_CustomLocalization
App_Templates
App_Themes
Backup
bin
Code
Membership
MonoX
obj
Portal (my project name)
Properties
Upload
And then the files Blog.aspx, default.aspx, login.aspx. etc..
Inside of the Portal folder I basically copied everything from the MonoX folder to it.
I copied the sln and csproj files to the root folder as requested and renamed the solution to Portal.
I opened the solution up in Visual Studio Express 2012 for Web.
I clicked to have it show all files and added the Portal folder to the solution.
I changed the default.master page inside of the Portal > MasterPages folder to match the sample master page in the instructions. I actually just changed the Inherits and then changed the source for the module gallery to look inside of the Portal folder.
IE:
<%@ Master
Language="C#"
AutoEventWireup="True"
EnableTheming="true"
Inherits="Portal.Web.MasterPages.Default"
MasterPageFile="/MonoX/MasterPages/MonoX.master"
Codebehind="Default.master.cs" %>
<%@ MasterType VirtualPath="/MonoX/MasterPages/MonoX.master" %>
<%@ Import Namespace="MonoSoftware.MonoX.Resources" %>
<%@ Register TagPrefix="MonoX" TagName="Menu" Src="/Portal/ModuleGallery/MonoXMenuHTML5.ascx" %>
<%@ Register TagPrefix="MonoX" TagName="Search" Src="/Portal/ModuleGallery/MonoXSearchBoxWithFilter.ascx" %>
<%@ Register TagPrefix="MonoX" TagName="PageFooter" Src="/Portal/MasterPages/PageFooter.ascx" %>
<%@ Register TagPrefix="MonoX" TagName="MembershipNavigation" Src="/Portal/MasterPages/MembershipNavigation.ascx" %>
<%@ Register Assembly="MonoX" Namespace="MonoSoftware.MonoX" TagPrefix="portal" %>
<%@ Register Assembly="MonoX" Namespace="MonoSoftware.MonoX.SearchEngine" TagPrefix="Search" %>
<
asp:Content
ContentPlaceHolderID
=
"cp"
runat
=
"server"
>
<
asp:ScriptManagerProxy
ID
=
"scriptManagerProxy"
runat
=
"server"
></
asp:ScriptManagerProxy
>
<
header
>
<
div
class
=
"container top-section clearfix"
>
<
div
class
=
"row-fluid"
>
<
div
class
=
"span12"
>
<
a
href='<%= MonoSoftware.Web.UrlFormatter.ResolveServerUrl(MonoSoftware.MonoX.Utilities.LocalizationUtility.RewriteLink("/")) %>' class="logo">
<
img
id
=
"Img1"
runat
=
"server"
src="<%$ Code: MonoSoftware.MonoX.Paths.App_Themes.img.logo_png %>" alt="MonoX" />
</
a
>
<
MonoX:Menu
runat
=
"server"
ID
=
"ctlMenu"
UseSpanElementsInMenuItems
=
"false"
SelectedItemCssClass
=
"selected"
CacheDuration
=
"600"
ResponsiveDesignBrakeWidth
=
"959"
/>
</
div
>
</
div
>
</
div
>
<
div
class
=
"bottom-section"
>
<
div
class
=
"container"
>
<
div
class
=
"row-fluid"
>
<
div
class
=
"span12"
>
<
div
class
=
"membership-search"
>
<
img
runat
=
"server"
src
=
"/App_Themes/Default/img/membership-search.jpg"
alt
=
"Memebership bg"
class
=
"membership-bg"
/>
<
div
class
=
"membership-navigation-holder"
>
<
MonoX:MembershipNavigation
runat
=
"server"
ID
=
"ctlMemership"
LoginStatusLogoutText
=
" "
/>
</
div
>
<
div
class
=
"search-holder"
>
<
MonoX:Search
runat
=
"server"
ID
=
"ctlSearch"
TextBoxCssClass
=
"mainSearchBoxInputField"
ButtonCssClass
=
"searchImage"
ButtonText
=
"Go"
DefaultSearchText="<%$ Code:DefaultResources.SiteSearch_DefaultText %>">
</
MonoX:Search
>
</
div
>
</
div
>
<
img
runat
=
"server"
src
=
"/App_Themes/Default/img/banner.jpg"
alt
=
"Banner"
class
=
"banner-img scale-with-grid"
/>
</
div
>
</
div
>
</
div
>
</
div
>
</
header
>
<
asp:ContentPlaceHolder
ID
=
"cp"
runat
=
"server"
>
</
asp:ContentPlaceHolder
>
<
MonoX:PageFooter
runat
=
"server"
ID
=
"ctlFooter"
></
MonoX:PageFooter
>
</
asp:Content
>
I then went to the root folder and changed the default.aspx page so that it was looking into the Portal > MasterPages file for the default.master in there. I also changed the Inherits to Portal.Web.Default like the sample default page showed in the instructions.
<%@ Page
Language="C#"
AutoEventWireup="true"
MasterPageFile="/Portal/MasterPages/Default.master"
Inherits="Portal.Web.Default"
Title="MonoX - Portal Framework for ASP.NET"
Codebehind="Default.aspx.cs" %>
<%@ MasterType TypeName="MonoSoftware.MonoX.BaseMasterPage" %>
<%@ Register TagPrefix="MonoX" TagName="Editor" Src="/MonoX/ModuleGallery/MonoXHtmlEditor.ascx" %>
<%@ Register TagPrefix="MonoX" TagName="Rss" Src="/MonoX/ModuleGallery/RssReader.ascx" %>
<%@ Register Assembly="MonoX" Namespace="MonoSoftware.MonoX" TagPrefix="portal" %>
<%@ Register Assembly="MonoX" Namespace="MonoSoftware.MonoX.ModuleGallery" TagPrefix="ModuleGallery" %>
<%@ Register TagPrefix="MonoX" TagName="AdModule" Src="/MonoX/ModuleGallery/AdModule.ascx" %>
<%@ Register TagPrefix="MonoX" TagName="SlideShow" Src="/MonoX/ModuleGallery/SlideShow.ascx" %>
<%@ Import Namespace="MonoSoftware.MonoX.Resources" %>
When I try to load the default.aspx page now I get an error:
his event has been logged and will be addressed by the maintenance department. We appreciate your patience.
c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\51545029\bb8ce8ba\App_Web_updatepanel.master.f3b849cc.rdvuldk-.0.cs(330): error CS0433: The type 'MonoSoftware.MonoX.Paths' exists in both 'c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\51545029\bb8ce8ba\assembly\dl3\1c290a24\002f003e_2c69ce01\MonoX.DLL' and 'c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\51545029\bb8ce8ba\assembly\dl3\0dc83a87\7540e0ba_4cc4ce01\ProjectName.Web.DLL'
at System.Web.UI.TemplateParser.ProcessException(Exception ex) at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseFile(String physicalPath, VirtualPath virtualPath) at System.Web.UI.TemplateParser.Parse() at System.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType() at System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider buildProvider) at System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound) at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp) at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
I'm not trying to do anything fancy with this. I just want to be able to apply updates to the MonoX folder whenever they come out going forward on this new website.
I opened the solution from my laptop, Windows 7 64bit, but the website is located on IIS 7.5 on Server 2008 Enterprise.
Any suggestions?
Thanks!
Erin0201