Developing ASP.NET MVC Apps Using Mono
As some of you know may know, the Mono Project allows your .NET Framework applications to run cross platform. Mono’s .NET implementation is based on the ECMA standards for C# and the Common Language Infrastructure. It is really an amazing project. Check out the project roadmap and compatibility matrix. I was pleasantly surprised to find the following:
I had not realized that ASP.NET MVC had been implemented by the Mono Project team. The Mono Project has implemented Visual Studio tools to allow you to develop for Linux without leaving Visual Studio. They also put together virtual machines that are loaded with Suse Linux, Mono and all the tools you need to get started. This post will provide you with the steps to begin developing with ASP.NET MVC in a Linux using one of the virtual machines.
Download The Files
You will need two downloads to get started. First go and download VMware Player. You will need to fill out the registration page to receive a link in an email for the download. Next, download the VMware image from the Mono Project page. Be aware that these links may break in the future as new version become available. In that case you may need a little help from Google.
Install VMware player on your machine. Unzip the VMware image. Right click on the ‘.vmx’ file and you should see something like the following:
Select the ‘Open with VMware Player’ option. You can ignore the download VMware Player tools option. If everything goes well your distro of SUSE Linux should start and you will see the following desktop.
The Mono Project Team has been kind enough to set this image up with everything you need to get started developing. On the desktop you can see the Mono Development Environment (the IDE that you will use in a bit).
A Quick Fix
If you double click the ‘Mono Web Applications’ folder you will be shown the following web sites:
If you attempt launch any of the sites that require PostgreSQL you will be greeted with the following screen:
If you do a Google search you will eventually find the following instructions:
- Click the ‘Computer’ button in the lower right hand corner.
- Click the ‘Gnome Terminal’ option.
- Type ‘su’ and ENTER.
- At the Password prompt, type ‘mono’ and ENTER.
- Type ‘vi /var/lib/pgsql/data/pg_hba.conf’ and ENTER.
- Scroll to the bottom of the editor screen.
- Type ‘i’ to enter insert mode. And change the top two ‘ident’ elements to ‘trust’ as shown below.
- Press the ESC.
- Type ‘:wq’ and ENTER to save and quit.
- At the terminal window type ‘service postgresql restart’ ENTER.
- Close the terminal window.
Now if you refresh your page you should see the following:
Mono Development Environment
Start the Mono Development Environment by double clicking the icon on the desktop. It will look something like this:
Select the ‘Start a New Solution’ option on the Welcome page. Expand the C# options, select ASP.NET and then the ASP.NET MVC Project. Choose a ‘Name’ & ‘Location’. When your done you should have a dialog that looks like the following:
Click the ‘F
orward’ button. The next dialog allows you to add project features. Don’t add any. Click the ‘OK’ button. Now your IDE should look like the following:
Notice that a sample ‘Home’ controller and view have been added. Click the ‘Debug’ button (in the red square above) or press F5 to start the debugger and show the web page. Here is the result in FireFox:
Summary
Now you are ready to start your development. I found the Mono Development Environment to have most of the features that you are used to in Visual Studio. Features such as tooling to create controllers, views; intellisense; and debugging are available. Don’t forget to install your favorite FireFox add-ins.
http://www.livescribe.com/forums/member.php?u=8066&ul21=3 [url=http://www.livescribe.com/forums/member.php?u=8062&ul21=3]acomplia online[/url] propecia hydrocodone online [url="http://www.livescribe.com/forums/member.php?u=8061&ul21=3"%5Dbuy levitra[/url] [LINK http://www.livescribe.com/forums/member.php?u=8065&ul21=3%5Dbest diet pills[/LINK] slry
http://www.livescribe.com/forums/member.php?u=8057&ul23=3 [url=http://www.livescribe.com/forums/member.php?u=8058&ul23=3]generic viagra[/url] buy hydrocodone cheap cialis [url="http://www.livescribe.com/forums/member.php?u=8054&ul23=3"%5Dbuy fioricet[/url] [LINK http://www.livescribe.com/forums/member.php?u=8056&ul23=3%5Dbuy tramadol[/LINK] zngi
Good day!This was a really exceptional blog!
I come from roma, I was luck to look for your Topics in digg
Also I get a lot in your theme really thanks very much i will come again
nice post. keep it up