<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://bloggingabout.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Ramon Smits</title><link>http://bloggingabout.net/blogs/ramon/default.aspx</link><description>Tell me your secrets and i&amp;#39;ll tell you mine</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>Amplitube 2 VST not loaded</title><link>http://bloggingabout.net/blogs/ramon/archive/2009/11/06/amplitube-2-vst-not-loaded.aspx</link><pubDate>Fri, 06 Nov 2009 21:42:00 GMT</pubDate><guid isPermaLink="false">813b6dfd-644e-4573-a816-eebab56ba0d0:482428</guid><dc:creator>Ramon Smits</dc:creator><slash:comments>6</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bloggingabout.net/blogs/ramon/rsscomments.aspx?PostID=482428</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bloggingabout.net/blogs/ramon/commentapi.aspx?PostID=482428</wfw:comment><comments>http://bloggingabout.net/blogs/ramon/archive/2009/11/06/amplitube-2-vst-not-loaded.aspx#comments</comments><description>&lt;p&gt;Yet again a VST did not load in my Ableton Live DAW. This time it is the Amplitube 2 VST by IK Multimedia. It did work if I launched Ableton with administrator priviledge but we al know that we shouldn&amp;#39;t do that if it is not necessary and running as administrator to load a VST sure is not very useful. I launched the excellent process monitor and filtered for stuff coming from the ableton process that did not succeed and I found out that Amplitube 2 is writing to the file:&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;C:\Windows\msocreg32.dat&lt;/p&gt;
&lt;p&gt;A very naste way from IK Multimedia to put that file in the Windows folder as normal users cannot create or modify that file. The file is created by Amplitube so it must be some sort of timer file for the product evaluation.&lt;/p&gt;
&lt;p&gt;To fix this without running as administrator and with UAC enabled do the following:&lt;/p&gt;
&lt;p&gt;&lt;ol&gt;
&lt;li&gt;Launch your DAW by right clicking its icon and select &amp;quot;Run as administrator&amp;quot;.&lt;/li&gt;
&lt;li&gt;Rescan your VST folder for new plugins. Amplitube gets loaded and the above mentioned file is created. You should be able to use the VST.&lt;/li&gt;
&lt;li&gt;Quit your DAW.&lt;/li&gt;
&lt;li&gt;Go to c:\Windows with file explorer.&lt;/li&gt;
&lt;li&gt;Find the file &amp;quot;msocreg32.dat&amp;quot;, right click it and select properties from the context menu.&lt;/li&gt;
&lt;li&gt;Go to the security tab&lt;/li&gt;
&lt;li&gt;Click &amp;quot;Edit&amp;quot;. A UAC box will appear to ask you for permission and allow it.&lt;/li&gt;
&lt;li&gt;Select the &amp;quot;Users&amp;quot; group.&lt;/li&gt;
&lt;li&gt;Set a checkmark next to &amp;quot;Modify&amp;quot; in the lower list.&lt;/li&gt;
&lt;li&gt;Click twice on &amp;quot;OK&amp;quot; to close both dialogs.&lt;/li&gt;
&lt;li&gt;Launch your DAW as you normally would.&lt;/li&gt;
&lt;/ol&gt;&lt;/p&gt;
&lt;p&gt;Now you are running as a normal user with a function Amplitube VST. This happens to more VST&amp;#39;s like for example the Native Instruments collection required quite a lot of folders to be writable by the user. Because the files are located in the Program Files folder this is not allowed. Just do the above mentioned modification on *only* the &amp;quot;c:\Program Files (x86)\Native Instruments&amp;quot; folder and no more popups to select another folder to write to.&lt;/p&gt;
&lt;p&gt;The tool called &amp;quot;process monitor&amp;quot; by Sysinternals really helps to identify such permission problems so download it if you have similar problems with other VST&amp;#39;s in your favorite DAW.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://bloggingabout.net/aggbug.aspx?PostID=482428" width="1" height="1"&gt;</description><category domain="http://bloggingabout.net/blogs/ramon/archive/tags/Security/default.aspx">Security</category><category domain="http://bloggingabout.net/blogs/ramon/archive/tags/Permissions/default.aspx">Permissions</category><category domain="http://bloggingabout.net/blogs/ramon/archive/tags/DAW/default.aspx">DAW</category><category domain="http://bloggingabout.net/blogs/ramon/archive/tags/VST/default.aspx">VST</category><category domain="http://bloggingabout.net/blogs/ramon/archive/tags/Ampitube/default.aspx">Ampitube</category><category domain="http://bloggingabout.net/blogs/ramon/archive/tags/Ableton/default.aspx">Ableton</category><category domain="http://bloggingabout.net/blogs/ramon/archive/tags/UAC/default.aspx">UAC</category></item><item><title>NHibernate bag did not delete records when IList.Clear() was called</title><link>http://bloggingabout.net/blogs/ramon/archive/2009/09/16/nhibernate-bag-did-not-delete-records-when-ilist-clear-was-called.aspx</link><pubDate>Wed, 16 Sep 2009 09:30:00 GMT</pubDate><guid isPermaLink="false">813b6dfd-644e-4573-a816-eebab56ba0d0:482200</guid><dc:creator>Ramon Smits</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bloggingabout.net/blogs/ramon/rsscomments.aspx?PostID=482200</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bloggingabout.net/blogs/ramon/commentapi.aspx?PostID=482200</wfw:comment><comments>http://bloggingabout.net/blogs/ramon/archive/2009/09/16/nhibernate-bag-did-not-delete-records-when-ilist-clear-was-called.aspx#comments</comments><description>&lt;p&gt;I was having a problem where NHibernate did not automatically delete childs if a collection was emptied by calling &lt;i&gt;IList.Clear()&lt;/i&gt; like in the following code example:&lt;/p&gt;
&lt;pre&gt;var s = GetSession();
var parent = s.Get&amp;lt;Parent&amp;gt;(1);
parent.Childs.Clear();&lt;/pre&gt;
&lt;p&gt;What did work ofcourse was code like the following before executing clear which marked the records for deletion and NHibernate executed the correct delete statements when the session was closed or flushed.&lt;/p&gt;
&lt;pre&gt;foreach(var c in parent.Childs) s.Delete(c);&lt;/pre&gt;
&lt;p&gt;I searched the internet for quite a while and playing around with the &lt;strong&gt;cascade&lt;/strong&gt; and &lt;strong&gt;inverse&lt;/strong&gt; attributes in the &lt;strong&gt;.hbm&lt;/strong&gt; files as I knew it had be an error in the configuration.&lt;/p&gt;
&lt;pre&gt;&amp;lt;bag name=&amp;quot;Topics&amp;quot; &lt;b&gt;cascade=&amp;quot;all&amp;quot; inverse=&amp;quot;true&amp;quot;&lt;/b&gt;&amp;gt;
	&amp;lt;key column=&amp;quot;Webcast_Id&amp;quot;/&amp;gt;
	&amp;lt;one-to-many class=&amp;quot;AddonIndex&amp;quot;/&amp;gt;
&amp;lt;/bag&amp;gt;
&lt;/pre&gt;
&lt;p&gt;After searching for quite some time I found that the problem was &lt;b&gt;cascade=&amp;quot;all&amp;quot;&lt;/b&gt;&amp;nbsp;which should have been &lt;b&gt;cascade=&amp;quot;all-delete-orphan&amp;quot;&lt;/b&gt;&amp;nbsp;and when I read that on a forum I had a very bigy WTF moment. I *really* assumed that &lt;b&gt;all&lt;/b&gt;&amp;nbsp;would do the deletion of the orphans as that is what the keyword implies, that it does *all* while in reality it does all except deletion of orphans.&lt;/p&gt;
&lt;p&gt;So I would like to suggest the (N)Hibernate team to change the names of the cascade values or just ditch the all value.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://bloggingabout.net/aggbug.aspx?PostID=482200" width="1" height="1"&gt;</description><category domain="http://bloggingabout.net/blogs/ramon/archive/tags/NHibernate/default.aspx">NHibernate</category><category domain="http://bloggingabout.net/blogs/ramon/archive/tags/WTF/default.aspx">WTF</category></item><item><title>Windows 7 midi</title><link>http://bloggingabout.net/blogs/ramon/archive/2009/05/29/windows-7-midi.aspx</link><pubDate>Thu, 28 May 2009 23:46:19 GMT</pubDate><guid isPermaLink="false">813b6dfd-644e-4573-a816-eebab56ba0d0:481722</guid><dc:creator>Ramon Smits</dc:creator><slash:comments>5</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bloggingabout.net/blogs/ramon/rsscomments.aspx?PostID=481722</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bloggingabout.net/blogs/ramon/commentapi.aspx?PostID=481722</wfw:comment><comments>http://bloggingabout.net/blogs/ramon/archive/2009/05/29/windows-7-midi.aspx#comments</comments><description>&lt;p&gt;My midi hardware it working nice in my DAW home studio but today I noticed that I do not have the ability to change the default midi out device in Windows 7. After googling around it seems that this was also the case in Windows Vista. But luckily there are options to configure the default out device!&lt;/p&gt;  &lt;p&gt;The first that I found was the &lt;a href="http://akkordwechsel.de/15-windows-vista-und-der-midi-mapper/"&gt;Windows Vista MIDI Mapper control panel&lt;/a&gt; and minutes later the &lt;a href="http://www.benryves.com/products/vistamidi"&gt;Vista MIDI fix&lt;/a&gt;. The control panel application fixed my problem but only lists hardware midi stuff like my MIDI USB keyboards and the hardware midi output of my Creative card as the Vista MIDI fix application lists more midi out options but I haven&amp;#39; not tested those yet.&lt;/p&gt;  &lt;p&gt;Both applications run without any problems here on my Windows 7 RC x64 installation.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://bloggingabout.net/aggbug.aspx?PostID=481722" width="1" height="1"&gt;</description><category domain="http://bloggingabout.net/blogs/ramon/archive/tags/MIDI/default.aspx">MIDI</category><category domain="http://bloggingabout.net/blogs/ramon/archive/tags/Windows+7/default.aspx">Windows 7</category><category domain="http://bloggingabout.net/blogs/ramon/archive/tags/Control+Panel/default.aspx">Control Panel</category></item><item><title>OpenSUSE 11.1 VirtualBox additions</title><link>http://bloggingabout.net/blogs/ramon/archive/2009/05/05/opensuse-11-1-virtualbox-additions.aspx</link><pubDate>Tue, 05 May 2009 08:55:54 GMT</pubDate><guid isPermaLink="false">813b6dfd-644e-4573-a816-eebab56ba0d0:481598</guid><dc:creator>Ramon Smits</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bloggingabout.net/blogs/ramon/rsscomments.aspx?PostID=481598</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bloggingabout.net/blogs/ramon/commentapi.aspx?PostID=481598</wfw:comment><comments>http://bloggingabout.net/blogs/ramon/archive/2009/05/05/opensuse-11-1-virtualbox-additions.aspx#comments</comments><description>&lt;p&gt;I tried to install the virtualbox machine additions in my OpenSUSE guest but had some problems. Mouse integration worked but display resizing did not. It turned out that I just didn’t read the output from the additions package well.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Remove all &amp;quot;Modes&amp;quot; lines from the &amp;quot;Screen&amp;quot; section and any Option &amp;quot;PreferredMode&amp;quot; lines from &amp;quot;Monitor&amp;quot; sections.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Did that by removing the Option from the Monitor section and all Modes lines from the subsections of the Screen section and it now working as it should with display resizing. The only thing that does not work is clipboard sharing.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://bloggingabout.net/aggbug.aspx?PostID=481598" width="1" height="1"&gt;</description><category domain="http://bloggingabout.net/blogs/ramon/archive/tags/OpenSUSE/default.aspx">OpenSUSE</category><category domain="http://bloggingabout.net/blogs/ramon/archive/tags/VirtualBox/default.aspx">VirtualBox</category></item><item><title>Cool finalizer assert trick</title><link>http://bloggingabout.net/blogs/ramon/archive/2009/04/12/cool-finalizer-assert-trick.aspx</link><pubDate>Sun, 12 Apr 2009 13:24:11 GMT</pubDate><guid isPermaLink="false">813b6dfd-644e-4573-a816-eebab56ba0d0:481501</guid><dc:creator>Ramon Smits</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bloggingabout.net/blogs/ramon/rsscomments.aspx?PostID=481501</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bloggingabout.net/blogs/ramon/commentapi.aspx?PostID=481501</wfw:comment><comments>http://bloggingabout.net/blogs/ramon/archive/2009/04/12/cool-finalizer-assert-trick.aspx#comments</comments><description>&lt;p&gt;I just saw a cool trick done in a finalizer of a class. When a class implements IDisposable then its creator needs to call Dispose when it is finishen. Lots of developers forget this and that usually results in system resources that are locked until the garbage collector thinks its time to do its work.&lt;/p&gt;  &lt;p&gt;The code construction I saw was:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;~MyCoolClass()     &lt;br /&gt;{      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; System.Diagnostics.Debug.Assert(false);      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Dispose(false);      &lt;br /&gt;}&amp;#160;&amp;#160;&amp;#160; &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I have never thought of doing this but it makes sense to just add a assert to a finalizer to get notified that you didn’t dispose the object. The finalizer will never be called if it would because of the GC.SuppressFinalize(this); statement that should be done when calling IDisposable.Dispose on the object.&lt;/p&gt;  &lt;p&gt;It could be that you are getting this in a service and then this doesn’t make any sense but then you could just log an error instead.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://bloggingabout.net/aggbug.aspx?PostID=481501" width="1" height="1"&gt;</description><category domain="http://bloggingabout.net/blogs/ramon/archive/tags/.Net/default.aspx">.Net</category><category domain="http://bloggingabout.net/blogs/ramon/archive/tags/CSharp/default.aspx">CSharp</category></item><item><title>DAW: Multiple ASIO devices</title><link>http://bloggingabout.net/blogs/ramon/archive/2009/04/11/daw-multiple-asio-devices.aspx</link><pubDate>Sat, 11 Apr 2009 11:42:50 GMT</pubDate><guid isPermaLink="false">813b6dfd-644e-4573-a816-eebab56ba0d0:481500</guid><dc:creator>Ramon Smits</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bloggingabout.net/blogs/ramon/rsscomments.aspx?PostID=481500</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bloggingabout.net/blogs/ramon/commentapi.aspx?PostID=481500</wfw:comment><comments>http://bloggingabout.net/blogs/ramon/archive/2009/04/11/daw-multiple-asio-devices.aspx#comments</comments><description>&lt;p&gt;I have bought the &lt;a href="http://www.samsontech.com/products/productpage.cfm?prodID=1878"&gt;Samson C03U USB microphone&lt;/a&gt; and after plugging it into an available USB port it worked immediately. I then wanted to use it from any of my sequencers (Cubase AI and FLStudio) but only to find out that neither can use multiple ASIO devices simultaneously. Not that difficult to understand as probably only one ASIO device can be active at a time and for that you get low latency audio out/in in return. I also saw an ASIO DirectX Full Duplex driver. Probably a ASIO host that delegates to direct sound. Had not seen that before so I selected it and there I could select the audio devices that I wanted to make available and it worked! I could use my &lt;a href="http://us.creative.com/products/product.asp?category=1&amp;amp;subcategory=208&amp;amp;product=15853"&gt;Creative X-FI Extreme Gamer&lt;/a&gt; for audio out and my Samson C03U for audio in. The only big problem is that I had lots of latency. After tweaking it I found out that I could lower the buffersize to 512 samples&amp;#160; instead of the default 2048 which decreased the latency but it is still not very enjoyable to listen live to the incoming audio.&lt;/p&gt;  &lt;p&gt;I remembered that I had used &lt;a href="http://www.asio4all.com/"&gt;ASIO4ALL&lt;/a&gt; a long time ago when I didn’t had ASIO drivers for my onboard sound. ASIO4ALL is similar to the Directsound ASIO provider in configuration but in ASIO4ALL I could lower the buffer sizes to 64 samples which reduced the latency to acceptable levels to listen to the incoming audio. A few clicks occur in the out so I increased that to 96 samples.&lt;/p&gt;  &lt;p&gt;I think that I have lower latency using the ASIO4ALL drivers instead of the drivers from Creative. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://bloggingabout.net/aggbug.aspx?PostID=481500" width="1" height="1"&gt;</description></item><item><title>No CNAME on a domain record only on subdomains</title><link>http://bloggingabout.net/blogs/ramon/archive/2009/04/07/no-cname-on-a-domain-record-only-on-subdomains.aspx</link><pubDate>Tue, 07 Apr 2009 15:46:48 GMT</pubDate><guid isPermaLink="false">813b6dfd-644e-4573-a816-eebab56ba0d0:481495</guid><dc:creator>Ramon Smits</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bloggingabout.net/blogs/ramon/rsscomments.aspx?PostID=481495</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bloggingabout.net/blogs/ramon/commentapi.aspx?PostID=481495</wfw:comment><comments>http://bloggingabout.net/blogs/ramon/archive/2009/04/07/no-cname-on-a-domain-record-only-on-subdomains.aspx#comments</comments><description>&lt;p&gt;We were having some mail problems. This is not always the case but we now found the culprit. The problem was that our domain record *had* a CNAME record referring to the A record of the webserver. Some mail servers will use the CNAME record instead of the MX record when the smtp server needs to be resolved.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;mywebserver.&lt;/strong&gt;mydomain.com &lt;em&gt;A&lt;/em&gt; 127.0.0.1&lt;/p&gt;    &lt;p&gt;mydomain.com &lt;em&gt;CNAME&lt;/em&gt; &lt;strong&gt;mywebserver.&lt;/strong&gt;mydomain.com&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;www.&lt;/strong&gt;mydomain.com &lt;em&gt;CNAME&lt;/em&gt; &lt;strong&gt;mywebserver.&lt;/strong&gt;mydomain.com&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;This will result in lots of mail servers not being able to deliver the mail. So today’s (DNS) lessons learned are:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Do not set a CNAME record on your domain &lt;/li&gt;    &lt;li&gt;Do not use a CNAME record for a catch all (*.mydomain.com) as this too suffers from the same problems. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;You can still use CNAME records for your ‘service’ subdomains that refer to actual hosts (A and AAAA records). This is still the most efficient way to handle your ip addresses for your actual machines especially when you also support ipv6.&lt;/p&gt;  &lt;p&gt;The most frustrating thing here is that the behavior differs on platforms and applications so it took a while before this was discovered.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://bloggingabout.net/aggbug.aspx?PostID=481495" width="1" height="1"&gt;</description></item><item><title>My computer hardware history</title><link>http://bloggingabout.net/blogs/ramon/archive/2009/03/24/my-computer-hardware-history.aspx</link><pubDate>Tue, 24 Mar 2009 13:14:14 GMT</pubDate><guid isPermaLink="false">813b6dfd-644e-4573-a816-eebab56ba0d0:481408</guid><dc:creator>Ramon Smits</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bloggingabout.net/blogs/ramon/rsscomments.aspx?PostID=481408</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bloggingabout.net/blogs/ramon/commentapi.aspx?PostID=481408</wfw:comment><comments>http://bloggingabout.net/blogs/ramon/archive/2009/03/24/my-computer-hardware-history.aspx#comments</comments><description>&lt;p&gt;I was just chatting with a collegue about my hardware history and thought it was time for an update. My hardware list is as follows:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;MSX2 HB-F9P&lt;/li&gt;    &lt;li&gt;Amiga 500 1MB + Action Replay III&lt;/li&gt;    &lt;li&gt;Amiga CDTV 1MB + DIP switch KS1.3&lt;/li&gt;    &lt;li&gt;486DX33 8MB + SB16 + GUS&lt;/li&gt;    &lt;li&gt;486DX266 32MB + SB16 + GUS&lt;/li&gt;    &lt;li&gt;Pentium 200MHz MMX @ 225MHz 128MB + GUS IW + PowerVR + Voodoo2&lt;/li&gt;    &lt;li&gt;Pentium 4 1GHz 512MB&lt;/li&gt;    &lt;li&gt;Pentium D 3,4GHz 2GB + ATI HD2600XT + NVidia 9800GT&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The first computer that I saw as a kid was an Atari 2600 which friends of mine had and that was pretty amazing. A few years later I got my own computer, the MSX2. Later the father of the friends that had the Atari 2600 bought an Amiga 2000 and I really was flabbergasted when I saw it in action. I was already in love with the MSX2 but it extended to the Amiga and soon I was an owner of an Amiga 500! I somewhere sold my Amiga hardware which I needed to do to buy a PC but now I regret that dicision :-).&lt;/p&gt;  &lt;p&gt;The MSX died somewhere around the year 2000 when heavy rain filled the basement where it was stored but a friend wanted to get rid of his MSX2 hardware. Two Philips NMS 8280 but only one keyboard. I still have these devices and sometimes boot them up with either one of the few cartridges that survived the basement pool experiment.&lt;/p&gt;  &lt;p&gt;Somewhere a long I also owned a NES but I was and probably never will be a console person.&lt;/p&gt;  &lt;p&gt;I learned programming on the MSX in BASIC and a little bit hacking with disassemblers. On the Amiga I started with AMOS, REXX and later on SAS C and 68000 assembly. I then made the transition to the PC where I was first programming in Turbo Pascal combined with x86 assembler and later on Watcom C/C++. I then started programming for a living and programmed MSVC/VB6 in Visual Studio 6 in Windows with COM(+) and later on in .net 1.0.&lt;/p&gt;  &lt;p&gt;I was always interested in other development platforms and operating systems. I experimented a lot with all kinds of languages and Linux distributions, OS/2 and BeOS but nowadays I primarily program in c# because I am a professional .net developer for a living but I still experiment in my free time although I’m not such a geek anymore as I was 10 years ago.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://bloggingabout.net/aggbug.aspx?PostID=481408" width="1" height="1"&gt;</description></item><item><title>How-to enable large file uploads in IIS7</title><link>http://bloggingabout.net/blogs/ramon/archive/2009/03/13/how-to-enable-large-file-uploads-in-iis7.aspx</link><pubDate>Fri, 13 Mar 2009 09:57:28 GMT</pubDate><guid isPermaLink="false">813b6dfd-644e-4573-a816-eebab56ba0d0:481330</guid><dc:creator>Ramon Smits</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bloggingabout.net/blogs/ramon/rsscomments.aspx?PostID=481330</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bloggingabout.net/blogs/ramon/commentapi.aspx?PostID=481330</wfw:comment><comments>http://bloggingabout.net/blogs/ramon/archive/2009/03/13/how-to-enable-large-file-uploads-in-iis7.aspx#comments</comments><description>&lt;p&gt;We have migrated from IIS6 to II7 and today we had some problems with large file uploads which we didn’t have with ASP.NET on IIS6. The web application was already configured to allow large file uploads:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&amp;lt;system.web&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;httpRuntime maxRequestLength=&amp;quot;153600&amp;quot; executionTimeout=&amp;quot;900&amp;quot; /&amp;gt;      &lt;br /&gt;&amp;lt;/system.web&amp;gt; &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;So WTF is happening? Well IIS7 request filtering was kicking in and we needed to configure it and this can be done too in the web.config:&lt;/p&gt;  &lt;p&gt;&amp;lt;system.webServer&amp;gt;   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;security&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;requestFiltering&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;requestLimits maxAllowedContentLength=&amp;quot;157286400&amp;quot; /&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/requestFiltering&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/security&amp;gt;    &lt;br /&gt;&amp;lt;/system.webServer&amp;gt; &lt;/p&gt;  &lt;p&gt;But this still didn’t work for us because the default permission in IIS7 is that applications are not allowed to alter this setting. Configuring the setting with &lt;strong&gt;appcmd&lt;/strong&gt; on an &lt;em&gt;elevated command prompt&lt;/em&gt; made it all work again:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;appcmd set config &amp;quot;wms/wmsdev&amp;quot; -section:requestFiltering -requestLimits.maxAllowedContentLength:157286400&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Be aware though that &lt;strong&gt;maxRequestLength&lt;/strong&gt; is specified in &lt;em&gt;kilobytes&lt;/em&gt; and &lt;strong&gt;maxAllowedContentLength &lt;/strong&gt;in &lt;em&gt;bytes&lt;/em&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://bloggingabout.net/aggbug.aspx?PostID=481330" width="1" height="1"&gt;</description><category domain="http://bloggingabout.net/blogs/ramon/archive/tags/IIS/default.aspx">IIS</category><category domain="http://bloggingabout.net/blogs/ramon/archive/tags/IIS7/default.aspx">IIS7</category></item><item><title>Howto create a certificate request with subjectAltNames with OpenSSL on Windows</title><link>http://bloggingabout.net/blogs/ramon/archive/2009/03/08/howto-create-a-certificate-request-with-subjectaltnames-with-openssl-on-windows.aspx</link><pubDate>Sun, 08 Mar 2009 19:11:53 GMT</pubDate><guid isPermaLink="false">813b6dfd-644e-4573-a816-eebab56ba0d0:481287</guid><dc:creator>Ramon Smits</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bloggingabout.net/blogs/ramon/rsscomments.aspx?PostID=481287</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bloggingabout.net/blogs/ramon/commentapi.aspx?PostID=481287</wfw:comment><comments>http://bloggingabout.net/blogs/ramon/archive/2009/03/08/howto-create-a-certificate-request-with-subjectaltnames-with-openssl-on-windows.aspx#comments</comments><description>&lt;p&gt;Sometimes you host multiple websites on one machine on one ip address. Because the way SSL works you can have only one certificate on one ip address + port combination and then you have a problem. One solution is to host all websites on one host(name), the other is creating an SSL certificate that contains multiple hostnames. Problem is that you cannot create such a certificate from within IIS and this is where this article is for.&lt;/p&gt; &lt;p&gt;Download and install OpenSSL for Windows at &lt;a href="http://www.slproweb.com/products/Win32OpenSSL.html"&gt;Shining Light&lt;/a&gt;&lt;/p&gt; &lt;ol&gt; &lt;li&gt;Create a private key for your certificate: &lt;strong&gt;openssl genrsa 2048 &amp;gt;multicert.key&lt;/strong&gt;  &lt;li&gt;Create a configuration file with your certificate data&lt;/li&gt;&lt;/ol&gt;&lt;pre&gt;# -------------- BEGIN custom multicert.cnf -----
HOME = .
oid_section = new_oids
[ new_oids ]
[ req ]
default_days = 730
distinguished_name = req_distinguished_name
encrypt_key = no
string_mask = nombstr
req_extensions = v3_req # Extensions to add to certificate request
[ req_distinguished_name ]
commonName              = &lt;b&gt;Your nice common name&lt;/b&gt;
commonName_default      = &lt;b&gt;www.mydomain.com&lt;/b&gt;
commonName_max = 64
[ v3_req ]
subjectAltName=DNS:&lt;b&gt;ftp.mydomain.com&lt;/b&gt;,DNS:&lt;b&gt;blog.mydomain.com&lt;/b&gt;,DNS:&lt;b&gt;*.mydomain.com&lt;/b&gt;
# -------------- END custom openssl.cnf -----
&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create a certificate request: &lt;strong&gt;openssl req -new -key multicert.key -out multicert.csr -config multicert.cfg&lt;/strong&gt; 
&lt;li&gt;Submit your certificate request to your CA (I often use &lt;a href="http://www.cacert.org"&gt;www.cacert.org&lt;/a&gt;) 
&lt;li&gt;Save the CA certificate request response to a file &lt;strong&gt;multicert.cer&lt;/strong&gt; 
&lt;li&gt;Create a PFX file that contains both the public and private key: openssl pkcs12 -export -out multicert.pfx -in multicert.cer -inkey multicert.key&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;&lt;u&gt;Note that I used the same domain name for all entries and only changed the subdomains but I could just as easily used different domainnames as long as you are allowed to use those domainnames according to how you are registered at the CA that you are going to use.&lt;/u&gt;&lt;/p&gt;
&lt;p&gt;And voila there you have your PFX file that can be loaded by IIS and be used for several websites that match the included hostnames on one ip adress + port combination.&lt;/p&gt;
&lt;h2&gt;Configure hostheaders for SSL&lt;/h2&gt;
&lt;p&gt;You still need to add the correct hostheader on each website on the commandline as this cannot be done from within the management console.&lt;/p&gt;
&lt;h3&gt;IIS6&lt;/h3&gt;&lt;pre&gt;cscript.exe adsutil.vbs set /w3svc/{site identifier}/AccessSSL TRUE&lt;/pre&gt;
&lt;p&gt;Where {site identifier} is the id/number&amp;nbsp; of the website which you can see when you click the &amp;quot;Websites&amp;quot; node in the IIS6 management console. &lt;a href="http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/596b9108-b1a7-494d-885d-f8941b07554c.mspx?mfr=true"&gt;Click here for detailed instructions for IIS6.&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;IIS7&lt;/h3&gt;&lt;pre&gt;appcmd set site /site.name:&amp;quot;MySite V2&amp;quot;/+bindings.[protocol=&amp;#39;https&amp;#39;,bindingInformation=&amp;#39;*:443:sitev2.mysite.com&amp;#39;]&lt;/pre&gt;
&lt;p&gt;&lt;a href="http://blogs.iis.net/thomad/archive/2008/01/25/ssl-certificates-on-sites-with-host-headers.aspx"&gt;Instructions for IIS7&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://bloggingabout.net/aggbug.aspx?PostID=481287" width="1" height="1"&gt;</description></item><item><title>Correct generic exception handling (catch(Exception){ ... })</title><link>http://bloggingabout.net/blogs/ramon/archive/2009/02/21/correct-generic-exception-handling-catch-exception.aspx</link><pubDate>Sat, 21 Feb 2009 12:46:52 GMT</pubDate><guid isPermaLink="false">813b6dfd-644e-4573-a816-eebab56ba0d0:481199</guid><dc:creator>Ramon Smits</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bloggingabout.net/blogs/ramon/rsscomments.aspx?PostID=481199</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bloggingabout.net/blogs/ramon/commentapi.aspx?PostID=481199</wfw:comment><comments>http://bloggingabout.net/blogs/ramon/archive/2009/02/21/correct-generic-exception-handling-catch-exception.aspx#comments</comments><description>&lt;p&gt;A very nice comment tail is growing at the post &amp;quot;&lt;a href="http://blogs.msdn.com/clrteam/archive/2009/02/19/why-catch-exception-empty-catch-is-bad.aspx"&gt;Why catch(Exception)/empty is bad&lt;/a&gt;&amp;quot; on the &lt;a href="http://blogs.msdn.com/clrteam"&gt;CLR team blog&lt;/a&gt;. I tend to agree but there are perfectly valid reason&amp;#39;s to do a generic catch but with a correct handler, an empty handler is *always* bad. For example to cleanup some resources that you have allocated or logging some state that could be helpful in reproducing this specific error condition. What my number one rule is regarding generic catches is that they always need to re-throw the catched exception.&lt;/p&gt; &lt;p&gt;void MyMethod(int myCoolNumber){&lt;br /&gt;&amp;nbsp;&amp;nbsp; try{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Doing cool stuff with my cool number!&lt;br /&gt;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp; catch(Exception ex){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // We could log about this condition and add the argument value.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw;&lt;br /&gt;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;} &lt;p&gt;If I see code that has a generic catch but doesn&amp;#39;t re-throw it or that wraps it then the code will be immediately corrected or be marked for refactoring.&lt;/p&gt; &lt;p&gt;Possible corrections:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;specifying a specific Exception type(s) or&lt;/li&gt; &lt;li&gt;adding the throw keyword or&lt;/li&gt; &lt;li&gt;removing the wrapped exception after the throw or&lt;/li&gt; &lt;li&gt;removing the creation of a new exception without an inner exception&lt;/li&gt;&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://bloggingabout.net/aggbug.aspx?PostID=481199" width="1" height="1"&gt;</description><category domain="http://bloggingabout.net/blogs/ramon/archive/tags/Exception+handling/default.aspx">Exception handling</category><category domain="http://bloggingabout.net/blogs/ramon/archive/tags/Exceptions/default.aspx">Exceptions</category></item><item><title>Why is the ErrorCode property of type int?</title><link>http://bloggingabout.net/blogs/ramon/archive/2008/12/20/why-is-the-errorcode-property-of-type-int.aspx</link><pubDate>Sat, 20 Dec 2008 12:30:00 GMT</pubDate><guid isPermaLink="false">813b6dfd-644e-4573-a816-eebab56ba0d0:478260</guid><dc:creator>Ramon Smits</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bloggingabout.net/blogs/ramon/rsscomments.aspx?PostID=478260</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bloggingabout.net/blogs/ramon/commentapi.aspx?PostID=478260</wfw:comment><comments>http://bloggingabout.net/blogs/ramon/archive/2008/12/20/why-is-the-errorcode-property-of-type-int.aspx#comments</comments><description>&lt;p&gt;Once in a while you need to handle an framework exception that has an ErrorCode property. The HttpException and COMException classes for example have such a property. The problem here is that the Message property contains the ErrorCode in hex but the ErrorCode property is of type int which is signed. It is probably int to be CLS complaint or something but it always gives me a headache!&lt;/p&gt;
&lt;p&gt;Everytime I do something like:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;const int DISP_E_BADINDEX = 0x8002000B;&amp;nbsp; // Cannot assign uint to int&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;But that fails because 0x8002000B is an unsigned value but that value is just copied from the Message property text. So now you first need to convert it to a signed int like the following:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;const int DISP_E_BADINDEX = (int)0x8002000B;&amp;nbsp; // Cannot cast uint to int use unchecked keyword.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;*Sigh* doesn&amp;#39;t this give you a headache? So the final code is:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;unchecked&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; const int DISP_E_BADINDEX = (int)0x8002000B;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ....&lt;br /&gt;}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;But that is also not very neath as the constant int value can now only be used in one method while in most scenarios this value is declared as a constant data member. So now I just start Snippet compiler and dump the signed integer result of the cast and copy paste that in my code like the following line: &lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;const int DISP_E_BADINDEX = -2147352565; // HRESULT 0x8002000B &lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;No bloated code but this.. It would have been nice if it was possible to directly assign such a hex value to a int.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://bloggingabout.net/aggbug.aspx?PostID=478260" width="1" height="1"&gt;</description><category domain="http://bloggingabout.net/blogs/ramon/archive/tags/HRESULT/default.aspx">HRESULT</category><category domain="http://bloggingabout.net/blogs/ramon/archive/tags/Cast/default.aspx">Cast</category></item><item><title>OT: Yamaha KX8 - My new DAW addition</title><link>http://bloggingabout.net/blogs/ramon/archive/2008/12/13/ot-yamaha-kx8-my-new-daw-addition.aspx</link><pubDate>Sat, 13 Dec 2008 13:42:00 GMT</pubDate><guid isPermaLink="false">813b6dfd-644e-4573-a816-eebab56ba0d0:477847</guid><dc:creator>Ramon Smits</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bloggingabout.net/blogs/ramon/rsscomments.aspx?PostID=477847</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bloggingabout.net/blogs/ramon/commentapi.aspx?PostID=477847</wfw:comment><comments>http://bloggingabout.net/blogs/ramon/archive/2008/12/13/ot-yamaha-kx8-my-new-daw-addition.aspx#comments</comments><description>&lt;p&gt;In my free time I often play some notes on my &lt;a href="http://www.thomann.de/nl/emu_xboard_61.htm"&gt;E-MU X-Board 61&lt;/a&gt;. It has 16 controllers, direct patch select and 4 zones that can be layered. But yesterday I bought a new board. The &lt;a href="http://www.thomann.de/nl/yamaha_kx8.htm"&gt;Yamaha KX8&lt;/a&gt; with has 88 weighted keys, just 4 controllers but they are digital and can be set with midi in which cannot be done with the X-Board.&lt;/p&gt;
&lt;p&gt;The feel is really excellent especially for its price. I was comparing it with the &lt;a href="http://www.thomann.de/nl/fatar_sl_990_xp.htm"&gt;Fatar/Studiologic SL990 XP/PRO&lt;/a&gt;, the &lt;a href="http://www.thomann.de/nl/cme_uf80.htm"&gt;CME UF80&lt;/a&gt; and the &lt;a href="http://www.thomann.de/nl/maudio_keystation_pro_88.htm"&gt;M-Audio keystation 88 pro&lt;/a&gt;. If you are searching for a nice weighted board with loads of controllers then the keystation is the winner but it makes quite some noise and the feel doesn&amp;#39;t even come close to a real piano. The CME UF8 is also a very nice board but makes even more noise but has a much better piano feel.&lt;/p&gt;
&lt;p&gt;The Yamaha KX8 won because:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Has a very good piano feel for its price&lt;/li&gt;
&lt;li&gt;Its an Yamaha and they create quality digital piano&amp;#39;s so they know how a keybed should feel.&lt;/li&gt;
&lt;li&gt;Has a black finish instead of the silver/aluminum &lt;/li&gt;
&lt;li&gt;It is silent&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I nice picture of the board in my computer room:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://bloggingabout.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/ramon/Yamaha-KX8-past-net.jpg"&gt;&lt;img border="0" width="480" src="http://bloggingabout.net/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/ramon/Yamaha-KX8-past-net_5F00_thumb.jpg" alt="Yamaha KX8 past net" height="360" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;As you see there isn&amp;#39;t a lot of room left.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://bloggingabout.net/aggbug.aspx?PostID=477847" width="1" height="1"&gt;</description><category domain="http://bloggingabout.net/blogs/ramon/archive/tags/MIDI/default.aspx">MIDI</category><category domain="http://bloggingabout.net/blogs/ramon/archive/tags/Keyboard/default.aspx">Keyboard</category><category domain="http://bloggingabout.net/blogs/ramon/archive/tags/KX8/default.aspx">KX8</category><category domain="http://bloggingabout.net/blogs/ramon/archive/tags/Yamaha/default.aspx">Yamaha</category></item><item><title>Long delay at service startup caused by WebRequest.DefaultWebProxy</title><link>http://bloggingabout.net/blogs/ramon/archive/2008/12/11/long-delay-at-service-startup-caused-by-webrequest-defaultwebproxy.aspx</link><pubDate>Thu, 11 Dec 2008 14:52:02 GMT</pubDate><guid isPermaLink="false">813b6dfd-644e-4573-a816-eebab56ba0d0:477690</guid><dc:creator>Ramon Smits</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bloggingabout.net/blogs/ramon/rsscomments.aspx?PostID=477690</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bloggingabout.net/blogs/ramon/commentapi.aspx?PostID=477690</wfw:comment><comments>http://bloggingabout.net/blogs/ramon/archive/2008/12/11/long-delay-at-service-startup-caused-by-webrequest-defaultwebproxy.aspx#comments</comments><description>&lt;p&gt;Today I was resolving an issue where some of our services had a very long startup time which only occurs during booting and not at a service start/restart from the service snap-in. In other words, when I restart the service when the system is finished booting than we experience no delay.&lt;/p&gt; &lt;p&gt;After debugging through logging I found out that the &lt;strong&gt;System.Net.WebRequest.DefaultWebProxy&lt;/strong&gt; was causing our delay of almost two minutes! The problem is that this is a property! Property access should be fast so this should have been &lt;strong&gt;System.Net.&lt;/strong&gt;&lt;strong&gt;WebRequest.GetDefaultWebProxy()&lt;/strong&gt;.&lt;/p&gt; &lt;p&gt;After searching (aka. googling) it seems to be something related to WPAD which does automatic proxy server detection. I tried overriding the proxy configuration by adding the following to the &lt;strong&gt;app.config&lt;/strong&gt; but without any success. &lt;/p&gt; &lt;p&gt;&amp;lt;system.net&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;defaultProxy useDefaultCredentials=&amp;quot;True&amp;quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;proxy useSystemDefault=&amp;quot;False&amp;quot; autoDetect=&amp;quot;False&amp;quot;/&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;/defaultProxy&amp;gt;&lt;br /&gt;&amp;lt;/system.net&amp;gt;  &lt;p&gt;Without retrieving the default configured .net proxy server the service starts very fast.  &lt;p&gt;I guess I&amp;#39;m dependant on one or more services but didn&amp;#39;t find any except &amp;quot;Tcpip&amp;quot; and &amp;quot;Dnscache&amp;quot; and making our service dependant on these services didn&amp;#39;t help at all.  &lt;p&gt;The conclusion is not to use &amp;quot;WebRequest.DefaultWebProxy&amp;quot; in a service as it will delay your service startup time. WebRequest.DefaultWebProxy is probably meant to be used in desktop applications.  &lt;p&gt;I now created our own version of an IWebProxy locator that can be configured to use the WebRequest.DefaultWebProxy or any other implementation. For example, we have a couple or services where the settings should be saved between uninstalls, upgrades, etc. In our custom implementation we use a we use isolated storage for platform wide settings.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://bloggingabout.net/aggbug.aspx?PostID=477690" width="1" height="1"&gt;</description><category domain="http://bloggingabout.net/blogs/ramon/archive/tags/services/default.aspx">services</category><category domain="http://bloggingabout.net/blogs/ramon/archive/tags/Delay/default.aspx">Delay</category><category domain="http://bloggingabout.net/blogs/ramon/archive/tags/WebRequest.DefaultWebProxy/default.aspx">WebRequest.DefaultWebProxy</category><category domain="http://bloggingabout.net/blogs/ramon/archive/tags/KB220902/default.aspx">KB220902</category><category domain="http://bloggingabout.net/blogs/ramon/archive/tags/WPAD/default.aspx">WPAD</category></item><item><title>Abusing IsInRole(..) is not done</title><link>http://bloggingabout.net/blogs/ramon/archive/2008/12/06/abusing-isinrole-is-not-done.aspx</link><pubDate>Sat, 06 Dec 2008 00:43:44 GMT</pubDate><guid isPermaLink="false">813b6dfd-644e-4573-a816-eebab56ba0d0:477264</guid><dc:creator>Ramon Smits</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bloggingabout.net/blogs/ramon/rsscomments.aspx?PostID=477264</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bloggingabout.net/blogs/ramon/commentapi.aspx?PostID=477264</wfw:comment><comments>http://bloggingabout.net/blogs/ramon/archive/2008/12/06/abusing-isinrole-is-not-done.aspx#comments</comments><description>&lt;p&gt;Rockford Lhotka has writen about &lt;a href="http://www.lhotka.net/weblog/PermissionbasedAuthorizationVsRolebasedAuthorization.aspx"&gt;permission-based authorization versus role-based authorization&lt;/a&gt;. He describes how he is abusing the principal IsInRole(..) method. This is definitely wrong and should never be implemented that way! Besides that it could result in serious performance issues! Image a system with a million objects then storing all permissions allowed to those objects as a role would become disastrous.&lt;/p&gt; &lt;p&gt;A user identity and its role(s) is a pretty lightweight set of a user in a certain domain. This is called authentication. The identity can even be an identity from an external source trusted within this domain.&lt;/p&gt; &lt;p&gt;The other set of data is which users or roles/groups are allowed to do what and is called authorization. An application can support one or more types of authentication for a single user to now who he or she is or what role it has. Often identify management is now managed within an application like for example usage of Windows users, OpenID, Microsoft Passport, etc. and which roles such an identity has depends on the provider. For example Windows roles are the Windows groups.&lt;/p&gt; &lt;p&gt;The .net &amp;#39;role&amp;#39; should be seen as &amp;#39;group&amp;#39; when the &amp;#39;role&amp;#39; is an external managed entity or be seen as &amp;#39;role&amp;#39; if its definition is defined within the application. With this in mind you get the following relation chain:&lt;/p&gt; &lt;p&gt;Identity &amp;lt;-&amp;gt; Group(s) &amp;lt;-&amp;gt; Roles &amp;lt;-&amp;gt; Tasks/Permissions&lt;/p&gt; &lt;p&gt;When the &amp;#39;group&amp;#39; is managed within the application you often see that group and role are merged in one thus resulting in the .net role definition.&lt;/p&gt; &lt;p&gt;Most frameworks allow relations to be defined between all four entities.&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Identity can be linked to a groups, roles and/or tasks&lt;/li&gt; &lt;li&gt;Groups can be linked to identities, roles and/or permissions&lt;/li&gt; &lt;li&gt;Roles can be linked to identities, groups and/or tasks&lt;/li&gt; &lt;li&gt;Tasks can be linked to identities, groups and/or roles&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;But this would be a very bad security design. Normally an application has a lot of defined tasks. On top of that roles can be defined&lt;/p&gt; &lt;p&gt;lets take entity manager that has four CRUD operations:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Administrator is allowed to do create, read, update and delete&lt;/li&gt; &lt;li&gt;Moderator is allowed to do read and update&lt;/li&gt; &lt;li&gt;Normal user is only allowed to do read.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Here we have four tasks that resulted in three application roles. These application roles can then be assigned to a user and/or a group.&lt;/p&gt; &lt;p&gt;So what to do in situations where you need a more fine graded solution like a file system having loads of entries and defining permissions that can differ between all those entries? Implement it like is also done in the file-system! Store that authorization information as part of your data.&lt;/p&gt; &lt;p&gt;Key to success here is to think about what features you need like:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;permission inheritance&lt;/li&gt; &lt;li&gt;deny permissions&lt;/li&gt; &lt;li&gt;loops in your hierarchy.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Try not to add this meta data in the same data structure as the data that you store as this will make your security model not flexible for possible future requirements (and trust me, these WILL come!) but if performance is crucial then this is probably the only solution. But still always try to use something like the following pseudo code!&lt;/p&gt; &lt;p&gt;class BlogPost&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;br /&gt;}&lt;/p&gt; &lt;p&gt;[Flags]&lt;br /&gt;enum BlogPostPermissions&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Create = 1,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Delete = 2,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Update = 4,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Read = 8&lt;br /&gt;}&lt;br /&gt;&lt;/p&gt; &lt;p&gt;interface BlogPostSecurityManager&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SetPostSecurity(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IIdentity identity,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BlogPostDTO post,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BlogPostPermissionspermissions);&lt;br /&gt;}&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Now we have clearly seperation of responsibilies. The blog post doesn&amp;#39;t contain any security related data.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://bloggingabout.net/aggbug.aspx?PostID=477264" width="1" height="1"&gt;</description><category domain="http://bloggingabout.net/blogs/ramon/archive/tags/Security/default.aspx">Security</category><category domain="http://bloggingabout.net/blogs/ramon/archive/tags/Roles/default.aspx">Roles</category><category domain="http://bloggingabout.net/blogs/ramon/archive/tags/Tasks/default.aspx">Tasks</category><category domain="http://bloggingabout.net/blogs/ramon/archive/tags/Identity/default.aspx">Identity</category><category domain="http://bloggingabout.net/blogs/ramon/archive/tags/Groups/default.aspx">Groups</category><category domain="http://bloggingabout.net/blogs/ramon/archive/tags/Authentication/default.aspx">Authentication</category><category domain="http://bloggingabout.net/blogs/ramon/archive/tags/Authorization/default.aspx">Authorization</category></item></channel></rss>