<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Linguistic forms</title>
	<atom:link href="http://retkomma.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://retkomma.wordpress.com</link>
	<description>.NET, language technology, and a teaspoon of linguistics</description>
	<lastBuildDate>Fri, 23 Dec 2011 09:44:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='retkomma.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/999b1c62a02f2decb3a37694e31bd4c8?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Linguistic forms</title>
		<link>http://retkomma.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://retkomma.wordpress.com/osd.xml" title="Linguistic forms" />
	<atom:link rel='hub' href='http://retkomma.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Setup Mono, mod_mono, and Apache &#8211; An Introduction do Windows developers</title>
		<link>http://retkomma.wordpress.com/2011/12/23/setup-mono-mod_mono-and-apache-an-introduction-do-windows-developers/</link>
		<comments>http://retkomma.wordpress.com/2011/12/23/setup-mono-mod_mono-and-apache-an-introduction-do-windows-developers/#comments</comments>
		<pubDate>Fri, 23 Dec 2011 09:44:44 +0000</pubDate>
		<dc:creator>retkomma</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[mono]]></category>
		<category><![CDATA[apache]]></category>

		<guid isPermaLink="false">http://retkomma.wordpress.com/?p=287</guid>
		<description><![CDATA[First and foremost: I&#8217;m not a Linux developer, but I love using Linux to run my asp.net web applications through mono. And I use it more and more every month. So even though I might not be a Linux Wizard, &#8230; <a href="http://retkomma.wordpress.com/2011/12/23/setup-mono-mod_mono-and-apache-an-introduction-do-windows-developers/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=retkomma.wordpress.com&amp;blog=903461&amp;post=287&amp;subd=retkomma&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>First and foremost: I&#8217;m not a Linux developer, but I love using Linux to run my asp.net web applications through mono. And I use it more and more every month. So even though I might not be a Linux Wizard, I can probably help other Windows developers understand how to work on Linux. Anyway, here goes.</p>
<p><strong>Installing Mono on Linux</strong></p>
<p>I&#8217;m using the SUSE Linux distribution; specifically I&#8217;m using the 64 bit Amazon edition of Suse Linux. I&#8217;ve found it easier to deploy mono to Suse than other distributions. It might not be true anymore, and it might have been easier on other distributions if I knew more about Linux in general <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>However, installing mono under Suse is really easy.</p>
<p>First, you just have to add the relevant repository. Later we can install mono from this repository:</p>
<pre>zypper addrepo <em>http://download.mono-project.com/download-stable/openSUSE_11.4</em> mono-stable
zypper refresh --repo mono-stable</pre>
<p><strong>Important</strong>: You might experience that you are prompted to trust the repository key. Hit &#8216;a&#8217; to always trust the key. Now upgrade the repository:</p>
<pre>zypper dist-upgrade --repo mono-stable</pre>
<p>Finally, install mono from the repository:</p>
<pre>zypper install -y mono-complete</pre>
<p>On my AWS Micro instance this takes a couple of minutes. This should do the trick. Type &#8220;mono &#8211;version&#8221; to ensure that mono has been installed.</p>
<p><strong>Installing Apache with Mono on Linux</strong></p>
<p>Now that Mono is installed, it is time to install the Apache Web Server. Apache works quite different from IIS, but you can actually come to appreciate it <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>We&#8217;ll start with the basic installation of Apache:</p>
<pre>zypper install -y httpd
touch /etc/apache2/sysconfig.d/include.conf
rcapache2 start
zypper install -y xsp
zypper install -y mod_mono</pre>
<p>In the first line httpd is installed. On Linux, things that ends with a &#8220;d&#8221; are usually &#8220;daemons&#8221; &#8211; somewhat equivalent to Windows services. So httpd is the Apache HTTP Daemon.</p>
<p><strong>rcapache2</strong> is a command for performing basic commands on Apache, for example the &#8220;start&#8221; command. It takes other parameters such as &#8220;stop&#8221; and &#8220;restart&#8221;.</p>
<p>Xsp is the mono web server. It can be nice to install for various testing purposes, but it shouldn&#8217;t be necessary. I usually always install it.</p>
<p>Finally the &#8220;mod_mono&#8221; component is the Apache module that runs mono. Apache plugins are often prefixed by &#8220;mod_&#8221;, for example mod_ssl.</p>
<p>Now that Apache is installed, we need to configure a VirtualHost on Apache. A VirtualHost is somewhat equivalent to a Virtual Directory in IIS. Actually the name VirtualHost probably makes more sense than Virtual Directory, I think.</p>
<p>Basically, the VirtualHost is given a PORT number, and you point it to some location on the file system. Anything ingoing on the specified port will then be executed by the web application running at the specified location on the file system. To glue these two together (to establish an actual runtime for executing your mono project), you need help from mod_mono. More on this below.</p>
<p>The VirtualHost is configured in a domain specific language which is almost an XML structure. In the beginning I found it hard to accept that this looks so much like XML, but it is far from being XML compliant. My advice is just to accept this. Yes, it&#8217;s ugly, but that&#8217;s how it is:-)</p>
<p>The actual file structure of the configuration files depends between the Linux distributions, but on Suse Linux the VirtualHosts are placed in the <strong>/etc/apache2/conf.d</strong> folder. Suse Linux is setup to automatically load all configuration files ending in .conf in the conf.d folder. So, go to this folder by typing:</p>
<pre>cd /etc/apache2/conf.d</pre>
<p>Create a file with a custom name ending in <strong>.conf</strong> &#8211; for example <strong>myWebServer.conf</strong>.</p>
<p>Open the file and paste this code (replace ServerName and ServerAdmin with your own values):</p>
<pre>&lt;VirtualHost *:80&gt;
  ServerName ocase.net
  ServerAdmin mortenmaateDELETE_THIS@hotmail.com
  DocumentRoot /srv/www/mysite
  MonoServerPath mysite /usr/bin/mod-mono-server4
  MonoApplications mysite "/:/srv/www/mysite"
  &lt;Location "/"&gt;
    Allow from all
    Order allow,deny
    MonoSetServerAlias mysite
    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>Now, apache is configured with mod_mono. This VirtualHost will listen to all incoming traffic on port 80. You can specify the server name, the server admin in accordance with your own data.</p>
<p>The DocumentRoot directive is important and points to the folder on your file system that contains your web site. We haven&#8217;t created the web site yet, but we&#8217;ll do so in a minute. The MonoServerPath specifies which executable will run mod_mono. The number 4 signals, that we&#8217;re using the .NET 4 runtime. Mono has runtimes for other .NET versions as well.</p>
<p>The Location directive takes the parameter &#8220;/&#8221; which maps to the root location of the web site folder (specified in DocumentRoot above). Here some apache specific stuff can be set. I&#8217;ll cover the details of this in a later blog post.</p>
<p><strong>Create your site</strong></p>
<p>Allright, the DocumentRoot now points to a location on your server. In my code above it points to /srv/www/mysite. Create this folder and go to it by typing:</p>
<pre>mkdir /srv/www/mysite
cd /srv/www/mysite</pre>
<p>Create a file named index.html by typing:</p>
<pre>echo "&lt;h1&gt;Hello world&lt;/h1&gt;" &gt;&gt; index.html</pre>
<p>Finally, you need to allow the webserver to access  the file and restart apache:</p>
<pre>chmod 777 /srv/www/mysite -R
rcapache2 restart</pre>
<p>Now you should be able to access your service in a normal browser, and it should return Hello World.</p>
<p>You can deploy your ASP.NET application to this folder, and it should work.</p>
<p>If you experience that changes you make are not taking effect, try restarting apache.</p>
<p><strong>Making Apache start automatically on reboot</strong></p>
<p>The Apache Daemon does not automatically start itself on boot. Often this is what you want for a web server. To enable this, type:</p>
<pre>chkconfig --level 2345 apache2 on</pre>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/retkomma.wordpress.com/287/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/retkomma.wordpress.com/287/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/retkomma.wordpress.com/287/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/retkomma.wordpress.com/287/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/retkomma.wordpress.com/287/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/retkomma.wordpress.com/287/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/retkomma.wordpress.com/287/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/retkomma.wordpress.com/287/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/retkomma.wordpress.com/287/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/retkomma.wordpress.com/287/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/retkomma.wordpress.com/287/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/retkomma.wordpress.com/287/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/retkomma.wordpress.com/287/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/retkomma.wordpress.com/287/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=retkomma.wordpress.com&amp;blog=903461&amp;post=287&amp;subd=retkomma&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://retkomma.wordpress.com/2011/12/23/setup-mono-mod_mono-and-apache-an-introduction-do-windows-developers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9a127e536af8cfed16a560166e2f6276?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">retkomma</media:title>
		</media:content>
	</item>
		<item>
		<title>Write csharp (C#) in command prompt console</title>
		<link>http://retkomma.wordpress.com/2011/12/20/write-csharp-c-in-command-prompt-console/</link>
		<comments>http://retkomma.wordpress.com/2011/12/20/write-csharp-c-in-command-prompt-console/#comments</comments>
		<pubDate>Tue, 20 Dec 2011 10:56:32 +0000</pubDate>
		<dc:creator>retkomma</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://retkomma.wordpress.com/?p=289</guid>
		<description><![CDATA[I just found this mono tool today &#8211; it&#8217;s included in the mono installer. If you&#8217;ve added your mono path to the environment variables, simply type csharp in the command prompt, and you&#8217;ll get: C:\Documents and Settings\morm&#62;csharp Mono C# Shell, &#8230; <a href="http://retkomma.wordpress.com/2011/12/20/write-csharp-c-in-command-prompt-console/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=retkomma.wordpress.com&amp;blog=903461&amp;post=289&amp;subd=retkomma&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I just found this mono tool today &#8211; it&#8217;s included in <a title="mono installer download link" href="http://www.go-mono.com/mono-downloads/download.html" target="_blank">the mono installer</a>.</p>
<p>If you&#8217;ve added your mono path to the environment variables, simply type csharp in the command prompt, and you&#8217;ll get:</p>
<p><code>C:\Documents and Settings\morm&gt;csharp<br />
Mono C# Shell, type "help;" for help</code></p>
<p><code>Enter statements below.<br />
csharp&gt;</code></p>
<p>And you&#8217;re good to go! I have a feeling that I&#8217;ll be using this feature extensively for both Mono and .NET development.</p>
<p><a href="http://retkomma.files.wordpress.com/2011/12/mono-csharp-shell.png"><img class="alignleft size-full wp-image-290" title="mono csharp shell" src="http://retkomma.files.wordpress.com/2011/12/mono-csharp-shell.png?w=500&#038;h=279" alt="" width="500" height="279" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/retkomma.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/retkomma.wordpress.com/289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/retkomma.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/retkomma.wordpress.com/289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/retkomma.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/retkomma.wordpress.com/289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/retkomma.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/retkomma.wordpress.com/289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/retkomma.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/retkomma.wordpress.com/289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/retkomma.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/retkomma.wordpress.com/289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/retkomma.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/retkomma.wordpress.com/289/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=retkomma.wordpress.com&amp;blog=903461&amp;post=289&amp;subd=retkomma&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://retkomma.wordpress.com/2011/12/20/write-csharp-c-in-command-prompt-console/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9a127e536af8cfed16a560166e2f6276?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">retkomma</media:title>
		</media:content>

		<media:content url="http://retkomma.files.wordpress.com/2011/12/mono-csharp-shell.png" medium="image">
			<media:title type="html">mono csharp shell</media:title>
		</media:content>
	</item>
		<item>
		<title>Amazon AWS Route 53 XSD&#8217;s</title>
		<link>http://retkomma.wordpress.com/2011/10/19/amazon-aws-route-53-xsds/</link>
		<comments>http://retkomma.wordpress.com/2011/10/19/amazon-aws-route-53-xsds/#comments</comments>
		<pubDate>Wed, 19 Oct 2011 16:05:27 +0000</pubDate>
		<dc:creator>retkomma</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://retkomma.wordpress.com/?p=281</guid>
		<description><![CDATA[I&#8217;ve extracted some xsd&#8217;s for the route 53 api&#8217;s and uploaded them here: http://www.box.net/shared/4pevbg7padukeganjya4<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=retkomma.wordpress.com&amp;blog=903461&amp;post=281&amp;subd=retkomma&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve extracted some xsd&#8217;s for the route 53 api&#8217;s and uploaded them here:</p>
<p>http://www.box.net/shared/4pevbg7padukeganjya4</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/retkomma.wordpress.com/281/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/retkomma.wordpress.com/281/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/retkomma.wordpress.com/281/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/retkomma.wordpress.com/281/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/retkomma.wordpress.com/281/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/retkomma.wordpress.com/281/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/retkomma.wordpress.com/281/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/retkomma.wordpress.com/281/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/retkomma.wordpress.com/281/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/retkomma.wordpress.com/281/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/retkomma.wordpress.com/281/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/retkomma.wordpress.com/281/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/retkomma.wordpress.com/281/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/retkomma.wordpress.com/281/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=retkomma.wordpress.com&amp;blog=903461&amp;post=281&amp;subd=retkomma&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://retkomma.wordpress.com/2011/10/19/amazon-aws-route-53-xsds/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9a127e536af8cfed16a560166e2f6276?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">retkomma</media:title>
		</media:content>
	</item>
		<item>
		<title>Next version of OCometNet</title>
		<link>http://retkomma.wordpress.com/2011/10/07/next-version-of-ocometnet/</link>
		<comments>http://retkomma.wordpress.com/2011/10/07/next-version-of-ocometnet/#comments</comments>
		<pubDate>Fri, 07 Oct 2011 13:38:05 +0000</pubDate>
		<dc:creator>retkomma</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://retkomma.wordpress.com/?p=273</guid>
		<description><![CDATA[As you might know, OCometNet is a server to client notification framework. Currently you can use it for chat applications.  But in the next version I&#8217;m working on extending this, so that it&#8217;s possible to update the view model on &#8230; <a href="http://retkomma.wordpress.com/2011/10/07/next-version-of-ocometnet/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=retkomma.wordpress.com&amp;blog=903461&amp;post=273&amp;subd=retkomma&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>As you might know, <a href="https://github.com/maate/ocometnet">OCometNet</a> is a server to client notification framework.</p>
<p>Currently you can use it for chat applications.  But in the next version I&#8217;m working on extending this, so that it&#8217;s possible to update the view model on another client.</p>
<p>Check out this very short demo to see a preview of the upcoming functionality:<br />
<span style="text-align:center; display: block;"><a href="http://retkomma.wordpress.com/2011/10/07/next-version-of-ocometnet/"><img src="http://img.youtube.com/vi/MQ-094bWCs8/2.jpg" alt="" /></a></span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/retkomma.wordpress.com/273/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/retkomma.wordpress.com/273/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/retkomma.wordpress.com/273/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/retkomma.wordpress.com/273/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/retkomma.wordpress.com/273/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/retkomma.wordpress.com/273/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/retkomma.wordpress.com/273/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/retkomma.wordpress.com/273/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/retkomma.wordpress.com/273/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/retkomma.wordpress.com/273/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/retkomma.wordpress.com/273/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/retkomma.wordpress.com/273/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/retkomma.wordpress.com/273/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/retkomma.wordpress.com/273/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=retkomma.wordpress.com&amp;blog=903461&amp;post=273&amp;subd=retkomma&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://retkomma.wordpress.com/2011/10/07/next-version-of-ocometnet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9a127e536af8cfed16a560166e2f6276?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">retkomma</media:title>
		</media:content>
	</item>
		<item>
		<title>Registry settings in mono on Linux</title>
		<link>http://retkomma.wordpress.com/2011/10/01/registry-settings-in-mono-on-linux/</link>
		<comments>http://retkomma.wordpress.com/2011/10/01/registry-settings-in-mono-on-linux/#comments</comments>
		<pubDate>Sat, 01 Oct 2011 14:26:55 +0000</pubDate>
		<dc:creator>retkomma</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://retkomma.wordpress.com/?p=270</guid>
		<description><![CDATA[Obviously, Linux does not have a registry. However, just like the .NET framework, Mono provides the Microsoft.Win32.Registry class for accessing the registry. So how does it work on Linux? First, I would like to state that personally, I never use the &#8230; <a href="http://retkomma.wordpress.com/2011/10/01/registry-settings-in-mono-on-linux/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=retkomma.wordpress.com&amp;blog=903461&amp;post=270&amp;subd=retkomma&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Obviously, Linux does not have a registry. However, just like the .NET framework, Mono provides the Microsoft.Win32.Registry class for accessing the registry. So how does it work on Linux?</p>
<p>First, I would like to state that personally, I never use the registry. I hate using it for lots of reasons. But I do have situations where third party frameworks use the registry, and I use these framework on Mono/Linux, and hence I become dependent of it.</p>
<p><strong>System wide settings</strong></p>
<p>The system wide settings which are shared between users, e.g. HKCR, are stored in <strong>/etc/mono/registry</strong>. E.g. in /etc/mono/registry/ClassesRoot/. In this sub directory sub keys are stored as sub folders, and values are stored in xml files with the name <strong>values.xml</strong>:</p>
<pre>&lt;values&gt;
&lt;value name="Content Type"
type="string"&gt;application/msword&lt;/value&gt;
&lt;/values&gt;</pre>
<p>This example is from /etc/mono/registry/ClassesRoot/.doc/values.xml.</p>
<p><strong>User settings</strong> (e.g. HKCU) are stored in the same way, but in the sub folder  <strong>.mono/registry</strong> to the users home directory instead, e.g. <strong>~/.mono/registry/CurrentUser</strong>.</p>
<p><strong>Finally</strong>, if you are running a <strong>web app</strong>, please remember to ensure correct security settings if the web app should have access to specific or all registry settings. For example:</p>
<p>chmod 777 /etc/mono/registry/ClassesRoot -R</p>
<p>This will allow read and write access to ClassesRoot <span style="text-decoration:underline;">and</span> all sub folders. Often you can loosen up on Linux registry settings security compared to Windows, but please remember to be careful.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/retkomma.wordpress.com/270/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/retkomma.wordpress.com/270/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/retkomma.wordpress.com/270/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/retkomma.wordpress.com/270/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/retkomma.wordpress.com/270/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/retkomma.wordpress.com/270/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/retkomma.wordpress.com/270/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/retkomma.wordpress.com/270/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/retkomma.wordpress.com/270/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/retkomma.wordpress.com/270/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/retkomma.wordpress.com/270/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/retkomma.wordpress.com/270/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/retkomma.wordpress.com/270/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/retkomma.wordpress.com/270/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=retkomma.wordpress.com&amp;blog=903461&amp;post=270&amp;subd=retkomma&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://retkomma.wordpress.com/2011/10/01/registry-settings-in-mono-on-linux/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9a127e536af8cfed16a560166e2f6276?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">retkomma</media:title>
		</media:content>
	</item>
		<item>
		<title>Mono bug using custom model binder (IModelBinder)</title>
		<link>http://retkomma.wordpress.com/2011/09/21/mono-bug-using-custom-model-binder-imodelbinder/</link>
		<comments>http://retkomma.wordpress.com/2011/09/21/mono-bug-using-custom-model-binder-imodelbinder/#comments</comments>
		<pubDate>Wed, 21 Sep 2011 21:31:41 +0000</pubDate>
		<dc:creator>retkomma</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://retkomma.wordpress.com/?p=264</guid>
		<description><![CDATA[Gosh, this one required an hour or two. I use a custom model binder to parse the http body for some json. The error I got was smth like a BAD REQUEST http error, and in apache&#8217;s error_log an entry &#8230; <a href="http://retkomma.wordpress.com/2011/09/21/mono-bug-using-custom-model-binder-imodelbinder/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=retkomma.wordpress.com&amp;blog=903461&amp;post=264&amp;subd=retkomma&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Gosh, this one required an hour or two.</p>
<p>I use a custom model binder to parse the http body for some json.</p>
<p>The error I got was smth like a BAD REQUEST http error, and in apache&#8217;s error_log an entry said mth like: Invalid URI in request { myjson } PUT /MyUrl HTTP/1.1.</p>
<p>In my controller the code looks like this:</p>
<p>public JsonResult Update([ModelBinder(typeof(GenericModelBinder))]Case casefile) { &#8230;  }</p>
<p>I resolved the problem by adding a default value for casefile, i.e.:</p>
<p>public JsonResult Update([ModelBinder(typeof(GenericModelBinder))]Case casefile = null) { &#8230;  }</p>
<p>It must have something to do with the order of the routing &#8211; it seems that in mono the custom ModelBinder is applied in some step after the routing itself, and my request does not map to any URL &#8211;&gt; route pattern since the ModelBinder graps stuff from the HTTP Body, and not from the url itself.</p>
<p>Anyway, now it works <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/retkomma.wordpress.com/264/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/retkomma.wordpress.com/264/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/retkomma.wordpress.com/264/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/retkomma.wordpress.com/264/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/retkomma.wordpress.com/264/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/retkomma.wordpress.com/264/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/retkomma.wordpress.com/264/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/retkomma.wordpress.com/264/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/retkomma.wordpress.com/264/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/retkomma.wordpress.com/264/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/retkomma.wordpress.com/264/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/retkomma.wordpress.com/264/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/retkomma.wordpress.com/264/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/retkomma.wordpress.com/264/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=retkomma.wordpress.com&amp;blog=903461&amp;post=264&amp;subd=retkomma&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://retkomma.wordpress.com/2011/09/21/mono-bug-using-custom-model-binder-imodelbinder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9a127e536af8cfed16a560166e2f6276?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">retkomma</media:title>
		</media:content>
	</item>
		<item>
		<title>Mono bug with dynamic key word (CS1061)</title>
		<link>http://retkomma.wordpress.com/2011/09/20/mono-bug-with-dynamic-key-word-cs1061/</link>
		<comments>http://retkomma.wordpress.com/2011/09/20/mono-bug-with-dynamic-key-word-cs1061/#comments</comments>
		<pubDate>Tue, 20 Sep 2011 11:49:58 +0000</pubDate>
		<dc:creator>retkomma</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[mono]]></category>

		<guid isPermaLink="false">http://retkomma.wordpress.com/?p=262</guid>
		<description><![CDATA[I had this bug: CS1061: Type `object&#8217; does not contain a definition for [some property]. It took me a couple of hours to figure out that this is a minor bug in the &#8220;var&#8221; keyword in mono. The problem occurs &#8230; <a href="http://retkomma.wordpress.com/2011/09/20/mono-bug-with-dynamic-key-word-cs1061/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=retkomma.wordpress.com&amp;blog=903461&amp;post=262&amp;subd=retkomma&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I had this bug: CS1061: Type `object&#8217; does not contain a definition for [some property].</p>
<p>It took me a couple of hours to figure out that this is a minor bug in the &#8220;var&#8221; keyword in mono.</p>
<p>The problem occurs when &#8220;casting&#8221; a dynamic variable to var. In this process it is being treated as an Object by the compiler. E.g. something like:</p>
<p>dynamic d = some obj<br />
var v = d;<br />
v.MyProperty // CS1061 exception</p>
<p>In .NET, however, this works fine. To resolve the issue, rename the var keyword to dynamic.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/retkomma.wordpress.com/262/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/retkomma.wordpress.com/262/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/retkomma.wordpress.com/262/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/retkomma.wordpress.com/262/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/retkomma.wordpress.com/262/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/retkomma.wordpress.com/262/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/retkomma.wordpress.com/262/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/retkomma.wordpress.com/262/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/retkomma.wordpress.com/262/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/retkomma.wordpress.com/262/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/retkomma.wordpress.com/262/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/retkomma.wordpress.com/262/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/retkomma.wordpress.com/262/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/retkomma.wordpress.com/262/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=retkomma.wordpress.com&amp;blog=903461&amp;post=262&amp;subd=retkomma&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://retkomma.wordpress.com/2011/09/20/mono-bug-with-dynamic-key-word-cs1061/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9a127e536af8cfed16a560166e2f6276?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">retkomma</media:title>
		</media:content>
	</item>
		<item>
		<title>Mono bug: No overload of JavaScriptSerializer.Deserialize() takes two arguments</title>
		<link>http://retkomma.wordpress.com/2011/09/20/mono-bug-no-overload-of-javascriptserializer-deserialize-takes-two-arguments/</link>
		<comments>http://retkomma.wordpress.com/2011/09/20/mono-bug-no-overload-of-javascriptserializer-deserialize-takes-two-arguments/#comments</comments>
		<pubDate>Tue, 20 Sep 2011 09:20:42 +0000</pubDate>
		<dc:creator>retkomma</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[mono]]></category>

		<guid isPermaLink="false">http://retkomma.wordpress.com/?p=257</guid>
		<description><![CDATA[Mono does not support the non-generic edition of this method. Use Deserialize(String input) instead.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=retkomma.wordpress.com&amp;blog=903461&amp;post=257&amp;subd=retkomma&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Mono does not support the non-generic edition of this method. Use Deserialize(String input) instead.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/retkomma.wordpress.com/257/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/retkomma.wordpress.com/257/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/retkomma.wordpress.com/257/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/retkomma.wordpress.com/257/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/retkomma.wordpress.com/257/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/retkomma.wordpress.com/257/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/retkomma.wordpress.com/257/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/retkomma.wordpress.com/257/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/retkomma.wordpress.com/257/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/retkomma.wordpress.com/257/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/retkomma.wordpress.com/257/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/retkomma.wordpress.com/257/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/retkomma.wordpress.com/257/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/retkomma.wordpress.com/257/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=retkomma.wordpress.com&amp;blog=903461&amp;post=257&amp;subd=retkomma&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://retkomma.wordpress.com/2011/09/20/mono-bug-no-overload-of-javascriptserializer-deserialize-takes-two-arguments/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9a127e536af8cfed16a560166e2f6276?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">retkomma</media:title>
		</media:content>
	</item>
		<item>
		<title>Sub domains on IIS express</title>
		<link>http://retkomma.wordpress.com/2011/09/18/sub-domains-on-iis-express/</link>
		<comments>http://retkomma.wordpress.com/2011/09/18/sub-domains-on-iis-express/#comments</comments>
		<pubDate>Sun, 18 Sep 2011 08:37:19 +0000</pubDate>
		<dc:creator>retkomma</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://retkomma.wordpress.com/?p=253</guid>
		<description><![CDATA[In the beginning I didn&#8217;t expect this would be difficult. And perhaps it is easier to set up if you are on a domain. However, in this scenario I&#8217;m not, and I&#8217;m not sure how much easier it would be &#8230; <a href="http://retkomma.wordpress.com/2011/09/18/sub-domains-on-iis-express/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=retkomma.wordpress.com&amp;blog=903461&amp;post=253&amp;subd=retkomma&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In the beginning I didn&#8217;t expect this would be difficult. And perhaps it is easier to set up if you are on a domain. However, in this scenario I&#8217;m not, and I&#8217;m not sure how much easier it would be if I was.</p>
<p>Anyway, FiddlerCore to the rescue. The solution is not perfect. It would be perfect if IIS Express could handle this for me, but it can&#8217;t. So perfect or not, I needed three steps:</p>
<ol>
<li>Setup FiddlerCore to capture all trafic for the sub domain, e.g. traffic for test.ocase.com</li>
<li>Setup my application to handle sub domains and handle special cases when sub domains are redirected from Fiddler Core</li>
<li>Manipulate the hosts file on the pc to listen to the sub domain, e.g. test.ocase.com</li>
</ol>
<p><strong>1. Setup FiddlerCore to capture all traffic for the sub domain test.ocase.com</strong></p>
<p>First, I created a new HTTP Module. In the <code>Init</code> section, I placed this code:</p>
<p><code><br />
if (!Fiddler.FiddlerApplication.IsStarted())<br />
{<br />
    Fiddler.FiddlerCoreStartupFlags oFCSF = Fiddler.FiddlerCoreStartupFlags.Default;<br />
    Fiddler.FiddlerApplication.BeforeRequest += new Fiddler.SessionStateHandler(FiddlerApplication_BeforeRequest);</p>
<p>    Fiddler.FiddlerApplication.Startup(m_Proxy.ListenToHttpPort, oFCSF);<br />
}<br />
</code></p>
<p>Also, I inherited from <code>IDisposable</code>, and in the <code>Dispose()</code> method, I shut down Fiddler:</p>
<p><code><br />
  Boolean disposed;</p>
<p>  public void Dispose()<br />
  {<br />
      if (!disposed)<br />
      {<br />
          if (Fiddler.FiddlerApplication.IsStarted())<br />
              Fiddler.FiddlerApplication.Shutdown();<br />
          disposed = true;<br />
      }<br />
  }<br />
</code></p>
<p>Finally, in the FiddlerApplication_BeforeRequest method, I placed this:<br />
<code><br />
    void FiddlerApplication_BeforeRequest(Fiddler.Session oSession)<br />
        {<br />
            if (oSession.host.ToLower().Contains("test.ocase.com"))<br />
            {<br />
                oSession.oRequest.headers.Add("proxyhost", oSession.host);<br />
                oSession.host = "http://ocase.com:8080";<br />
            }<br />
        }<br />
</code></p>
<p>This is where the magic happens. Here, I add a new HTTP header to the request with the key &#8220;proxyhost&#8221;. Whenever my sub domain is requested (contained in the oSession.host property), I handle the request. </p>
<p>I have one small obstacle, however. The HTTP 1.1 protocol specifies that the HTTP request should have a host header. The host header will contain the url including the sub domain. This means that when my browser requests test.ocase.com, it specifies this both in the URL and in the host header. So when fiddler redirects my request to &#8220;http://ocase.com:8080&#8243; (by specifying this in the oSession.host property), it will specify the url &#8220;http://ocase.com:8080&#8243; AND the host header &#8220;http://ocase.com:8080&#8243;. So, basically my sub domain is lost in the redirection process! To prevent this, I create a new HTTP header &#8220;proxyhost&#8221;, and here I set the value of the original host: &#8220;http://test.ocase.com&#8221; which includes the sub domain. I need to handle this in my application.</p>
<p><strong>2. Setup my application to handle sub domains including sub domains with proxyhost</strong><br />
Basically, when I check out the sub domain in my application, I will first check to see if proxyhost is available. If it is, then I will use the sub domain specified in proxyhost. This will be the case when the sub domain is redirected through FiddlerCore. If it isn&#8217;t, no proxy is being used, thus no proxyhost is availble in the HTTP headers, and I&#8217;ll use the sub domain from the URL.</p>
<p><strong>3. Manipulate the hosts file</strong><br />
The hosts file can be found here: <code>%systemroot%\system32\drivers\etc\hosts</code>. For example it could look like this:</p>
<p><code><br />
# Copyright (c) 1993-2009 Microsoft Corp.<br />
#<br />
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.<br />
#<br />
# This file contains the mappings of IP addresses to host names. Each<br />
# entry should be kept on an individual line. The IP address should<br />
# be placed in the first column followed by the corresponding host name.<br />
# The IP address and the host name should be separated by at least one<br />
# space.<br />
#<br />
# Additionally, comments (such as these) may be inserted on individual<br />
# lines or following the machine name denoted by a '#' symbol.<br />
#<br />
# For example:<br />
#<br />
#      102.54.94.97     rhino.acme.com          # source server<br />
#       38.25.63.10     x.acme.com              # x client host</p>
<p># localhost name resolution is handled within DNS itself.<br />
#	127.0.0.1       localhost<br />
#	::1             localhost</p>
<p>127.0.0.1 ocase.com<br />
127.0.0.1 test.ocase.com<br />
127.0.0.1 test1.ocase.com<br />
127.0.0.1 test2.ocase.com<br />
127.0.0.1 ocase.ocase.com<br />
127.0.0.1 test.localhost<br />
</code></p>
<p>I have added some sub domains for testing purposes, and I redirect all of them to the ip address of my localhost. This ensures that they are ultimately handled by my app. If I only change the host file and start my app, IIS Express will return an HTTP 400 Bad Request. But with FiddlerCore, the requests are captured at a lower level, and I can parse them correctly.</p>
<p>As with any other HTTP Module I can enable and disbale it in the web.config of my application. The examples posted in this blog post are really simple, but I ended up making it more generic obviously, and I also added more functionality such as logging and url redirection which I needed at a later stage in the development.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/retkomma.wordpress.com/253/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/retkomma.wordpress.com/253/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/retkomma.wordpress.com/253/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/retkomma.wordpress.com/253/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/retkomma.wordpress.com/253/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/retkomma.wordpress.com/253/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/retkomma.wordpress.com/253/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/retkomma.wordpress.com/253/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/retkomma.wordpress.com/253/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/retkomma.wordpress.com/253/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/retkomma.wordpress.com/253/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/retkomma.wordpress.com/253/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/retkomma.wordpress.com/253/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/retkomma.wordpress.com/253/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=retkomma.wordpress.com&amp;blog=903461&amp;post=253&amp;subd=retkomma&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://retkomma.wordpress.com/2011/09/18/sub-domains-on-iis-express/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9a127e536af8cfed16a560166e2f6276?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">retkomma</media:title>
		</media:content>
	</item>
		<item>
		<title>FiddlerCore &#8211; Fiddler.dll in your projects</title>
		<link>http://retkomma.wordpress.com/2011/09/18/fiddlercore-fiddler-dll-in-your-projects/</link>
		<comments>http://retkomma.wordpress.com/2011/09/18/fiddlercore-fiddler-dll-in-your-projects/#comments</comments>
		<pubDate>Sun, 18 Sep 2011 07:49:28 +0000</pubDate>
		<dc:creator>retkomma</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://retkomma.wordpress.com/?p=251</guid>
		<description><![CDATA[I first heard of FiddlerCore on the Hearding Code pod cast recently. Now, you probably know Fiddler &#8211; at least for me, this is one of my favorite (free) web debugging tools on Windows. Baiscally, Fiddler captures all http traffic &#8230; <a href="http://retkomma.wordpress.com/2011/09/18/fiddlercore-fiddler-dll-in-your-projects/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=retkomma.wordpress.com&amp;blog=903461&amp;post=251&amp;subd=retkomma&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I first heard of FiddlerCore on the <a href="http://herdingcode.com/">Hearding Code</a> pod cast recently. Now, you probably know <a href="http://www.fiddler2.com/">Fiddler</a> &#8211; at least for me, this is one of my favorite (free) web debugging tools on Windows. Baiscally, Fiddler captures all http traffic and lets you play around with it, step into the requests, tamper them etc. Cool stuff!</p>
<p>FiddlerCore is a (managed/.NET) dll that you can download and install along with a sample project from here: <a href="http://www.fiddler2.com/Fiddler/Core/">http://www.fiddler2.com/Fiddler/Core/</a>. Actually, according to The Fiddler Father, Eric Lawrence, on the PodCast, this is not just the dll&#8217;s at the bottom of Fiddler, but a special compilation of the Fiddler dll&#8217;s that he maintains just for guys like us &#8211; thank you, Eric!</p>
<p>So far, my uses of this has been:</p>
<ul>
<li>As a simple proxy redirecting http traffic to other ports</li>
<li>As a handler of sub domains on IIS Espress</li>
<li>As an http logging module</li>
</ul>
<div>And I&#8217;ve only known about it for a month or so&#8230; It seems this was really something that I needed!</div>
<div><span class="Apple-style-span" style="font-size:14px;line-height:23px;">So far it works like a charm! I don&#8217;t know if it is stabile and fast enough to work in a prouction environment. For now I just use it for development purposes only, but for this it is certainly great.</span></div>
<div>I&#8217;ll write a separate blog post with some code on how to handle e.g. sub domains on IIS Express with Fiddler Core.</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/retkomma.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/retkomma.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/retkomma.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/retkomma.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/retkomma.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/retkomma.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/retkomma.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/retkomma.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/retkomma.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/retkomma.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/retkomma.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/retkomma.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/retkomma.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/retkomma.wordpress.com/251/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=retkomma.wordpress.com&amp;blog=903461&amp;post=251&amp;subd=retkomma&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://retkomma.wordpress.com/2011/09/18/fiddlercore-fiddler-dll-in-your-projects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9a127e536af8cfed16a560166e2f6276?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">retkomma</media:title>
		</media:content>
	</item>
	</channel>
</rss>
