{"id":873,"date":"2010-04-14T10:38:45","date_gmt":"2010-04-14T09:38:45","guid":{"rendered":"http:\/\/www.codingfriends.com\/?p=873"},"modified":"2010-04-14T15:23:31","modified_gmt":"2010-04-14T14:23:31","slug":"mono-web-development-on-linux","status":"publish","type":"post","link":"https:\/\/www.codingfriends.com\/index.php\/2010\/04\/14\/mono-web-development-on-linux\/","title":{"rendered":"Mono &#8211; web development on Linux"},"content":{"rendered":"<p>It is really easy to get some web c# (csharp) (asp.net) development within a Linux setup, since I use kubuntu which is derived from ubuntu.  All you need to do is to<\/p>\n<p>this installs the mono module for the apache2<\/p>\n<pre lang=\"bash\">\naptitude install libapache2-mod-mono\n<\/pre>\n<p>to enable the module to work within apache2 you have to update the mods-enabled directory and to do this, just use the <\/p>\n<pre lang=\"bash\">\na2enmod mod_mono_auto\n<\/pre>\n<p>which stands for apache2 (a2) enable (en) mod (module) and then the module name, you will need to restart apache2 for it to work<\/p>\n<pre lang=\"bash\">\n\/etc\/init.d\/apache2 restart\n<\/pre>\n<p>that is it., then if you look within the \/etc\/apache2\/mods-enabled you will notice the <\/p>\n<pre lang=\"bash\">\nmod_mono_auto.conf\nmod_mono_auto.load\n<\/pre>\n<p>of course you could symlink them yourself, but it is just easier to use the a2enmod script.<\/p>\n<p>Within the .conf file it tells apache what extensions to &#8220;listen&#8221; to direct to the module mono instead of either php module or just a static html web page.<\/p>\n<p>To test the setup, just create a directory within your hosting directory this is normally \/var\/www\/ or just place a file in that base directory \/var\/www it is up to you, but within that file you could create a basic test file like.<\/p>\n<pre lang=\"csharp\">\n<%@ Page Language=\"C#\" %>\n<html>\n  <head>\n    <title>Apache2 Mod mono test page<\/title>\n  <\/head>\n  <body>\n        <form id=\"form1\" runat=\"server\">\n          <asp:label id=\"lbl1\" runat=\"server\">Apache2 Mod mono test page<\/asp:label>\n        <\/form>\n  <\/body>\n<\/html>\n<\/pre>\n<p>the asp:label will be the main test, since that part of the csharp library as such. you should see something like<\/p>\n<p>Apache2 Mod mono test page<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It is really easy to get some web c# (csharp) (asp.net) development within a Linux setup, since I use kubuntu which is derived from ubuntu. All you need to do is to this installs the mono module for the apache2 aptitude install libapache2-mod-mono to enable the module to work within apache2 you have to update &hellip; <a href=\"https:\/\/www.codingfriends.com\/index.php\/2010\/04\/14\/mono-web-development-on-linux\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Mono &#8211; web development on Linux<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,37],"tags":[177,13,178],"class_list":["post-873","post","type-post","status-publish","format-standard","hentry","category-c_sharp","category-linux_install_configure","tag-apache2","tag-mono","tag-web-server"],"_links":{"self":[{"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/posts\/873","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/comments?post=873"}],"version-history":[{"count":2,"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/posts\/873\/revisions"}],"predecessor-version":[{"id":875,"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/posts\/873\/revisions\/875"}],"wp:attachment":[{"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/media?parent=873"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/categories?post=873"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/tags?post=873"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}