<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Nathan Bridgewater &#187; MVC</title>
	<atom:link href="http://www.integratedwebsystems.com/tag/mvc/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.integratedwebsystems.com</link>
	<description>My Little .NET Sandbox</description>
	<lastBuildDate>Thu, 19 Jan 2012 20:37:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Running Mono MVC3 Razor and Solving the InvalidOperationException of &#8216;The view &#8216;name&#8217; or its master was not found&#8217;</title>
		<link>http://www.integratedwebsystems.com/2011/09/running-mono-mvc3-razor-and-solving-the-invalidoperationexception-of-the-view-name-or-its-master-was-not-found/</link>
		<comments>http://www.integratedwebsystems.com/2011/09/running-mono-mvc3-razor-and-solving-the-invalidoperationexception-of-the-view-name-or-its-master-was-not-found/#comments</comments>
		<pubDate>Wed, 28 Sep 2011 16:00:00 +0000</pubDate>
		<dc:creator>Nathan</dc:creator>
				<category><![CDATA[Mono]]></category>
		<category><![CDATA[MVC 3]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[razor]]></category>

		<guid isPermaLink="false">http://www.integratedwebsystems.com/2011/09/running-mono-mvc3-razor-and-solving-the-invalidoperationexception-of-the-view-name-or-its-master-was-not-found/</guid>
		<description><![CDATA[I’ve been fighting my system the past day or so trying to...]]></description>
			<content:encoded><![CDATA[<p>I’ve been fighting my system the past day or so trying to figure out why all the views in one of my controllers return this silly exception. The file indeed exists. Permissions are correct. Other controller views works. Other non-view (like json or file content) actions work within this controller. This works on Windows but not in Mono. Why doesn’t it work? To find this, I ended up using my source control to identify the commit that caused the break. Then line by line, I started toggling the changes within that commit until I found it.</p>
<blockquote><p>System.InvalidOperationException: The view &#8216;Index&#8217; or its master was not found or no view engine supports the searched locations. The following locations were searched: ~/Areas/Manage/Views/Dashboard/Index.aspx ~/Areas/Manage/Views/Dashboard/Index.ascx ~/Areas/Manage/Views/Shared/Index.aspx ~/Areas/Manage/Views/Shared/Index.ascx ~/Views/Dashboard/Index.aspx ~/Views/Dashboard/Index.ascx ~/Views/Shared/Index.aspx ~/Views/Shared/Index.ascx ~/Areas/Manage/Views/Dashboard/Index.cshtml ~/Areas/Manage/Views/Dashboard/Index.vbhtml ~/Areas/Manage/Views/Shared/Index.cshtml ~/Areas/Manage/Views/Shared/Index.vbhtml ~/Views/Dashboard/Index.cshtml ~/Views/Dashboard/Index.vbhtml ~/Views/Shared/Index.cshtml ~/Views/Shared/Index.vbhtml</p>
</blockquote>
<p>I’m saying this purely by observation. But MVC3 (or maybe the Mono runtime) seems to group compiled view code by controller. I was able to figure out that ALL ViewResult actions failed under this specific controller. It turns out I had one character out of place in my Razor syntax. With that one syntactical flaw, all the views under that controller could not compile and the only reasonable exception that could be thrown was the one above. The windows runtime seems to ignore this (maybe because it compiles them individually; I don’t know). In my case, I was trying to render one view when another view was causing the problem. </p>
<p>So if you see this exception and everything seems to be correct, start sifting through your recent View changes to see if anything you did broke the view syntax. So you can get a little laugh, here’s my goof up: </p>
<p><a href="http://www.integratedwebsystems.com/wp-content/uploads/2011/09/goof.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Extra @ symbol not needed when continuing a code block" border="0" alt="Extra @ symbol not needed when continuing a code block" src="http://www.integratedwebsystems.com/wp-content/uploads/2011/09/goof_thumb.png" width="322" height="63" /></a> </p>
<p>The indicated ‘@’ symbol is not necessary when continuing additional statements. </p>
<p>Enjoy! </p>
]]></content:encoded>
			<wfw:commentRss>http://www.integratedwebsystems.com/2011/09/running-mono-mvc3-razor-and-solving-the-invalidoperationexception-of-the-view-name-or-its-master-was-not-found/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>July 2011 &#8211; My Application Tool Belt for .NET Web Applications</title>
		<link>http://www.integratedwebsystems.com/2011/07/july-2011-my-application-tool-belt-for-net-web-applications/</link>
		<comments>http://www.integratedwebsystems.com/2011/07/july-2011-my-application-tool-belt-for-net-web-applications/#comments</comments>
		<pubDate>Fri, 29 Jul 2011 22:00:00 +0000</pubDate>
		<dc:creator>Nathan</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[BDD]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.integratedwebsystems.com/?p=1196</guid>
		<description><![CDATA[I really like to talk about tools I use to the people...]]></description>
			<content:encoded><![CDATA[<p>I really like to talk about tools I use to the people I work with. I especially like to push tools into environments where I think could be an improvement to their work flow.&#160; So here it is, my current tool belt. I primarily focus on web applications, so there’s a bias toward those tools. </p>
<p><span id="more-1196"></span><br />
<h3>Web</h3>
<h4><a href="http://www.google.com/url?sa=t&amp;source=web&amp;cd=1&amp;ved=0CBUQFjAA&amp;url=http%3A%2F%2Fwww.microsoft.com%2Fdownload%2Fen%2Fdetails.aspx%3Fid%3D4211&amp;ei=5A8zTvmBNMWEtgeL29mJDQ&amp;usg=AFQjCNGA4tUslvfwMhPKVsgNG7y4BYJSBw">Asp.NET MVC 3 Razor</a></h4>
<p>This one should be obvious by now, but I’m completely in love with Asp.NET MVC 3 Razor. Web forms to me now is a huge turn off, and after using MVC for so long, Web forms seems counter-productive. That’s not to say I push MVC everywhere I go; there are some applications that are, in their current form, working great and in no need of replacement. Nonetheless, if you really want to feel like a web developer again, checkout MVC. </p>
<h4><a href="http://jquery.com/">jQuery</a></h4>
<p>This very cool framework brings to me the power to manipulate the DOM with ease as if it were functional CSS. With built-in helper functions for AJAX &amp; JSON handling, it’s a no brainer when I want to do some real quick javascript work on a website.&#160; Coupled with KnockoutJS, this can be a very powerful set of Web 2.0 tools</p>
<h4><a href="http://api.jquery.com/jquery.tmpl/">jQuery Tmpl</a> &amp; <a href="http://knockoutjs.com/">KnockoutJS</a></h4>
<p>Templating client-side is a breeze with these two tools. If you want to learn how to render content client-side, definitely give these a try first. knockout even has a real-time tutorial website where you can learn to use it. Great stuff!</p>
<h4><a href="http://getfirebug.com/">FireBug</a>/<a href="http://www.google.com/chrome">Chrome</a></h4>
<p>FireBug plugin for Firefox is ultimately my favorite web debug tool for both CSS and javascript. It’s clean, easy to read, and very nicely shows net traffic for ajax calls. I’m not saying the Chrome tools are bad, they’re very pretty and useful. I use Chrome almost full time now for browsing. But definitely while designing/debugging, firefox is my favorite. </p>
<p>&#160;</p>
<h3>Databases</h3>
<h4>At work</h4>
<p>Sql Server (pick an edition) 2008 R2. In the enterprise, this system is awesome in combo with .NET applications. All .NET ORM tools across the board work with it, and it’s very easy to use.&#160; Using the latest Sql Management Studio w/ any other version of sql server is also a breeze. </p>
<h4>At home</h4>
<p>I’m really digging <a href="http://www.mongodb.org/">MongoDB</a>. It’s a complete departure of what I’m used to growing up in the Microsoft world. At the same time it’s redundant, very, very fast, and cuts a ton of work out of my data management in projects since you’re storing documents. Serialize your aggregate root, done!&#160; Very cool. </p>
<p>&#160;</p>
<h3>.NET Data Access</h3>
<p>Pick your flavor, but the two I have most experience recently are: <a href="http://subsonicproject.com">SubSonic</a> &amp; <a href="http://fluentnhibernate.org/">Fluent Nhibernate</a>.&#160; I really dig the new <a href="http://blogs.msdn.com/b/adonet/archive/2011/03/15/ef-4-1-code-first-walkthrough.aspx">EF 4.1 Code First</a>. But my favorites tend to be the ones that are the simplest to setup and use. (I suppose EF 4.1 could fit that category; Nhib, not so much). Recently with my <a href="http://www.mongodb.org/display/DOCS/CSharp+Language+Center">MongoDB</a> work at home, these layers all went by the wayside. Using a repository, it’s very easy to layer in an abstract CRUD base and let your repository become more business oriented as it should. All these layers work pretty well with that.</p>
<h2>&#160;</h2>
<h3>BDD,Testing</h3>
<h4><a href="https://github.com/machine/machine.specifications">Machine.Specifications</a></h4>
<p>This is the coolest thing ever. I know there are a ton of testing frameworks out there, but this one really makes things simple. I even like the primitive report they generate, which is great for listing out specifications for a project. Together with <a href="http://mvccontrib.codeplex.com/">MvcContrib</a> &amp; <a href="https://github.com/ayende/rhino-mocks">Rhino Mocks</a>, it’s a very powerful testing framework.</p>
<h4><a href="http://mvccontrib.codeplex.com/">MvcContrib</a></h4>
<p>This contains a great set of testing helpers to assist in your test driven development. It has cool methods like AssertViewRendered().ForView(“nameyourview”).ViewData.Model.Shouldxxx&#160; You can use it to assert end-to-end the behavior of your MVC Application. It also contains a nice HTTP Context builder for testing against fake HttpContext.</p>
<h4><a href="https://github.com/ayende/rhino-mocks">Rhino.Mocks</a></h4>
<p>This is a great mocking framework. It’s very easy to use. This is one of those “pick your flavor” type things. There’s a TON of mocking frameworks out there or you could just roll your own. </p>
<h4><a href="http://testdriven.net/">TestDriven.Net</a></h4>
<p>This is a very cool (free for FOSS individual projects) test runner tool for Visual Studio. You can debug, and run with any configured testing framework like Nunit, Xunit, Mspec, etc. This can save you a lot of time; and is a great alternative if you don’t have <a href="http://www.jetbrains.com/resharper/">Resharper</a>. (I’m not a Re# user yet, but we’ve been pushing it at work quite a bit lately; need to give it a spin). </p>
<p>&#160;</p>
<h3>Source Control</h3>
<h4><a href="http://git-scm.com/">git</a></h4>
<p>Man, I love git. This is a very, very powerful SCM, and it’s free. Written by Linus himself, this tool is fast, efficient and very flexible for small or large development teams. It’s very branch/merge friendly and you can setup multiple remote storage areas for your repositories. Coming from a SourceSafe/TFS/Subversion background, this a completely new way of thinking about code management. I highly recommend checking out TekPub’s Mastering Git series and the huge handful of git websites out there dedicated to teaching its use. I push this where I can; especially if a shop is still on SourceSafe.&#160; Yeah it’s command line only; but lemme tell ya, when you really learn how to use and understand it, you’ll never look back. My only shameless preach is that you need to start building code using feature-based branching. Branch, branch, branch. Don’t be afraid of it. </p>
<p><a href="http://code.google.com/p/msysgit/downloads/list">MsysGit</a> is a great Windows port</p>
<h4><a href="http://eagain.net/gitweb/?p=gitosis.git;a=summary">gitosis</a></h4>
<p>Linux based, git repository management. This tool is very easy to use for managing git repositories on a server. It easily sets up SSH based repositories that are accessible from the home directory and provides a nice way of managing repositories and user access via public keys. <a href="https://help.ubuntu.com/community/Git">Gitosis for Ubuntu</a> has some pretty good docs. </p>
<h4><a href="http://viewgit.sourceforge.net/">viewgit</a></h4>
<p>This very tiny php website does a pretty good job of simply enumerating and making available git version history, branches, tags, and blobs over a web interface. (I’m currently looking at CGit and others as an alternative; this just happened to be the first one I tried out). </p>
<h4><a href="https://github.com">github.com</a></h4>
<p>The best SCM website ever. <img src='http://www.integratedwebsystems.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  They have a great <a href="https://github.com/subsonic/SubSonic-3.0/network">git log diagram (network)</a>. They provide a wiki, bug tracker, release tracking, etc for all projects. <a href="https://github.com/mono">Mono</a> has moved their source over to it along with a handful of other large projects. The paid accounts give you access to store your code securely in the cloud while the free accounts let you share and invite community members to contribute to your projects very easily. </p>
<p>&#160;</p>
<p>Enjoy! </p>
]]></content:encoded>
			<wfw:commentRss>http://www.integratedwebsystems.com/2011/07/july-2011-my-application-tool-belt-for-net-web-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get MVC3 Razor Running on Mono</title>
		<link>http://www.integratedwebsystems.com/2011/06/get-mvc3-razor-running-on-mono/</link>
		<comments>http://www.integratedwebsystems.com/2011/06/get-mvc3-razor-running-on-mono/#comments</comments>
		<pubDate>Sun, 05 Jun 2011 05:00:00 +0000</pubDate>
		<dc:creator>Nathan</dc:creator>
				<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[Mono]]></category>
		<category><![CDATA[MVC 3]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[razor]]></category>
		<category><![CDATA[xsp]]></category>

		<guid isPermaLink="false">http://www.integratedwebsystems.com/?p=1156</guid>
		<description><![CDATA[Updated 10-18-2011 &#8211; added some more common issues I dug around a...]]></description>
			<content:encoded><![CDATA[<h4>Updated 10-18-2011 &#8211; added some more common issues</h4>
<p>I dug around a little to figure this out. Hopefully this will clarify all the steps required to get an MVC 3 Razor site running on Mono. The main pitfall I ran into was gathering the additional dependencies and excluding Microsoft.Web.Infrastructure assembly from my deployment. Overall though it’s not too difficult to deploy your MVC3 app.</p>
<p>In Summary:</p>
<ol>
<li>Install Mono</li>
<li>BIN Deploy Website</li>
<li>Configure Apache (or Xsp environment)</li>
<li>Fire Up Your Server</li>
<li>Errors You Might See</li>
</ol>
<p><span id="more-1156"></span></p>
<h2>Install Mono</h2>
<p>If you haven’t done this yet, go grab it from the <a href="http://www.go-mono.com/mono-downloads/download.html">Mono downloads page</a>. You need to run at least Mono 2.10, preferably the latest release (2.10.2). For Ubuntu you can use the <a href="http://badgerports.org/">badgerports</a>; or for Ubuntu, compile from source using a <a href="/2011/05/install-mono-2-10-2-and-monodevelop-2-6-beta-3-on-ubuntu-or-fedora-with-a-bash-script/">bash script</a> I created. (Skip the MonoDevelop install).</p>
<p>&nbsp;</p>
<h2>BIN Deploy Your Website</h2>
<p>For this, I just performed a traditional “Publish” from Visual Studio to a file system directory. Be sure to set these references to “copy local.”</p>
<ul>
<li>System.Web.Mvc</li>
<li>System.Web.Helpers</li>
<li>System.Web.Routing</li>
</ul>
<p>&nbsp;</p>
<h2>BIN Deploy Additional MVC3/Razor Dependencies</h2>
<p>Just like Scott Hanselman mentions in his <a href="http://www.hanselman.com/blog/BINDeployingASPNETMVC3WithRazorToAWindowsServerWithoutMVCInstalled.aspx">BIN deployment</a> post, add these additional libraries found in the MVC3 RTM. On Windows, they install to C:\Program Files\Asp.Net.</p>
<ul>
<li>System.Web.Razor</li>
<li>System.Web.WebPages</li>
<li>System.Web.WebPages.Razor</li>
<li>System.Web.WebPages.Deployment</li>
</ul>
<p>&nbsp;</p>
<p><em>NOTE: Do <strong>NOT </strong>copy the <strong>Microsoft.Web.Infrastructure</strong> assembly.  This assembly has been rebuilt in the mono library and will already be available to your app.  </em></p>
<p><em> </em></p>
<h2>Configure Apache/XSP</h2>
<p>Once you have Mono runtime installed, setup your apache virtual host configuration. Setup a virtual host to use <em>mod-mono-server4</em>. If you installed Mono with a custom prefix (like my script above), then be sure and setup your virtual host environment. Here’s a sample virtual host configuration using the Mono install prefix of, “/opt/mono-2.10”.</p>
<pre class="brush: xml; gutter: false;">&lt;VirtualHost *:80&gt;
  ServerName yourhostname

  DocumentRoot /srv/www/mvc3

  &lt;Directory /&gt;
    Options FollowSymLinks
  &lt;/Directory&gt;

  MonoServerPath mvc3 "/opt/mono-2.10/bin/mod-mono-server4"

  #optional debug mode
  MonoDebug mvc3 true 

  #be sure and set the prefixed mono paths here
  MonoSetEnv mvc3 MONO_IOMAP=all;PATH=/opt/mono-2.10/bin:$PATH;LD_LIBRARY_PATH=/opt/mono-2.10/lib:$LD_LIBRARY_PATH;  

  MonoApplications mvc3 "/:/srv/www/mvc3"
  &lt;Location /&gt;
    Allow from all
    Order allow,deny
    MonoSetServerAlias mvc3
    SetHandler mono
    SetOutputFilter DEFLATE
    SetEnvIfNoCase Request_URI "\.(?:gif|jpe?g|png)$" no-gzip dont-vary
  &lt;/Location&gt;
  &lt;IfModule mod_deflate.c&gt;
    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript
  &lt;/IfModule&gt;
&lt;/VirtualHost&gt;</pre>
<p>For running XSP manually, setup your shell environment with the correct prefix. Here’s a sample bash script.</p>
<pre class="brush: bash; gutter: false;">#!/bin/bash
MONO_PREFIX=/opt/mono-2.10
GNOME_PREFIX=/usr
export DYLD_LIBRARY_FALLBACK_PATH=/lib:
export LD_LIBRARY_PATH=/lib:/opt/mono-2.10/lib:
export C_INCLUDE_PATH=/include:/include
export ACLOCAL_PATH=/share/aclocal
export PKG_CONFIG_PATH=/lib/pkgconfig:/lib/pkgconfig
export PATH=/bin:/opt/mono-2.10/bin:$PATH</pre>
<p>&nbsp;</p>
<p>When you’re ready to fire up Xsp4: save the script above to a file (in this case env.sh), enter a terminal, change your working directory to the web directory and enter the following:</p>
<pre class="brush: bash; gutter: false;">$ source env.sh
$ xsp4</pre>
<p>&nbsp;</p>
<h2>Fire It Up</h2>
<p>Once everything has been deployed, fire up xsp4 or restart your apache2, all should be working.</p>
<p>&nbsp;</p>
<h2>Errors You Might See</h2>
<ul>
<li>System.Security.SecurityException: No access to the given key.
<ul>
<li>Delete Microsoft.Web.Infrastructure.dll from you bin directory.</li>
</ul>
</li>
<li>No response from web server on request, but you do see errors in the log /var/log/apache2/error.log
<ul>
<li>Check to make sure all your dependencies are present in the bin folder and apache has read/execute access to them. (Ubuntu: www-data group).  Also read through the errors at the end of the file and see if something else is causing the problem. Sometimes I rename/delete error.log and then restart the server for a fresh log.</li>
</ul>
</li>
<li>File request returns a 404 or asp.net missing assembly exception (but the file(s) actually exists)
<ul>
<li>Check your file permissions and make sure www-data group has read access to the files and read/execute to the directories involved.</li>
<li>find web-directory -type f exec chmod 664 {} \;</li>
<li>find web-directory -type d -exec chmod 775 {} \;</li>
</ul>
</li>
<li>Cannot find View&#8230;  (but it really does exist&#8230;)</li>
<li>
<ul>
<li><em>There are a few things that cause this. </em></li>
<li>File permissions; make sure www-data can read the web files</li>
<li>missing Web.config (especially under ~/Views); this is what informs the compiler how to build the view templates.</li>
<li>Syntax error in a view (may cause other views not to render returning this error).</li>
<li>Missing assemblies (make sure you bin deploy the site with all the necessary Razor and WebPages dlls. Do not deploy Microsoft.Web.Infrastructure.</li>
<li>Layout/Master page being used doesn&#8217;t exist.</li>
<li>Getting: &#8220;The classes in the module cannot be loaded&#8221;,   Just delete System.Web.WebPages.Administration.dll from your local bin directory. (not required for this).</li>
</ul>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.integratedwebsystems.com/2011/06/get-mvc3-razor-running-on-mono/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Cross-domain JsonP using Asp.net MVC and jQuery</title>
		<link>http://www.integratedwebsystems.com/2010/07/cross-domain-jsonp-using-asp-net-mvc-and-jquery/</link>
		<comments>http://www.integratedwebsystems.com/2010/07/cross-domain-jsonp-using-asp-net-mvc-and-jquery/#comments</comments>
		<pubDate>Sun, 25 Jul 2010 05:27:01 +0000</pubDate>
		<dc:creator>Nathan</dc:creator>
				<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[jsonp]]></category>
		<category><![CDATA[MVC]]></category>

		<guid isPermaLink="false">http://www.integratedwebsystems.com/?p=897</guid>
		<description><![CDATA[So there are a couple great walkthroughs out there that talk about...]]></description>
			<content:encoded><![CDATA[<p>So there are a couple <a href="http://abcoder.com/javascript/jquery/jsonp-first-timer/">great walkthroughs</a> out there that talk about using <a href="http://api.jquery.com/jQuery.ajax/">jquery jsonp</a> in cross-domain scenarios.  They talk a lot about the requesting and server side, but not so much about how to use the callback. So to clarify, I’ll step through what I did to make this work including providing my implementation for a new ActionResult called JsonPResult for <a href="http://www.asp.net/mvc">MVC</a>.</p>
<p><span id="more-897"></span></p>
<p>Starting out, client-side on the calling page, I setup my script. This function makes a request to the server and expects a jsonp response back. The default “success” handler is optional here and will be invoked along-side the one you specify for jsonp.</p>
<pre class="brush: js; gutter: false;">$.ajax({
    url: 'http://other-domain/api/GetInformation',
    data: { key: 'some data key, this parameter is optional' },
    type: "GET",
    dataType: "jsonp",
    jsonpCallback: "localJsonpCallback"
});

function localJsonpCallback(json) {
    //do stuff...
}</pre>
<p>We need to setup the server side.  I’m using Asp.Net MVC, so I built this new ActionResult for handling Jsonp GET requests. I copied most of the code from the original JsonResult class in System.Web.MVC Ms-Pl code. Before I show you that, you should see it in action. Here I have a controller action that uses JsonpResult:</p>
<pre class="brush: js; gutter: false;">public JsonpResult GetInformation(string key)
{
    var resp = new Core.Model.CustomObject();
    if (validateKey(key))
    {
        resp.Data = "some custom message";
        resp.Success = true;
    }
    else
        resp.Message = "unauthorized";

    return this.Jsonp(resp); //using extension method
}</pre>
<p>This automatically handles all the fancy Jsonp work that goes on behind the scenes.  It serializes the custom object into Json and wraps it with the callback function. So your response appears something like this:</p>
<pre class="brush: js; gutter: false;">localJsonpCallback({"Data":{"Success":true, Message: "some custom message"}});</pre>
<p>I setup an extension method to use<em> controller.Jsonp(object)</em> just as you do the existing <em>controller.Json(object)</em> method already available. This should make it a lot easier to handle. It will inspect the call for the json callback itself so you also don’t have to manually pull it from the request.  It will also work with the two different types of callback requests parameters in use out there like: “jsoncallback” and “callback.”</p>
<pre class="brush: csharp; gutter: false;">/* ****************************************************************************
 *
 * Copyright (c) Microsoft Corporation. All rights reserved.
 *
 * Content of this class was mostly derived from the original
 * JsonResult class in the System.Web.Mvc 2.0 RTM Assembly. This
 * has beeen slightly extended for use with JSONP calls.
 *
 * This software is subject to the Microsoft Public License (Ms-PL).
 * A copy of the license can be found in the license.htm file included
 * in this distribution.
 *
 * You must not remove this notice, or any other, from this software.
 *
 * ***************************************************************************/

namespace System.Web.Mvc
{
    using System;
    using System.Text;
    using System.Web;
    using System.Web.Mvc.Resources;
    using System.Web.Script.Serialization;

    public class JsonpResult : ActionResult
    {

        public JsonpResult()
        {
        }

        public Encoding ContentEncoding
        {
            get;
            set;
        }

        public string ContentType
        {
            get;
            set;
        }

        public object Data
        {
            get;
            set;
        }

        public string JsonCallback { get; set; }

        public override void ExecuteResult(ControllerContext context)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }

            this.JsonCallback = context.HttpContext.Request["jsoncallback"];

            if (string.IsNullOrEmpty(this.JsonCallback))
                this.JsonCallback = context.HttpContext.Request["callback"];

            if (string.IsNullOrEmpty(this.JsonCallback))
                throw new ArgumentNullException("JsonCallback required for JSONP response.");

            HttpResponseBase response = context.HttpContext.Response;

            if (!String.IsNullOrEmpty(ContentType))
            {
                response.ContentType = ContentType;
            }
            else
            {
                response.ContentType = "application/json";
            }
            if (ContentEncoding != null)
            {
                response.ContentEncoding = ContentEncoding;
            }
            if (Data != null)
            {
                JavaScriptSerializer serializer = new JavaScriptSerializer();
                response.Write(string.Format("{0}({1});", this.JsonCallback, serializer.Serialize(Data)));
            }
        }
    }

    //extension methods for the controller to allow jsonp.
    public static class ContollerExtensions
    {
        public static JsonpResult Jsonp(this Controller controller, object data)
        {
            JsonpResult result = new JsonpResult();
            result.Data = data;
            return result;
        }
    }
}</pre>
<p>When the response is downloaded from the client, it’s invoked and you handle it just as you normally would with any other getJSON success handler. So hopefully this helps clear up any confusion with using JsonP.  There’s about a thousand suggestions I found on doing cross domain JSON and this was just one of the many. I also wrote a simple JsonWebClient class in .Net that will permit the server-side proxy POST to another domain if anyone is interested. I did that before I learned about CORS (preflight post) or this, JsonP. Comments are welcome!</p>
<h3>Sample Code</h3>
<p>Additionally, here is a simple, working demo showing how this works. Be sure to start both websites. Then browse the ClientWebsite and click Test JSONP. This will perform a JSONP GET to the second website.</p>
<p><a href="/resources/p897/JsonPDemo.zip">Download the sample</a></p>
<p>This project is also in the <a href="https://github.com/nathanb/iws-snippets/tree/master/JsonPDemo">IWS Snippets project</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.integratedwebsystems.com/2010/07/cross-domain-jsonp-using-asp-net-mvc-and-jquery/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Walkthrough: Porting Asp.Net MVC Website to Mono 2.6.1 and MySql on Linux Apache &#8211; Porting to Mono Part 3 of 3</title>
		<link>http://www.integratedwebsystems.com/2010/02/walkthrough-porting-asp-net-mvc-website-to-mono-2-6-1-and-mysql-on-linux-apache-porting-to-mono-part-3-of-3/</link>
		<comments>http://www.integratedwebsystems.com/2010/02/walkthrough-porting-asp-net-mvc-website-to-mono-2-6-1-and-mysql-on-linux-apache-porting-to-mono-part-3-of-3/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 04:21:00 +0000</pubDate>
		<dc:creator>Nathan</dc:creator>
				<category><![CDATA[Mono]]></category>
		<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[MySql]]></category>

		<guid isPermaLink="false">http://www.integratedwebsystems.com/?p=447</guid>
		<description><![CDATA[So for the third and final part of this series, I want...]]></description>
			<content:encoded><![CDATA[<p sizcache="0" sizset="0">So for the third and final part of this series, I want to walk through how I ported a very small project I posted on CodePlex awhile back called <a href="http://sitemanager.codeplex.com" target="_blank">SiteManager</a>. It is an extremely simplified CMS application that I wrote using Linq to Sql and MVC in order to provide a very basic and easy website tool. It uses membership provider for authentication and Linq to Sql Classes with its database in MS Sql Server. For this walkthrough, I’ll be converting the database to MySql and adapting Linq to Sql to Dblinq so it can completely run on Mono and Linux.</p>
</p>
<p> <span id="more-447"></span>
<link rel="stylesheet" type="text/css" href="/css/jquery.lightbox-0.5.css" />
<h3>Index</h3>
<ul sizcache="0" sizset="1">
<li sizcache="0" sizset="1"><a href="#start">Getting Started</a> </li>
<li sizcache="0" sizset="2"><a href="#database">Database Migration</a> </li>
<li sizcache="0" sizset="3"><a href="#l2s">Linq to Sql to Dblinq</a> </li>
<li sizcache="0" sizset="4"><a href="#membership">Membership</a> </li>
<li sizcache="0" sizset="5"><a href="#authorization">Authorization</a> </li>
<li sizcache="0" sizset="6"><a href="#deployment">Deployment</a> </li>
<li sizcache="0" sizset="7"><a href="#vim">VIM (Editing code files on the server)</a> </li>
<li sizcache="0" sizset="8"><a href="#wrapup">Wrap Up</a> </li>
<li sizcache="0" sizset="9"><a href="#source">Get the Source</a> </li>
</ul>
<h3 sizcache="0" sizset="10"><a name="start">Getting Started</a></h3>
<p sizcache="0" sizset="11">Since I’ve already ported this application, it is very easy to identify any of the problem points. But for any new project, I would identify the basic items related to common issues with changing platforms like: data access, authentication, and any operating system specific code. Using the <a href="http://mono-project.com/MoMA" target="_blank">MoMA tool</a> is hugely beneficial to see how your code base might fare in the Mono framework. It will point out any specific code you’re using that could cause problems.&#160;&#160; You should also <a href="http://mono-project.com/Start" target="_blank">browse the Mono site</a> and learn some basics about the framework since they have quite a few useful extended frameworks that are not part of the Windows .Net runtime.&#160; They also have another nice guide out there for <a href="http://www.mono-project.com/Guide:_Porting_ASP.NET_Applications">porting Asp.Net applications</a> where they use PostgreSql and Blog Starter Kit.</p>
<p>&#160;</p>
<h3 sizcache="0" sizset="14"><a name="database">Database Migration</a></h3>
<p>You should know that Microsoft Sql Server works fine with Mono and works well when you are in a Windows environment and want to run Mono applications against existing Sql Servers. Since we’re running this application completely on a Linux server, as you might do in a hosted Linux environment, leaving our database in Sql Server isn’t an option.&#160; I chose to migrate to MySql purely for personal preference since I have a little more experience with this one rather than others like PostgreSql or Sqlite. However with Dblinq, you will have quite a few options.</p>
<h4>Create an Empty MySql Database and an Application User</h4>
<p sizcache="0" sizset="15">If you recall from my first post in this series, we <a href="http://www.integratedwebsystems.com/2010/01/installing-opensuse-11-2-with-mono-2-6-1-and-apache-using-text-mode-configuration-porting-to-mono-part-1-of-3/#InstallMonoAndApache">installed and configured MySql server</a>.&#160;&#160; We also discussed creating new users. You will want to create a new database with a new user who has access to it from the local machine. (Note that this can also be performed with the <a href="http://dev.mysql.com/downloads/workbench/5.2.html" target="_blank">MySql Workbench GUI Tools</a>).</p>
<p>So to begin, using Putty, SSH into your server.&#160; Then run:</p>
<pre class="brush: sql; gutter: false;">root@server: mysql -u admin_username -p
Enter password: ********
create database sitemanager_mono;
grant all privileges on sitemanager_mono.* to 'aspnet'@'localhost' identified by 'pass';
quit</pre>
<p>You may want to replace the username and password I used here with something more secure, but for this demo I kept it simple. You can do that by replacing ‘aspnet’ with a username of your choice and ‘pass’ with a password of your choice.</p>
<p>You now have a new empty database with its own power user account that can only access it from the local machine. This will be our application user so keep the credentials handy for later when we edit the config file.</p>
<h4>Migrating Sql Server Schema to MySql</h4>
<p sizcache="0" sizset="17">I used the <a href="http://dev.mysql.com/downloads/workbench/5.2.html" target="_blank">MySql Migration Toolkit</a> (part of the GUI Workbench) to perform my migration. It actually worked out pretty well with the exception of a few data type conversions. I like to use varchar(max) fields in Sql server. I also use bit fields for booleans since they parse right over to C# booleans.&#160; The migration tool didnt’ like varchar(max) and converted them to varchar(-1). It also converted my bit fields to tinyint(4). So during the migration, I was able to make edits to a few of my tables that contained those fields. For varchar(max), you have a choice. You can: use a smaller field like varchar(5000), use a Text field, or you can choose to store your text data in a binary blob and encode/decode it to UTF8.&#160; For this, application, I went the route of selecting a smaller varchar field for simplicity; but if my content pages were large, I would probably go the route of text. I found some <a href="http://www.pythian.com/news/7129/text-vs-varchar/" target="_blank">interesting discussion in this post on the topic.</a></p>
<p>So in order, here are the steps I took using the migration tool:</p>
<table border="0" cellspacing="0" cellpadding="2" width="561" sizcache="0" sizset="19">
<tbody sizcache="0" sizset="19">
<tr sizcache="0" sizset="19">
<td valign="top" width="263" sizcache="0" sizset="19"><a class="lightbox" title="Step 1" href="/resources/p447/1.jpg" jquery1267071925472="12" jquery1267072108070="12"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Step 1" border="0" alt="Step 1" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/02/1.jpg" width="244" height="178" /></a> </td>
<td valign="top" width="296">&#160;</td>
</tr>
<tr sizcache="0" sizset="20">
<td valign="top" width="263" sizcache="0" sizset="20"><a class="lightbox" title="Step 2" href="/resources/p447/2.jpg" jquery1267071925472="14" jquery1267072108070="14"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Step 2" border="0" alt="Step 2" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/02/2.jpg" width="244" height="178" /></a> </td>
<td valign="top" width="296">
<p>Choose your source database.</p>
</td>
</tr>
<tr sizcache="0" sizset="21">
<td valign="top" width="263" sizcache="0" sizset="21"><a class="lightbox" title="Step 3" href="/resources/p447/3.jpg" jquery1267071925472="16" jquery1267072108070="16"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Step 3" border="0" alt="Step 3" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/02/3.jpg" width="244" height="178" /></a> </td>
<td valign="top" width="296">
<p>Choose your target database.</p>
</td>
</tr>
<tr sizcache="0" sizset="22">
<td valign="top" width="263" sizcache="0" sizset="22"><a class="lightbox" title="Step 4" href="/resources/p447/4.jpg" jquery1267071925472="18" jquery1267072108070="18"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Step 4" border="0" alt="Step 4" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/02/4.jpg" width="244" height="178" /></a> </td>
<td valign="top" width="296">Select the source schema. </td>
</tr>
<tr sizcache="0" sizset="23">
<td valign="top" width="263" sizcache="0" sizset="23"><a class="lightbox" title="Step 5" href="/resources/p447/5.jpg" jquery1267071925472="20" jquery1267072108070="20"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="" border="0" alt="" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/02/5.jpg" width="244" height="178" /></a> </td>
<td valign="top" width="296">Add exclusions. I chose to exclude my membership tables since I configured those to use a different catalog. </td>
</tr>
<tr sizcache="0" sizset="24">
<td valign="top" width="263" sizcache="0" sizset="24"><a class="lightbox" title="Step 6" href="/resources/p447/6.jpg" jquery1267071925472="22" jquery1267072108070="22"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Step 6" border="0" alt="Step 6" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/02/6.jpg" width="244" height="178" /></a> </td>
<td valign="top" width="296">Utf-8 was fine for my solution</td>
</tr>
<tr sizcache="0" sizset="25">
<td valign="top" width="263" sizcache="0" sizset="25"><a class="lightbox" title="Step 7" href="/resources/p447/7.jpg" jquery1267071925472="24" jquery1267072108070="24"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Step 7" border="0" alt="Step 7" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/02/7.jpg" width="244" height="178" /></a> </td>
<td valign="top" width="296">Mapping error review</td>
</tr>
<tr sizcache="0" sizset="26">
<td valign="top" width="263" sizcache="0" sizset="26"><a class="lightbox" title="Step 8" href="/resources/p447/8.jpg" jquery1267071925472="26" jquery1267072108070="26"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Step 8" border="0" alt="Step 8" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/02/8.jpg" width="244" height="178" /></a> </td>
<td valign="top" width="296">Execution step</td>
</tr>
<tr sizcache="0" sizset="27">
<td valign="top" width="263" sizcache="0" sizset="27"><a class="lightbox" title="Step 9" href="/resources/p447/9.jpg" jquery1267071925472="28" jquery1267072108070="28"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Step 9" border="0" alt="Step 9" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/02/9.jpg" width="244" height="178" /></a> </td>
<td valign="top" width="296">Execution results</td>
</tr>
<tr sizcache="0" sizset="28">
<td valign="top" width="263" sizcache="0" sizset="28"><a class="lightbox" title="Step 10" href="/resources/p447/10.jpg" jquery1267071925472="30" jquery1267072108070="30"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Step 10" border="0" alt="Step 10" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/02/10.jpg" width="244" height="178" /></a> </td>
<td valign="top" width="296">
<p>Script errors will appear on the last screen.&#160; Make the necessary changes, click Apply Changes, and Recreate Objects for each error.&#160; When finished, click next to finish.</p>
<p>This is where you’ll see varchar(-1) for conversion from varchar(max) fields.&#160; Change this to text or varchar(n).</p>
<p>Note that sql bit fields convert to smallint(4) if you wish to change that back to bit.</p>
</td>
</tr>
</tbody>
</table>
<p>&#160;</p>
<h3 sizcache="0" sizset="29"><a name="l2s">Linq to Sql Classes to Dblinq</a></h3>
<p>After fixing errors and executing the script, you should now have your full schema migrated to MySql. Now you need to convert your Linq to Sql to Dblinq. Mono uses Dblinq as its Linq to Sql replacement internally. I chose to manually use DBlinq because I wasn’t sure how much of the Dblinq code was available in Mono.&#160; I downloaded the current version of the Dblinq project from their public Subversion repository.</p>
<p>So the basic idea here is that we’re going to swap out L2S with Dblinq in a nearly transparent way.&#160; We’ll drop the existing DBML file from our project, use DBMetal.exe to regenerate new classes, and then update our DBFactory utility function to create a new data context from the DBlinq side.&#160;&#160; Essentially, this will allow us to re-use the same operational syntax in the Repository class with minimal changes.</p>
<p>For generating new classes, I used the DBMetal utility that comes with Dblinq. Here&#8217;s the batch file I setup to generate my code: </p>
<pre class="brush: bash; gutter: false;">REM: note that the '-sprocs' option is turned on

&quot;DbMetal.exe&quot; --provider=MySql -database:sitemanager_mono -server:carbuncle -user:user -password:pass &quot;-namespace:IWS.SiteManager.Core.Model&quot; -code:Generated.cs -sprocs --pluralize</pre>
<p>After generating the classes, I replaced the DBFactory GetProvider function with this: </p>
<pre class="brush: csharp; gutter: false;">public static Model.SiteManager GetProvider()
{
    var con_string = GetDefaultConnectionString();
    return new Model.SiteManager(new MySql.Data.MySqlClient.MySqlConnection(con_string));
}</pre>
<p>I used a repository class as a helper to access my data model. Each repository class contains its own instance of the data context (in this case, Data.SiteManager). During construction of the repository class, it creates a new instance of the data context so any of the factory functions are able to use it without maintaining their own context. So I replaced all the member variable types for existing data contexts with the new one generated from Dblinq. I also noticed Dblinq had different casing than the original column names.&#160; So where I had columns like, “ModifiedUTC” before, it was “ModifiedUtc” now. This was a pretty painless fix with find/replace.</p>
<p>You’ll notice here that the Linq syntax itself didn’t change at all.</p>
<pre class="brush: csharp; gutter: false;">public class ContentRepository
{
    SiteManager _DB;

    public ContentRepository()
    {
        _DB = DBFactory.GetProvider();
    }

    /// &lt;summary&gt;
    /// gets a page by its id
    /// &lt;/summary&gt;
    /// &lt;param name=&quot;id&quot;&gt;&lt;/param&gt;
    /// &lt;returns&gt;&lt;/returns&gt;
    public Content GetContent(int id)
    {
        return _DB.Contents.Where(o =&gt; o.ID == id).SingleOrDefault();
    }
    /// &lt;summary&gt;
    /// Load a page by its permalink.
    /// &lt;/summary&gt;
    /// &lt;param name=&quot;permalink&quot;&gt;&lt;/param&gt;
    /// &lt;returns&gt;&lt;/returns&gt;
    public Content GetPage(string section, string permalink)
    {
        return _DB.Contents.Where(o =&gt; o.SectionID == section &amp;&amp; o.Permalink == permalink.Trim().ToLower()).SingleOrDefault();
    }
    /// &lt;summary&gt;
    /// gets the configured default page.
    /// &lt;/summary&gt;
    /// &lt;returns&gt;&lt;/returns&gt;
    public Content GetIndexPage(string section)
    {
        var data = _DB.Sections.Where(o =&gt; o.ID == section).SingleOrDefault();

        Content page = null;

        if (data != null &amp;&amp; data.DefaultContentID.HasValue)
            page = _DB.Contents.Where(o =&gt; o.ID == data.DefaultContentID.Value).SingleOrDefault;

        return page;
    }
    public string GetSectionIDForPage(int id)
    {
        var section = _DB.Contents.Where(o =&gt; o.ID == id).Select(o =&gt; o.SectionID).SingleOrDefault();
        return section;
    }
    public void SaveContent(Content content)
    {
        Section section = null;

        if (_DB.Sections.Where(o =&gt; o.ID == content.SectionID).Count() == 0)
        {
            section = new Section();
            section.ID = content.SectionID;
            section.Description = &quot;Auto-generated section for new page.&quot;;
            _DB.Sections.InsertOnSubmit(section);
            _DB.SubmitChanges();
        }

        //take current version, push it to content history, overwrite current with new.
        Content old = this.GetContent(content.ID);
        if (old != null)
        {
            //archive old version.
            ContentHistory row = new ContentHistory();
            row.ContentID = content.ID;
            row.Body = old.Body;
            row.CreatedUtc = DateTime.UtcNow;
            _DB.ContentHistories.InsertOnSubmit(row);
            _DB.SubmitChanges();

            old.LoadFromExisting(content); //load current values
        }
        else
        {
            old = content;
            _DB.Contents.InsertOnSubmit(old);
        }

        _DB.SubmitChanges();

        if (section != null) //was a new one. set the default content id.
        {
            section.DefaultContentID = content.ID;
            _DB.SubmitChanges();
        }
    }
    public void DeleteContent(int id)
    {
        var data = _DB.Contents.Where(o =&gt; o.ID == id).SingleOrDefault();
        if (data != null)
        {
            //remove conflicts first.
            var section = this.GetSectionByID(data.SectionID);
            if (section != null)
            {
                section.DefaultContentID = null;
                _DB.SubmitChanges();
            }

            _DB.Contents.DeleteOnSubmit(data);
            _DB.SubmitChanges();
        }
    }
}</pre>
<p>At this point, the project should be compilable. You may need to make a few tweaks to get the loose ends tied up.</p>
<p>&#160;</p>
<h3 sizcache="0" sizset="30"><a name="membership">Membership Provider</a></h3>
<p sizcache="0" sizset="31">After following the <a href="http://www.integratedwebsystems.com/2010/02/how-to-setup-and-configure-mysql-membership-provider-6-2-2-porting-to-mono-part-2-of-3/" target="_blank">instructions from the last post</a>, you should get your membership provider setup and configured. For Mono, I think the biggest hang up for me was not being able to use hashed passwords. Alternatively, you can investigate using encrypted passwords. For simplicity, I used clear text passwords here.</p>
<p>&#160;</p>
<h3 sizcache="0" sizset="32"><a name="authorization">Membership Authorization</a></h3>
<p>You should now have a runable MVC application. Almost everything should work with exception to how security applies rules from the web.config.&#160; I noticed Mono doesn’t apply the same security authorization rules to paths for MVC like it does for web forms. I removed &lt;location path=””&gt; tags from my config file and placed the authorization restrictions to my controller actions instead. </p>
<p>So for example this config section would be used to restrict access to all actions in the Manage controller on Windows.</p>
<pre class="brush: xml; gutter: false;">&lt;location path=&quot;Manage&quot;&gt;
    &lt;system.web&gt;
        &lt;authorization&gt;
            &lt;allow roles=&quot;Admins,Editors&quot;/&gt;
            &lt;deny users=&quot;*&quot;/&gt;
        &lt;/authorization&gt;
    &lt;/system.web&gt;
&lt;/location&gt;</pre>
<p>So on Mono, we remove it from web.config and move to the manage controller as an attribute on ALL actions you want to restrict. This can become a maintenance hassle, but they may eventually fix this for MVC in Mono.</p>
<pre class="brush: csharp; gutter: false;">[Authorize(Roles=&quot;Admins,Editors&quot;)]
public ActionResult Index()
{
    return View();
}</pre>
<h3>&#160;</h3>
<h3 sizcache="0" sizset="33"><a name="deployment">Deployment</a></h3>
<p>Don’t forget to make changes to your web.config file. Include the credentials you setup for your database earlier.&#160; Then using Build-&gt;Publish, publish the site to a local folder. Don’t include the App_Data folder and have it delete all files before publishing. Then using FileZilla over SFTP, connect to your server and upload the published website to the web folder you configured. With the latest Mono, the website should automatically reload the new assemblies. If you have any doubt about this, you can always SSH into the server and restart apache.</p>
<p>To restart apache, gain root access using <strong>su</strong> and then: </p>
<pre class="brush: bash; gutter: false;">service apache2 restart</pre>
<p>Optionally, if restarting apache doesn’t seem to work, you can also search and kill off the mono processes:</p>
<pre class="brush: bash; gutter: false;">diabolos:/home/nathan # ps -A | grep mono
 2162 ?        00:00:03 mono
 2164 ?        00:00:08 mono
diabolos:/home/nathan # kill 2162
diabolos:/home/nathan # kill 2164</pre>
<p>The next request to the server will restart these processes as needed. </p>
<p>&#160;</p>
<h3 sizcache="0" sizset="34"><a name="vim">Quick Guide to VIM</a></h3>
<p>Every once in awhile, you may need to edit files that live on the server without going through the whole process of publishing, deploying, etc. To do this, I like to use a tool called VIM. So what is VIM?&#160; For those of you haven’t used it, it’s a simple text editor in Linux that comes with most distributions. You can think of VIM like “edit” for DOS on steroids. The OpenSuse version even has code completion and color-coded syntax, which is very neat.</p>
<p>To open a file with VIM, SSH into your server and run this command:</p>
<p>vi <em>filename</em></p>
<p>When you open the file, there isn’t a menu, but you’ll see ~ on the left and the text of your file.&#160; VIM has modes (much more than I’ll discuss here), but you need to know of at least two:&#160; insert mode and append mode.&#160; This will allow you to insert or append text starting at the cursor position. So move your cursor to any location and press <em><strong>i</strong></em> for insert mode. You will be able to freely type almost anything. To exit insert mode, hit <em><strong>Esc</strong></em>. Append mode uses the same behavior by pressing <em><strong>a</strong></em>. You will append text starting at the cursor position. Entering <strong><em>:d</em></strong> will delete the current line. Be sure not to use arrow keys while in an editing mode.</p>
<p>To save a file, press <strong><em>Esc </em></strong>to exit editing mode, and then press<strong><em> :w</em></strong> to write the file. You can then enter <strong><em>:q</em></strong> to quit.&#160;&#160; And to save and quit, use <strong><em>:wq.</em></strong>&#160; You can get more info by entering <strong><em>man vi</em></strong> at the command prompt.</p>
<p>&#160;</p>
<h3 sizcache="0" sizset="35"><a name="wrapup">Wrap Up</a></h3>
<p>So that’s it. This is a tiny project, but you may be able to apply these ideas to your own projects.&#160; For me, this gets my imagination fired up about what kinds of solutions I can take advantage of using Mono. I think there’s a lot of potential here.&#160; I’ve recently begun using interfaces and dependency injection with my projects for data frameworks to avoid the mess we covered in the Linq to Sql to Dblinq section. This means I can write a decoupled application that can optionally use Linq to Sql or Dblinq as a pluggable assembly that is injected using settings in my config file. This will make the transition between Windows and Mono much less painful.</p>
<p>&#160;</p>
<h3 sizcache="0" sizset="36"><a name="source">Get the Source</a></h3>
<p sizcache="0" sizset="37">To obtain the source, head over to <a href="http://sitemanager.codeplex.com/SourceControl/list/changesets" target="_blank">sitemanager.codeplex.com</a> and download the latest source.&#160; You’ll find the mono ported code under the /branches/mono-mysql-fork branch. </p>
<p>&#160;</p>
<h3>Useful Links</h3>
<ul sizcache="0" sizset="38">
<li sizcache="0" sizset="38"><a href="http://www.mono-project.com" target="_blank">Mono project</a> </li>
<li sizcache="0" sizset="39"><a href="http://mono-project.com/Start" target="_blank">Getting Started with Mono</a> </li>
<li sizcache="0" sizset="40"><a href="http://mono-project.com/Guide:_Porting_ASP.NET_Applications" target="_blank">Porting Asp.Net Applications</a> </li>
<li sizcache="0" sizset="41"><a href="http://dev.mysql.com/downloads/connector/net/" target="_blank">MySql .NET Connector</a> (I downloaded mono build &amp; source) </li>
<li sizcache="0" sizset="42"><a href="https://sitemanager.svn.codeplex.com/svn/branches/mono-mysql-fork" target="_blank">SiteManager CodePlex Mono Branch in Subversion</a> </li>
<li sizcache="0" sizset="43"><a href="http://linq.to/db" target="_blank">Dblinq website</a> </li>
<li sizcache="0" sizset="44"><a href="http://dblinq2007.googlecode.com/svn/trunk/" target="_blank">Dblinq Subversion</a> </li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.integratedwebsystems.com/2010/02/walkthrough-porting-asp-net-mvc-website-to-mono-2-6-1-and-mysql-on-linux-apache-porting-to-mono-part-3-of-3/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Installing OpenSuse 11.2 with Mono 2.6.1 and Apache Using Text Mode Configuration &#8211; Porting to Mono Part 1 of 3</title>
		<link>http://www.integratedwebsystems.com/2010/01/installing-opensuse-11-2-with-mono-2-6-1-and-apache-using-text-mode-configuration-porting-to-mono-part-1-of-3/</link>
		<comments>http://www.integratedwebsystems.com/2010/01/installing-opensuse-11-2-with-mono-2-6-1-and-apache-using-text-mode-configuration-porting-to-mono-part-1-of-3/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 13:30:00 +0000</pubDate>
		<dc:creator>Nathan</dc:creator>
				<category><![CDATA[Mono]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[installing]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mod_mono]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[openSuse]]></category>

		<guid isPermaLink="false">http://www.integratedwebsystems.com/?p=441</guid>
		<description><![CDATA[I’ve always kept an eye on the Mono project, mostly out of...]]></description>
			<content:encoded><![CDATA[<p>I’ve always kept an eye on the Mono project, mostly out of curiosity and intrigue. The last time I played around with Mono it was at version 2.0, and at the time I didn’t really spend a lot of time on it because it didn’t support some of the things I was using.&#160; Well recently, I regained interest in Mono when I saw it now supports MVC and some of Dblinq. And since I’ve been buzzing on the whole MVC thing for awhile, I decided to check Mono out for myself and start a fun little porting project. So this is the first part of a three part series describing everything I did to get a server up and running and one of my Asp.Net MVC applications ported to Mono.</p>
<p>This first part will cover installing and configuring an OpenSuse 11.2 server with Apache/Mono and SSH. <a href="http://www.integratedwebsystems.com/2010/02/how-to-setup-and-configure-mysql-membership-provider-6-2-2-porting-to-mono-part-2-of-3/">The second part</a> will talk about how to setup a MySql Membership provider (with mono and Windows), and the third part is a walkthrough showing how to port a simple Asp.Net MVC site to mono and MySql. I’m also targeting those of you who use virtual hosting where you might only have SSH (after install) to configure your server, so I will be using text based tools: SSH, vi, and yast for all my installations and configuration after getting the base system installed.</p>
<p> <span id="more-441"></span>
<p><script type="text/javascript" src="http://www.google.com/jsapi"></script><script type="text/javascript">
		google.load("jquery", "1.4.1");
		google.load("jqueryui", "1.7.2");
	</script><script type="text/javascript" src="/js/jquery.lightbox-0.5.pack.js"></script>
<link rel="stylesheet" type="text/css" href="/css/jquery.lightbox-0.5.css" media="screen" /><script type="text/javascript" src="/tools/js/p441.js"></script></p>
<p sizcache="0" sizset="0">First off, let me just say that I’m a Windows .NET programmer; not a Linux programmer. I know enough about Linux to dig my way around most of the basic stuff, so if anything seems incorrect in this post, feel free to correct me. <img src='http://www.integratedwebsystems.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> &#160; I’m extremely intrigued by Linux and its open source philosophy. I use it for a handful of useful, rock solid services like <a href="http://subversion.tigris.org/" target="_blank">Subversion</a>, <a href="http://www.postfix.org/" target="_blank">Postfix</a>, <a href="http://www.samba.org/" target="_blank">Samba</a> file servers and <a href="http://www.mysql.com/" target="_blank">MySql</a>. I also share an interest with many small web shops in finding more affordable hosting solutions for smaller Asp.Net apps. And in light of Mono being able to run MVC apps, it’s very exciting to think of what we can do with it.</p>
<h3>Index</h3>
<ul sizcache="0" sizset="4">
<li sizcache="0" sizset="4"><a href="#BeforeYouBegin">Before You Begin</a>&#160; </li>
<li sizcache="0" sizset="5"><a href="#InstallingLinuxPart1">Installing Linux Graphical (part 1)</a> </li>
<li sizcache="0" sizset="6"><a href="#InstallingLinuxPart2">Configuring Linux During Install (part 2)</a> </li>
<li sizcache="0" sizset="7"><a href="#ConfiguringLinuxAfterInstall">Configuring Linux After Install</a> </li>
<li sizcache="0" sizset="8"><a href="#UpdatingSoftware">Updating Software</a> </li>
<li sizcache="0" sizset="9"><a href="#InstallMonoAndApache">Install Mono, Apache, and MySql</a> </li>
<li sizcache="0" sizset="10"><a href="#ConfigureApache">Configure a Virtual Host &amp; Web Directory</a> </li>
<li sizcache="0" sizset="11"><a href="#RunningMVC">Running the Default Visual Studio MVC Website</a> </li>
<li sizcache="0" sizset="12"><a href="#UsefulLinks">Useful Links</a> </li>
</ul>
<p sizcache="0" sizset="11">&#160;</p>
<h3 sizcache="0" sizset="13"><a name="BeforeYouBegin">Before you Begin</a></h3>
<p sizcache="0" sizset="14">There are a few things you need to download before you get started.&#160; First of all, you’ll need an SSH client for file transfer and console access. I’m using <a href="http://filezilla-project.org/download.php" target="_blank">FileZilla</a> and <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html" target="_blank">Putty</a> as my SSH clients. If you’ve never used it before, think of SSH like telnet and FTP wrapped into one.</p>
<p>Here’s a few tips on navigating the text mode installer screens. Use the Tab Key to cycle through fields or change focus between sections on the screen. Use the Spacebar or Enter to select an option. Esc can back out of a dropdown option. You can use the arrow keys to cycle options in a section.</p>
<p sizcache="0" sizset="16">Download one of the <a href="http://software.opensuse.org/112/en" target="_blank">installers on OpenSuse’s website.</a> Burn or mount the ISO and boot your machine from it to begin.</p>
<p><em>Note: while I was doing this on a test virtual machine, I could only get the Network install to work with Virtual PC 2007 on my hardware. All the versions worked fine when installing it to a physical machine. If you choose the network install, you may need to configure your DHCP settings before the GUI installer starts. (with Virtual PC, make sure the correct external network card is exposed to the virtual machine). </em></p>
<h3 sizcache="0" sizset="17"><a name="InstallingLinuxPart1">Installing Linux Graphical (part 1)</a></h3>
<p>In sequence, here are (most) of the screens you’ll see during the first part of installing OpenSuse 11.2.</p>
<div class="gallery" sizcache="0" sizset="18">
<table border="0" cellpadding="5" sizcache="0" sizset="18">
<tbody sizcache="0" sizset="18">
<tr sizcache="0" sizset="18">
<td width="269" sizcache="0" sizset="18"><a title="OpenSuse 11.2 boot screen" href="/resources/p441/install/1.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="OpenSuse Boot Screen" border="0" alt="OpenSuse Boot Screen" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/01/1.jpg" width="244" height="184" /></a></td>
<td width="375">&#160;</td>
</tr>
<tr sizcache="0" sizset="19">
<td width="269" sizcache="0" sizset="19"><a title="Language selection" href="/resources/p441/install/2.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="Language selection" border="0" alt="Language selection" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/01/22.jpg" width="244" height="199" /></a></td>
<td width="375">
<p>Language selection</p>
</td>
</tr>
<tr sizcache="0" sizset="20">
<td width="269" sizcache="0" sizset="20"><a title="New install. Disable Auto-configuration" href="/resources/p441/install/3.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="New install. Disable auto-configuration." border="0" alt="New install. Disable auto-configuration." src="http://www.integratedwebsystems.com/wp-content/uploads/2010/01/3.jpg" width="244" height="199" /></a></td>
<td width="375">
<p>Uncheck<strong> </strong><em>Use Automatic Configuration</em></p>
</td>
</tr>
<tr sizcache="0" sizset="21">
<td width="269" sizcache="0" sizset="21"><a title="Choose your time zone" href="/resources/p441/install/4.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Choose your time zone" border="0" alt="Choose your time zone" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/01/41.jpg" width="244" height="199" /></a></td>
<td width="375">
<p>Choose your time zone.</p>
</td>
</tr>
<tr sizcache="0" sizset="22">
<td width="269" sizcache="0" sizset="22"><a title="Desktop selection. See options." href="/resources/p441/install/5.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Desktop selection" border="0" alt="Desktop selection" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/01/51.jpg" width="244" height="199" /></a></td>
<td width="375">
<p>I chose minimal server.</p>
<p><strong>Optional:</strong> You may choose a desktop if you wish to use remote VNC to remotely admin your server with a GUI.&#160; VNC is kind of like using Remote Desktop. To do that, choose your desktop here, and we’ll configure it to still boot to text mode later at the summary screen.</p>
</td>
</tr>
<tr sizcache="0" sizset="23">
<td width="269" sizcache="0" sizset="23"><a title="Partition selection. I used defaults." href="/resources/p441/install/6.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Partition selection" border="0" alt="Partition selection" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/01/61.jpg" width="244" height="199" /></a></td>
<td width="375">Partition selection. I used defaults.</td>
</tr>
<tr sizcache="0" sizset="24">
<td width="269" sizcache="0" sizset="24"><a title="Setting up the first user. Uncheck Automatic Login." href="/resources/p441/install/7.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Setting up the first user" border="0" alt="Setting up the first user" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/01/71.jpg" width="244" height="199" /></a></td>
<td width="375">
<p>Enter your username. Uncheck automatic login.</p>
<p><strong>Optional:</strong> You may choose a different password for the root user.&#160; This is good if you have a public server sitting in the cloud in case someone gets the password to your normal user account.</p>
</td>
</tr>
<tr sizcache="0" sizset="25">
<td width="269" sizcache="0" sizset="25"><a title="Summary. Enable SSH." href="/resources/p441/install/8.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Summary" border="0" alt="Summary" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/01/81.jpg" width="244" height="199" /></a></td>
<td width="375">
<p>Summary screen. Scroll to the bottom.<strong> Click “enable and open” for Firewall and SSH</strong>. We’ll use SSH to remotely admin the server.</p>
<p><strong>Optional: </strong>If you chose a desktop earlier, change the <em>Default Runlevel </em>to 3 (Full multiuser with network). This will cause the server to boot to normal text mode by default.</p>
</td>
</tr>
<tr sizcache="0" sizset="26">
<td width="269" sizcache="0" sizset="26"><a title="Confirm Installation" href="/resources/p441/install/9.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Confirm Installation" border="0" alt="Confirm Installation" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/01/91.jpg" width="244" height="199" /></a></td>
<td width="375">
<p>Click Install to continue.</p>
</td>
</tr>
<tr sizcache="0" sizset="27">
<td width="269" sizcache="0" sizset="27"><a title="Progress" href="/resources/p441/install/12.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Installation Progress" border="0" alt="Installation Progress" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/01/121.jpg" width="244" height="199" /></a></td>
<td width="375">&#160;</td>
</tr>
</tbody>
</table></div>
<h3 sizcache="0" sizset="28"><a name="InstallingLinuxPart2">Configuring Linux During Install (part 2)</a></h3>
<p>After the first phase, your computer will reboot and begin the manual configuration phase. As I mentioned earlier, these screens are pretty easy to navigate. Use tab to cycle through the fields or change focus to different sections. Use space or enter to make a selection. Also, the highlighted letters in words are hotkeys you can use in combination with the Alt key.&#160; Each section will continue when you select the NEXT option in the bottom right corner.</p>
<div class="gallery" sizcache="0" sizset="29">
<table border="0" cellpadding="5" sizcache="0" sizset="29">
<tbody sizcache="0" sizset="29">
<tr sizcache="0" sizset="29">
<td valign="top" width="269" sizcache="0" sizset="29"><a title="First configuration screen. Enter your hostname" href="/resources/p441/config/1.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="First configuration screen. Enter your hostname" border="0" alt="First configuration screen. Enter your hostname" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/01/11.jpg" width="244" height="184" /></a> </td>
<td width="375">
<p>This is the first configuration screen. Enter your new machine hostname (or leave it default).</p>
</td>
</tr>
<tr sizcache="0" sizset="30">
<td valign="top" width="269" sizcache="0" sizset="30"><a title="Progress after choosing hostname." href="/resources/p441/config/2.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Progress screen" border="0" alt="Progress screen" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/01/21.jpg" width="244" height="184" /></a> </td>
<td width="375">
<p>Showing hostname configuration progress.</p>
</td>
</tr>
<tr sizcache="0" sizset="31">
<td valign="top" width="269" sizcache="0" sizset="31"><a title="Configuration screen. Choose Network Interfaces" href="/resources/p441/config/3.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Main configuration screen. Choose netowrk interface" border="0" alt="Main configuration screen. Choose netowrk interface" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/01/31.jpg" width="244" height="183" /></a> </td>
<td width="375">
<p>This is the main configuration screen. You will set your network configuration here. Tab until you see the bounding box around the gray area light up. Then down arrow to Network Interfaces. Press enter to select it.</p>
</td>
</tr>
<tr sizcache="0" sizset="32">
<td valign="top" width="269" sizcache="0" sizset="32"><a title="Network Interface screen." href="/resources/p441/config/4.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Network interfaces screen" border="0" alt="Network interfaces screen" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/01/4.jpg" width="244" height="183" /></a> </td>
<td width="375">
<p><strong>Overview Screen</strong></p>
<p>This is the first Network Interfaces screen. There are three focus areas. The first is the top tab area: Overview, Hostname/DNS, and Routing.</p>
<p>Tab to the interface list and select your interface card for your main Internet connection. Then press Alt-i to view its details</p>
</td>
</tr>
<tr sizcache="0" sizset="33">
<td valign="top" width="269" sizcache="0" sizset="33"><a title="Shows ethernet settings. Leave as DHCP or set to static." href="/resources/p441/config/5.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Ethernet NIC settings" border="0" alt="Ethernet NIC settings" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/01/5.jpg" width="244" height="184" /></a> </td>
<td width="375">
<p>Shows Ethernet details. If you choose to use static IP, this is where to set that information. Set the IP address, subnet, etc. You may leave this as DHCP if you wish.&#160; When you’re done tab and select Next.</p>
</td>
</tr>
<tr sizcache="0" sizset="34">
<td valign="top" width="269" sizcache="0" sizset="34"><a title="Set hostname/DNS" href="/resources/p441/config/7.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Set hostname and DNS" border="0" alt="Set hostname and DNS" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/01/7.jpg" width="244" height="184" /></a> </td>
<td width="375">
<p>From the Overview screen (bolded above), move to the Hostname/DNS section. Set your hostname and your DNS servers (if you chose static IP in the previous step).</p>
</td>
</tr>
<tr sizcache="0" sizset="35">
<td valign="top" width="269" sizcache="0" sizset="35"><a title="Routing configuration" href="/resources/p441/config/8.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Routing configuration" border="0" alt="Routing configuration" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/01/8.jpg" width="244" height="183" /></a> </td>
<td width="375">
<p>If you chose a static IP, tab from the Overview Screen to Routing. Set your default gateway and associate it with the correct device.</p>
</td>
</tr>
<tr sizcache="0" sizset="36">
<td valign="top" width="269" sizcache="0" sizset="36"><a title="Writing network configuration." href="/resources/p441/config/9.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Writing network configuration" border="0" alt="Writing network configuration" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/01/9.jpg" width="244" height="183" /></a> </td>
<td width="375">After clicking Next from the Overview Screen, the configuration changes will be written to disk. </td>
</tr>
<tr sizcache="0" sizset="37">
<td valign="top" width="269" sizcache="0" sizset="37"><a title="Test Internet Connection" href="/resources/p441/config/10.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Test Internet" border="0" alt="Test Internet" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/01/10.jpg" width="244" height="185" /></a> </td>
<td width="375">This step will test your Internet connection. If successful, it will check for updates. </td>
</tr>
<tr sizcache="0" sizset="38">
<td valign="top" width="269" sizcache="0" sizset="38"><a title="Successful connection" href="/resources/p441/config/11.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Successful connection" border="0" alt="Successful connection" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/01/111.jpg" width="244" height="184" /></a> </td>
<td width="375">Successful connection</td>
</tr>
<tr sizcache="0" sizset="39">
<td valign="top" width="269" sizcache="0" sizset="39"><a title="Updating packages" href="/resources/p441/config/12.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Updating packages" border="0" alt="Updating packages" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/01/12.jpg" width="244" height="184" /></a> </td>
<td width="375">Updating packages</td>
</tr>
<tr sizcache="0" sizset="40">
<td valign="top" width="269" sizcache="0" sizset="40"><a title="Updating packages" href="/resources/p441/config/13.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Updating packages" border="0" alt="Updating packages" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/01/13.jpg" width="244" height="183" /></a> </td>
<td width="375">&#160;</td>
</tr>
<tr sizcache="0" sizset="41">
<td valign="top" width="269" sizcache="0" sizset="41"><a title="Run updates" href="/resources/p441/config/14.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Run updates" border="0" alt="Run updates" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/01/14.jpg" width="244" height="184" /></a> </td>
<td width="375">Run updates</td>
</tr>
<tr sizcache="0" sizset="42">
<td valign="top" width="269" sizcache="0" sizset="42"><a title="Package updates" href="/resources/p441/config/15.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Package updates" border="0" alt="Package updates" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/01/15.jpg" width="244" height="184" /></a> </td>
<td width="375">&#160;</td>
</tr>
<tr sizcache="0" sizset="43">
<td valign="top" width="269" sizcache="0" sizset="43"><a title="Downloading updates" href="/resources/p441/config/16.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Downloading updates" border="0" alt="Downloading updates" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/01/16.jpg" width="244" height="183" /></a> </td>
<td width="375">&#160;</td>
</tr>
<tr sizcache="0" sizset="44">
<td valign="top" width="269" sizcache="0" sizset="44"><a title="Installing updates" href="/resources/p441/config/17.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Installing updates" border="0" alt="Installing updates" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/01/17.jpg" width="244" height="184" /></a> </td>
<td width="375">Will reboot after this step. You may need to click Next after it finishes.</td>
</tr>
<tr sizcache="0" sizset="45">
<td valign="top" width="269" sizcache="0" sizset="45"><a title="After reboot, next config screen." href="/resources/p441/config/18.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="After reboot, next config screen." border="0" alt="After reboot, next config screen." src="http://www.integratedwebsystems.com/wp-content/uploads/2010/01/18.jpg" width="244" height="183" /></a> </td>
<td width="375">&#160;</td>
</tr>
<tr sizcache="0" sizset="46">
<td valign="top" width="269" sizcache="0" sizset="46"><a href="/resources/p441/config/19.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="" border="0" alt="" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/01/19.jpg" width="244" height="184" /></a> </td>
<td width="375">&#160;</td>
</tr>
<tr sizcache="0" sizset="47">
<td valign="top" width="269" sizcache="0" sizset="47"><a title="Printer setup" href="/resources/p441/config/20.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Printer setup" border="0" alt="Printer setup" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/01/20.jpg" width="244" height="183" /></a> </td>
<td width="375">I used defaults here. </td>
</tr>
<tr sizcache="0" sizset="48">
<td valign="top" width="269" sizcache="0" sizset="48"><a title="Finally!" href="/resources/p441/config/21.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Finally!" border="0" alt="Finally!" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/01/211.jpg" width="244" height="184" /></a> </td>
<td width="375">Finally done! </td>
</tr>
<tr sizcache="0" sizset="49">
<td valign="top" width="269" sizcache="0" sizset="49"><a title="Console after installation" href="/resources/p441/config/22.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Console after installation" border="0" alt="Console after installation" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/01/221.jpg" width="244" height="183" /></a> </td>
<td width="375">The installation drops you to a console.&#160; </td>
</tr>
</tbody>
</table></div>
<p>&#160;</p>
<h3 sizcache="0" sizset="50"><a name="ConfiguringLinuxAfterInstall">Configuring Linux After Install</a></h3>
<div class="gallery" sizcache="0" sizset="51">
<p sizcache="0" sizset="51"><a title="Putty, open a connection to your new server." href="/resources/p441/post_install/1.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="Putty, open connection" border="0" alt="Putty, open connection" align="right" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/01/113.jpg" width="244" height="234" /></a> At this point, your operating system is installed and accessible online via SSH. (If you purchased a VM, this is where you’ll usually begin). To connect to your new server, open Putty and enter your static IP or hostname for your new server. Select SSH connection type. Then click Open. You will be prompted to trust the certificate. Click YES, and login to your new server using the account you setup during install.</p>
<p sizcache="0" sizset="47"><em>NOTE: (You may optionally save these connection settings by typing a name and clicking Save. </em></p>
</p></div>
<p><strong>Root Access      <br /></strong>You’ll need root access to perform most of the tasks we’re doing, so enter: <strong>su</strong><em>, </em>then type the root password you configured during install. The command prompt will change color to <strong><font color="#ff0000">red</font></strong>.</p>
<h3 sizcache="0" sizset="52"><a name="UpdatingSoftware">Updating Software</a></h3>
<p>One of the really cool things about most Linux distributions is their package management. It’s a one-stop-shop for installing, updating, and removing software on your system. Fedora has <em>yum</em>, Debian has <em>apt-get</em>, OpenSuse has<em> </em><em>zypper</em>. Using these utilities is very straight forward. So if you didn’t update your system during install, you can do it now by entering:</p>
<pre class="brush: bash; gutter: false; toolbar: false;">zypper update</pre>
<p>You can run this command occasionally to update your system. To see more details about how to use it. Enter: man zypper</p>
<p>&#160;</p>
<h3 sizcache="0" sizset="53"><a name="InstallMonoAndApache">Install Mono, Apache, and MySql</a></h3>
<p sizcache="0" sizset="49"><strong>Installing Mono and Apache</strong></p>
<p sizcache="0" sizset="49">With zypper, we can cheat a little to install mono, apache, and all dependencies. First we need to add the mono repositories so zypper knows how to find it.</p>
<p sizcache="0" sizset="49">Enter the following lines separately:</p>
<pre class="brush: bash; gutter: false;">zypper addrepo http://ftp.novell.com/pub/mono/download-stable/openSUSE_11.2 mono-stable
zypper refresh --repo mono-stable
zypper dist-upgrade --repo mono-stable</pre>
<p sizcache="0" sizset="49">Our cheat is going to be installing Mod_Mono, which is the mono plugin for Apache. This will force it to install apache, mono, xsp and everything we need to get started.</p>
<pre class="brush: bash; gutter: false; toolbar: false;">zypper install mod_mono</pre>
<p><strong>Autostart Apache</strong></p>
<p>To make apache start when the system reboots, enter this command:</p>
<pre class="brush: bash; gutter: false; toolbar: false;">chkconfig --add apache2</pre>
<p><strong>Installing MySql Server</strong></p>
<p>To download and install mysql server and client, enter this command:</p>
<pre class="brush: bash; gutter: false; toolbar: false;">zypper install mysql</pre>
<p>Add MySql to your startup and start it:</p>
<pre class="brush: bash; gutter: false; toolbar: false;">chkconfig --add mysql

service mysql start</pre>
<p>Then configure the server with:</p>
<pre class="brush: bash; gutter: false; toolbar: false;">mysql_secure_installation</pre>
<p>Follow the instructions and setup your server. The first question will be to enter your root password; the first time you run this, just press enter with a blank password, then choose <strong>Y</strong> to enter a new root password. You’ll also want to disable remote root access, the anonymous user, and test database.</p>
<p><strong>Optional:</strong></p>
<p>Now setup your user account so you can remotely access the server. This also requires you to expose your MySql server over the Internet if you’re running a hosted server. Users in MySql are username &amp; host based. Both parts make up a unique user.</p>
<p><strong>To add a user:</strong></p>
<p>Connect to your database server using your new root password. Enter: <strong>mysql -p</strong></p>
<p>Here is an example of a user you would typically use for a specific application running on the local machine. This statement grants all privileges on a database called test_database and all its tables to a username ‘my_new_username’ who can only connect from localhost.</p>
<pre class="brush: sql; gutter: false;">grant all privileges on test_database.* to 'my_new_username'@'localhost' identified by 'new_password' with grant option;</pre>
<p>An admin user with access to everything from any location would have a statement similar to this:</p>
<pre class="brush: sql; gutter: false;">grant all privileges on *.* to 'super_user'@'%' identified by 'super_secret_pw' with grant option;</pre>
<p>Enter <strong>quit</strong> to exit the MySql client.</p>
<p><strong>Firewall </strong></p>
<p>This is actually much simpler than it looks. I’m showing all these screens just for reference. Basically, just use yast as the tool configure the firewall. It has a nice little interface similar to the post-install configuration. For what we’re doing, add your network device to the External Zone, then add Secure Shell Server and HTTP Web Server to the allowed services. Then just enable and turn on your firewall (if it isn’t already on)</p>
<div class="gallery" sizcache="0" sizset="54">
<table border="0" cellpadding="5" sizcache="0" sizset="54">
<tbody sizcache="0" sizset="54">
<tr sizcache="0" sizset="54">
<td valign="top" width="269" sizcache="0" sizset="54"><a title="Start yast." href="/resources/p441/post_install/6.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Start Yast" border="0" alt="Start Yast" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/01/6.jpg" width="244" height="154" /></a> </td>
<td width="375">Enter: <strong>yast</strong></td>
</tr>
<tr sizcache="0" sizset="55">
<td valign="top" width="269" sizcache="0" sizset="55"><a title="Go to interface configuration" href="/resources/p441/post_install/7.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Interface configuration" border="0" alt="Interface configuration" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/01/72.jpg" width="244" height="154" /></a> </td>
<td width="375">Navigate to Interfaces, set your network device to be in the External Zone. </td>
</tr>
<tr sizcache="0" sizset="56">
<td valign="top" width="269" sizcache="0" sizset="56"><a title="Add allowed sevices" href="/resources/p441/post_install/8.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Allowed Services" border="0" alt="Allowed Services" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/01/82.jpg" width="244" height="155" /></a> </td>
<td width="375">Navigate to Allowed Services, select External Zone, then select Secure Shell Server. </td>
</tr>
<tr sizcache="0" sizset="57">
<td valign="top" width="269" sizcache="0" sizset="57"><a title="Add each service individually" href="/resources/p441/post_install/9.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Add each service individually" border="0" alt="Add each service individually" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/01/92.jpg" width="244" height="155" /></a> </td>
<td width="375">
<p>Use the Add link to add the selected service to the list.</p>
<p><strong>Repeat this for HTTP server</strong>.</p>
<p><strong>Optional:</strong> Add MySql server if you want to expose it to the Internet and access it remotely with your tools.</p>
</td>
</tr>
<tr sizcache="0" sizset="58">
<td valign="top" width="269" sizcache="0" sizset="58"><a title="Enable and start the firewall" href="/resources/p441/post_install/10.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Enable and start the firewall" border="0" alt="Enable and start the firewall" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/01/101.jpg" width="244" height="155" /></a> </td>
<td width="375">Enable and Start your firewall from the Start Up screen. </td>
</tr>
<tr sizcache="0" sizset="59">
<td valign="top" width="269" sizcache="0" sizset="59"><a title="Finish" href="/resources/p441/post_install/11.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Finish" border="0" alt="Finish" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/01/114.jpg" width="244" height="155" /></a> </td>
<td width="375">Finish</td>
</tr>
</tbody>
</table>
</div>
<p><strong></strong></p>
<p>&#160;</p>
<h3 sizcache="0" sizset="60"><a name="ConfigureApache">Configure a Virtual Host &amp; Web Directory</a></h3>
<p sizcache="0" sizset="61">I used the <a href="http://go-mono.com/config-mod-mono/" target="_blank">Mod_Mono configuration tool</a> on the Mono website, which built the following configuration file. It looks big, but most of it’s comments. The key notes here are that it runs .Net 2.0, it’s root directory and that it handles all requests through Mono (good for MVC). It also does some nice things like compress the output on certain files as well as the Mono output.</p>
<div class="gallery" sizcache="0" sizset="62">
<p sizcache="0" sizset="62"><a title="Using the Mod_Mono configuration tool." href="/resources/p441/post_install/14.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="Using the Mod_Mono configuration tool" border="0" alt="Using the Mod_Mono configuration tool" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/01/141.jpg" width="216" height="244" /></a></p>
</div>
<p sizcache="0" sizset="61">&#160;</p>
<pre class="brush: xml; gutter: false; toolbar: false;">&lt;VirtualHost *:80&gt;
  ServerName odin.integratedwebsystems.int
  ServerAdmin web-admin@odin.integratedwebsystems.int
  DocumentRoot /srv/www/odin.integratedwebsystems.int
  # MonoServerPath can be changed to specify which version of ASP.NET is hosted
  # mod-mono-server1 = ASP.NET 1.1 / mod-mono-server2 = ASP.NET 2.0
  # For SUSE Linux Enterprise Mono Extension, uncomment the line below:
  # MonoServerPath odin.integratedwebsystems.int &quot;/opt/novell/mono/bin/mod-mono-server2&quot;
  # For Mono on openSUSE, uncomment the line below instead:
  MonoServerPath odin.integratedwebsystems.int &quot;/usr/bin/mod-mono-server2&quot;

  # To obtain line numbers in stack traces you need to do two things:
  # 1) Enable Debug code generation in your page by using the Debug=&quot;true&quot;
  #    page directive, or by setting &lt;compilation debug=&quot;true&quot; /&gt; in the
  #    application's Web.config
  # 2) Uncomment the MonoDebug true directive below to enable mod_mono debugging
  MonoDebug odin.integratedwebsystems.int true

  # The MONO_IOMAP environment variable can be configured to provide platform abstraction
  # for file access in Linux.  Valid values for MONO_IOMAP are:
  #    case
  #    drive
  #    all
  # Uncomment the line below to alter file access behavior for the configured application
  MonoSetEnv odin.integratedwebsystems.int MONO_IOMAP=all
  #
  # Additional environtment variables can be set for this server instance using
  # the MonoSetEnv directive.  MonoSetEnv takes a string of 'name=value' pairs
  # separated by semicolons.  For instance, to enable platform abstraction *and*
  # use Mono's old regular expression interpreter (which is slower, but has a
  # shorter setup time), uncomment the line below instead:
  # MonoSetEnv odin.integratedwebsystems.int MONO_IOMAP=all;MONO_OLD_RX=1

  MonoApplications odin.integratedwebsystems.int &quot;/:/srv/www/odin.integratedwebsystems.int&quot;
  &lt;Location &quot;/&quot;&gt;
    Allow from all
    Order allow,deny
    MonoSetServerAlias odin.integratedwebsystems.int
    SetHandler mono
    SetOutputFilter DEFLATE
    SetEnvIfNoCase Request_URI &quot;\.(?:gif|jpe?g|png)$&quot; no-gzip dont-vary
  &lt;/Location&gt;
  &lt;IfModule mod_deflate.c&gt;
    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript
  &lt;/IfModule&gt;
&lt;/VirtualHost&gt;</pre>
<p sizcache="0" sizset="63">Edit the information above (or use the <a href="http://go-mono.com/config-mod-mono/" target="_blank">configuration tool</a>) and replace my hostname with yours. Then save this file with the extension “.conf” and copy it to your /etc/apache2/conf.d directory using <a href="http://filezilla-project.org" target="_blank">FileZilla</a> SFTP connection as the root user.</p>
<p>Create a new directory at the location you specified in the DocumentRoot command. This is the root folder you’ll use to deploy your website.</p>
<pre class="brush: bash; gutter: false; toolbar: false;">cd /srv/www

mkdir my_web_hostname</pre>
<p>After setting all this up, you’ll need to restart your Apache server. To do that, just enter:</p>
<pre class="brush: bash; gutter: false; toolbar: false;">service apache2 restart</pre>
<p>You can restart any of your services this way. You might also reboot your server just to get a fresh run after installing and configuring all our software. Use the shutdown command to restart your system. Again, you can use <em>shutdown &#8211;help</em> or <em>man shutdown</em> to learn more about that command.</p>
<pre class="brush: bash; gutter: false; toolbar: false;">shutdown -r now</pre>
<h3 sizcache="0" sizset="65"><a name="RunningMVC">Running the Default Visual Studio MVC Website</a></h3>
<div class="gallery" sizcache="0" sizset="66">
<p sizcache="0" sizset="66"><a title="Running default MVC website on Apache/Mono 2.6.1" href="/resources/p441/post_install/13.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="It works! " border="0" alt="It works! " align="right" src="http://www.integratedwebsystems.com/wp-content/uploads/2010/01/131.jpg" width="244" height="120" /></a> Open Visual Studio 2008 and build a brand new ASP.NET MVC Web Application.&#160; Publish it to a folder and copy all the published contents to your Linux server at <em>/srv/www/my_web_hostname</em> using FileZilla. Using a web browser, browse to your server and it should show that the new web application works right out the box (with the exception of Membership).</p>
</div>
<p sizcache="0" sizset="67">This is cool! It’s a great start knowing that routing, controllers and views all work. Feel free to play with it a bit more. Mono has some great tools like <a href="http://www.mono-project.com/MoMA" target="_blank">MoMa</a> that will tell you if your existing assemblies are compatible with Mono. You can also start toying around with Dblinq and alternative membership providers.</p>
<p>&#160;</p>
<p sizcache="0" sizset="68">There’s more to come. The <a href="http://www.integratedwebsystems.com/2010/02/how-to-setup-and-configure-mysql-membership-provider-6-2-2-porting-to-mono-part-2-of-3/">next post</a> will show you how to use the <a href="http://dev.mysql.com/downloads/connector/net/#downloads" target="_blank">MySql Membership</a> provider with both Windows and Mono.</p>
<p>&#160;</p>
<h3 sizcache="0" sizset="69"><a name="UsefulLinks">Useful Links</a></h3>
<ul sizcache="0" sizset="70">
<li sizcache="0" sizset="70">Mono Website – <a title="http://www.mono-project.com" href="http://www.mono-project.com">http://www.mono-project.com</a>&#160; </li>
<li sizcache="0" sizset="71">Mod_Mono Configuration Tool &#8211; <a href="http://go-mono.com/config-mod-mono/">http://go-mono.com/config-mod-mono/</a> </li>
<li sizcache="0" sizset="72">MoMa&#160; Mono Compatibility Checker &#8211; <a title="http://www.mono-project.com/MoMA" href="http://www.mono-project.com/MoMA">http://www.mono-project.com/MoMA</a> </li>
<li sizcache="0" sizset="73">OpenSuse 11.2 Download Page (scroll down) &#8211; <a href="http://software.opensuse.org/112/en">http://software.opensuse.org/112/en</a> </li>
<li sizcache="0" sizset="74">OpenSuse Documentation (loaded with great how to documents) &#8211; <a href="http://en.opensuse.org/Documentation">http://en.opensuse.org/Documentation</a> </li>
<li sizcache="0" sizset="75">Putty Download Page &#8211; <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html">http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html</a> </li>
<li sizcache="0" sizset="76">FileZilla Download Page &#8211; <a href="http://filezilla-project.org/download.php">http://filezilla-project.org/download.php</a> </li>
<li sizcache="0" sizset="77">MySql Connector .NET Download &#8211; <a title="http://dev.mysql.com/downloads/connector/net/#downloads" href="http://dev.mysql.com/downloads/connector/net/#downloads">http://dev.mysql.com/downloads/connector/net/#downloads</a> </li>
<li sizcache="0" sizset="78">MySql Workbench (MySql Administration and Development tools) &#8211; <a title="http://dev.mysql.com/downloads/workbench/5.2.html" href="http://dev.mysql.com/downloads/workbench/5.2.html">http://dev.mysql.com/downloads/workbench/5.2.html</a> </li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.integratedwebsystems.com/2010/01/installing-opensuse-11-2-with-mono-2-6-1-and-apache-using-text-mode-configuration-porting-to-mono-part-1-of-3/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Announcing SiteManager &#8211; A Simple Open Source, MVC Based CMS</title>
		<link>http://www.integratedwebsystems.com/2009/10/announcing-sitemanager-a-simple-open-source-cms/</link>
		<comments>http://www.integratedwebsystems.com/2009/10/announcing-sitemanager-a-simple-open-source-cms/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 06:00:36 +0000</pubDate>
		<dc:creator>Nathan</dc:creator>
				<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[CMS]]></category>
		<category><![CDATA[CodePlex]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[SiteManager]]></category>

		<guid isPermaLink="false">http://www.integratedwebsystems.com/?p=370</guid>
		<description><![CDATA[While playing and learning with MVC, I designed a simple little CMS...]]></description>
			<content:encoded><![CDATA[<p>While playing and learning with MVC, I designed a simple little CMS (content management system). My goals for the project were to keep it simple, use MVC, and make it SEO optimized as possible. Well finally the first version of that application is published on <a href="http://sitemanager.codeplex.com" target="_blank">CodePlex</a>. Feel free to go check it out. Don’t forget to peek at the <a href="http://sitemanager.codeplex.com/wikipage?title=setup%20instructions&amp;referringTitle=Documentation" target="_blank">setup documentation</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.integratedwebsystems.com/2009/10/announcing-sitemanager-a-simple-open-source-cms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

