MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

Starting a Custom Solution  (Mono Support )

Viewed 14392 time(s), 4 post(s) 10/1/2010 12:59:24 AMby viracocha


10/1/2010 12:59:24 AM
I've been reading through the MonoX.pdf and have determined that I probably need a custom solution. I've noticed that the document states that the new version of MonoX uses the Web Application Project, but when I continue reading to the part, "Here is a screenshot of the complete solutions:", it looks like a WSP.

I created a solution using the sample solution included in the folder: \MonoX\Samples\Solution\ and started copying the files that showed up as missing when I opened it in VS2010. I copied all the files and tried to build and generated an error, Could not load file or assembly 'MonoSoftware.UrlRewriter.' I noticed that dll to not be referenced in the solution amongst others.

Now I'm doubting if I'm even approaching this in the right way. Basically, I'd like to add functionality by creating a few webparts, classes, DAL and database tables. But, I still want to be able to upgrade the MonoX solution as needed.

Is this bare bones solution how I should start and just start copying over files when I think I need them? Is there a post or sample I can look at to determine how I should structure my solution and what files to add?

Thanks for your help!
This content has not been rated yet. 
0 Reputation 7 Total posts


10/1/2010 9:39:57 AM
Hi Viracocha,

- a screenshot was probably taken when MonoX was in WSP stage that will be updated, thanks
- we have tried the same procedure on WinXp Vs 2k8 and Win7 Vs 2010 and in both scenarios solution opened without any problems and we could build the project without any errors.
- as for "MonoSoftware.UrlRewriter" it is dependency of "MonoX.dll" which is placed in a bin folder by default.

Your approach is correct, you should use custom solution to add new pages / web parts. We have a hundreds of projects build in the similar way to one you mentioned (adding webparts, classes, DAL, BLL etc.) so this approach is working very well.

Can read the below note and try to start the project like that. If you already have can you please send us some more info about the missing files, maybe you can attach a screenshot to this post etc.



1. To compile a custom project you need to delete the “PrecompiledApp.config” file from the MonoX root folder.
2. Copy the “ProjectName.sln” and “Portal.csproj” to MonoX root folder and open the solution (All references should be there, and some predefined folder that you can use if you want)
This content has not been rated yet. 
15993 Reputation 2214 Total posts


2/15/2011 12:35:06 PM
This leads me to the following questions:

1) I am basically adding pages and customizing the project found on the root folder. What's the solution located in \MonoX\Samples\Solution\ for? Is that a better approach than customizing the pages included with the Monox sample portal?

2) I am having trouble understanding point 14.2 of the pdf manual (Developing custom portal pages). What are exactly template pages ? I usually think of master pages as templates. If I just add a new aspx page to the project, either with a code behind file or without, I simply register that new page with the Page management administration and the page is displayed (along with any web parts included). Is this approach correct?

New portal pages are dynamically instantiated using the Page management administrative pane.
This process works by copying the desired template page to the desired folder under the name given
to it by the user. Template pages are actually ordinary ASPX pages WITHOUT the accompanying
codebehind files. They usually inherit from the MonoSoftware.MonoX.BasePage class, but you can
create a different class file and use it if you need to implement some kind of codebehind functionality.
Here is a code sample for the default template page:

<%@ Page
<%@ MasterType TypeName="MonoSoftware.MonoX.BaseMasterPage" %>
<%@ Register TagPrefix="MonoX" TagName="Editor" Src
="/MonoX/ModuleGallery/MonoXHtmlEditor.ascx" %>
<%@ Register Assembly="MonoX.Library" Namespace="MonoSoftware.MonoX"
TagPrefix="portal" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cp" runat="server">
... HTML and ASP.NET markup goes here ...
This content has not been rated yet. 
0 Reputation 11 Total posts


10/1/2010 7:56:05 PM
1. yes, this is a recommended approach. You can play with the existing MonoX pages to gain some experience, but afterwards it is much more comfortable to start without uneccessary files.
2. template pages are used when user wants to instantiate a new page without using VS and compiling the project. They are ordinary ASPX pages with minimal content placed in the App_Templates/YourThemeName/PageTemplates and are displayed in the corresponding dropdown on all page management screens. Page creation process involves copying the page template to the target directory.
The approach you described is correct and in fact it is used much more frequently in custom projects. Note that page registration is automatically performed on the first page hit, even if it is not previously registered in the Page management section.
This content has not been rated yet. 
7207 Reputation 956 Total posts