<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>of bits and bytes &#187; .NET</title>
	<atom:link href="http://blog.rolandbaer.ch/category/net/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.rolandbaer.ch</link>
	<description>Der normale Wahnsinn in der Softwarewelt - The ordinary madness in the world of software.</description>
	<lastBuildDate>Sun, 05 Feb 2012 16:14:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Rekursiv vs. Iterativ</title>
		<link>http://blog.rolandbaer.ch/2012/01/29/rekursiv-vs-iterativ/</link>
		<comments>http://blog.rolandbaer.ch/2012/01/29/rekursiv-vs-iterativ/#comments</comments>
		<pubDate>Sun, 29 Jan 2012 17:16:21 +0000</pubDate>
		<dc:creator>Roland Bär</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Deutsch]]></category>
		<category><![CDATA[Math]]></category>
		<category><![CDATA[Factorial]]></category>
		<category><![CDATA[Fakultät]]></category>
		<category><![CDATA[Mathematik]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Stack Overflow]]></category>

		<guid isPermaLink="false">http://blog.rolandbaer.ch/?p=453</guid>
		<description><![CDATA[Rekursiv oder Iterativ, was ist für den Computer "einfacher zu verstehen"?]]></description>
			<content:encoded><![CDATA[<p>In der <a href="http://www.dotnetpro.de/">dotnetpro</a> <a href="http://www.dotnetpro.de/articles/articlearchive1763.aspx">8/2011</a> hat <a href="http://www.ralfw.de/">Ralp Westphal</a> im Artikel <a href="http://www.dotnetpro.de/articles/onlinearticle3802.aspx">&#8220;Aus Baum mach Fluss&#8221;</a> zum Einstieg die <a href="http://de.wikipedia.org/wiki/Fakult%C3%A4t_%28Mathematik%29" title="Fakultät (Mathematik)">Fakultät</a>sberechnung in der rekursiven und in der iterativen Variante gezeigt. Seiner Meinung nach ist die iterative Variante einfacher zu verstehen, besonders für nicht-Mathematiker.<br />
Ich fragte mich dann, welche Variante ist für den Computer einfacher zu verstehen, d.h. welche Variante ist performanter? Oder ist es egal, optimiert der Compiler schon so weit, dass beide Varianten in etwa gleich schnell sind?</p>
<p>Ich habe ein <a href='http://blog.rolandbaer.ch/wp-content/uploads/2012/01/factorial.zip'>kleines Programm</a> geschrieben, dass die Fakultät für verschiedene Werte mehrmals berechnet, um messbare Werte zu erhalten.<br />
Hier die Resultate:</p>
<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Factorial recursive and iterative<br />
---------------------------------<br />
<br />
10!<br />
Recursive: 00:00:00.0390023<br />
Iterative: 00:00:00.0220012<br />
<br />
100!<br />
Recursive: 00:00:00.2940168<br />
Iterative: 00:00:00.1720099<br />
<br />
1000!<br />
Recursive: 00:00:02.5131437<br />
Iterative: 00:00:01.0270588<br />
<br />
10000!<br />
Recursive: 00:00:25.0624335<br />
Iterative: 00:00:09.4535407</div></div>
<p>Die rekursive Variante braucht also etwa 2.5 mal so lang wie die iterative. Und bei grossen Fakultäten kommt noch ein weiteres Problem hinzu: Es wird eine StackOverflowException geworfen, da jeder Rekursionsschritt einen Funktionsaufruf zur Folge hat, der einen Teil des Stacks beansprucht.</p>
<p><strong>Fazit:</strong><br />
Der iterative Ansatz ist (mindestens in diesem Fall) auch für den Computer &#8220;einfacher zu verstehen&#8221;. Neben der besseren Performance ist aber auch die gebannte Gefahr des Stack Overflows ein wichtiger Grund, die iterative Varinate vorzuziehen.</p>
<p><a href='http://blog.rolandbaer.ch/wp-content/uploads/2012/01/factorial.zip'>Factorial Source Code</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rolandbaer.ch/2012/01/29/rekursiv-vs-iterativ/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Slippery When Wet #5: The Process object or Optimization? don&#8217;t do it!</title>
		<link>http://blog.rolandbaer.ch/2011/11/12/slippery-when-wet-5-the-process-object/</link>
		<comments>http://blog.rolandbaer.ch/2011/11/12/slippery-when-wet-5-the-process-object/#comments</comments>
		<pubDate>Sat, 12 Nov 2011 10:40:07 +0000</pubDate>
		<dc:creator>Roland Bär</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Pitfall]]></category>
		<category><![CDATA[Slippery When Wet]]></category>
		<category><![CDATA[SWW]]></category>

		<guid isPermaLink="false">http://blog.rolandbaer.ch/?p=392</guid>
		<description><![CDATA[I proudly present to you the fifth in a infinite number of posts of “Slippery When Wet.” In these posts I show you a little bastard I stumbled on. To get the memory usage information you can use the System.Diagnostics.Process class. As I wantet to check the memory usage regularly I kept the reference to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.rolandbaer.ch/wp-content/uploads/2008/10/slipperywhenwet.gif"><img src="http://blog.rolandbaer.ch/wp-content/uploads/2008/10/slipperywhenwet-216x300.gif" alt="Slippery When Wet" title="Slippery When Wet" width="216" height="300" class="alignright size-medium wp-image-61" /></a>I proudly present to you the fifth in a infinite number of posts of “Slippery When Wet.” In these posts I show you a little bastard I stumbled on.</p>
<p>To get the memory usage information you can use the <a href="http://msdn.microsoft.com/en-us/library/system.diagnostics.process.aspx">System.Diagnostics.Process</a> class. As I wantet to check the memory usage regularly I kept the reference to the Process object in my class. But the value never changed anymore&#8230; Then I tried to get the Process object every time i needed the current memory size &ndash; and it worked. </p>
<p>So I read the documentation a little more carefully and got to this part:</p>
<blockquote><p>
The process component obtains information about a group of properties all at once. After the Process component has obtained information about one member of any group, it will cache the values for the other properties in that group and not obtain new information about the other members of the group until you call the Refresh method. Therefore, a property value is not guaranteed to be any newer than the last call to the Refresh method. The group breakdowns are operating-system dependent.</p></blockquote>
<p>So I changed my code again to not get the Process every time I wanted the current memory size but call the Refresh method.</p>
<p>And what did we learn from this episode? </p>
<p><a href="http://en.wikipedia.org/wiki/Michael_A._Jackson">Michael A. Jackson</a> (&#8220;<a href="http://en.wikipedia.org/wiki/Optimization_%28computer_science%29#Quotes">The First Rule of Program Optimization: Don&#8217;t do it (&#8230;)</a>&#8220;) and <a href="http://en.wikipedia.org/wiki/Donald_Knuth">Donald Knuth</a> (&#8220;<a href="http://en.wikipedia.org/wiki/Optimization_%28computer_science%29#Quotes">(&#8230;) premature optimization is the root of all evil (&#8230;)</a>&#8220;) are right. Don&#8217;t do optimization, especially not if you don&#8217;t really know what you are doing&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rolandbaer.ch/2011/11/12/slippery-when-wet-5-the-process-object/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>.NET Reflectors Erben</title>
		<link>http://blog.rolandbaer.ch/2011/05/18/net-reflectors-erben/</link>
		<comments>http://blog.rolandbaer.ch/2011/05/18/net-reflectors-erben/#comments</comments>
		<pubDate>Wed, 18 May 2011 20:57:15 +0000</pubDate>
		<dc:creator>Roland Bär</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Deutsch]]></category>
		<category><![CDATA[ILSpy]]></category>
		<category><![CDATA[Reflector]]></category>
		<category><![CDATA[SharpDevelop]]></category>

		<guid isPermaLink="false">http://blog.rolandbaer.ch/?p=277</guid>
		<description><![CDATA[Nachdem redgate Anfangs Februar Ankündigte, dass der .NET Reflector kostenpflichtig wird, haben sich mehrere Nachfolger empfohlen: Als erstes kündigte das Team von #develop das Tool ILSpy an. Danach folgte Telerik mit JustDecompile. JetBrains, welche sich auch für &#8230; verantwortlich zeichnen, kündigten dann auch noch einen Erben an, das Tool dotPeek. Redgate kündigte währenddessen an, dass [...]]]></description>
			<content:encoded><![CDATA[<p>Nachdem <a href="http://www.red-gate.com/">redgate</a> Anfangs Februar Ankündigte, dass der <a href="http://reflector.red-gate.com/download.aspx?TreatAsUpdate=1">.NET Reflector kostenpflichtig</a> wird, haben sich mehrere Nachfolger empfohlen:</p>
<p>Als erstes kündigte das Team von <a href="http://www.sharpdevelop.net/">#develop</a> das Tool <a href="http://wiki.sharpdevelop.net/ILSpy.ashx">ILSpy</a> an.</p>
<p>Danach folgte <a href="http://www.telerik.com/">Telerik</a> mit <a href="http://www.telerik.com/products/decompiling.aspx">JustDecompile</a>.</p>
<p>JetBrains, welche sich auch für &#8230; verantwortlich zeichnen, kündigten dann auch noch einen Erben an, das Tool <a href="http://www.jetbrains.com/decompiler/">dotPeek</a>.</p>
<p>Redgate kündigte währenddessen an, dass es weiterhin eine <a href="http://www.reflector.net/2011/04/why-we-reversed-some-of-our-reflector-decision/">kostenlose Version von .NET Reflector</a> geben wird. Es ist in diesem Bereich also noch einiges in Bewegung&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rolandbaer.ch/2011/05/18/net-reflectors-erben/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get the password of user IWAM_</title>
		<link>http://blog.rolandbaer.ch/2009/01/17/get-the-password-of-user-iwam_/</link>
		<comments>http://blog.rolandbaer.ch/2009/01/17/get-the-password-of-user-iwam_/#comments</comments>
		<pubDate>Sat, 17 Jan 2009 17:00:17 +0000</pubDate>
		<dc:creator>Roland Bär</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[English]]></category>

		<guid isPermaLink="false">http://blog.rolandbaer.ch/?p=79</guid>
		<description><![CDATA[After trying some things in the IIS settings I wanted to change back to use the IWAM_* account. But for this I needed the password. I&#8217;ve searched and found some informations and tips to get the password that was used for the IUSR_* or IWAM_* accounts.]]></description>
			<content:encoded><![CDATA[<p>After trying some things in the IIS settings I wanted to change back to use the IWAM_* account. But for this I needed the password. I&#8217;ve searched and found some informations and tips to <a href="http://vittoriop77.blogspot.com/2006/06/iis-iusr-and-iwam-password.html">get the password that was used for the IUSR_* or IWAM_* accounts</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rolandbaer.ch/2009/01/17/get-the-password-of-user-iwam_/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Auswahl der zu benutzenden Framework-Version</title>
		<link>http://blog.rolandbaer.ch/2008/11/12/auswahl-der-zu-benutzenden-framework-version/</link>
		<comments>http://blog.rolandbaer.ch/2008/11/12/auswahl-der-zu-benutzenden-framework-version/#comments</comments>
		<pubDate>Tue, 11 Nov 2008 22:48:52 +0000</pubDate>
		<dc:creator>Roland Bär</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Deutsch]]></category>

		<guid isPermaLink="false">http://blog.rolandbaer.ch/?p=76</guid>
		<description><![CDATA[Um eine .net-Applikation mit einer bestimmten Framework-Version auszuführen, kann diese im App.Conifg-File angegeben werden. Mit folgendem Beispiel wird die Anwendung mit dem Framework 1.1 ausgeführt, wenn man den Kommentar um das andere supportedRuntime-Tag setzt, wird das Framework 2.0 verwenden. &#60; ?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;&#62; &#60;configuration&#62; &#160; &#160;&#60;startup&#62; &#160; &#160; &#160; &#60;supportedruntime version=&#34;v1.1.4322&#34;/&#62; &#60;!-- &#160; &#160; &#160;&#60;supportedRuntime [...]]]></description>
			<content:encoded><![CDATA[<p>Um eine .net-Applikation mit einer bestimmten Framework-Version auszuführen, kann diese im App.Conifg-File angegeben werden. Mit folgendem Beispiel wird die Anwendung mit dem Framework 1.1 ausgeführt, wenn man den Kommentar um das andere supportedRuntime-Tag setzt, wird das Framework 2.0 verwenden.</p>
<div class="codecolorer-container xml geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt; ?xml <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;utf-8&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;startup<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;supportedruntime</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;v1.1.4322&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
<span style="color: #808080; font-style: italic;">&lt;!-- &nbsp; &nbsp; &nbsp;&lt;supportedRuntime version=&quot;v2.0.50727&quot;/&gt;--&gt;</span><br />
&nbsp; &nbsp;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/startup<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></div>
<p>Die Datei muss dabei dem Dateinamen der Anwendung mit angehängtem .config entsprechen, z.B. für die Anwendung &#8220;MyApp.exe&#8221; heisst die Datei &#8220;MyApp.exe.config&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rolandbaer.ch/2008/11/12/auswahl-der-zu-benutzenden-framework-version/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Slippery When Wet #2: SCOPE_IDENTITY and SqlDataReader</title>
		<link>http://blog.rolandbaer.ch/2008/10/25/slippery-when-wet-2-scope-identity-sqldatareader/</link>
		<comments>http://blog.rolandbaer.ch/2008/10/25/slippery-when-wet-2-scope-identity-sqldatareader/#comments</comments>
		<pubDate>Sat, 25 Oct 2008 21:08:23 +0000</pubDate>
		<dc:creator>Roland Bär</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Slippery When Wet]]></category>
		<category><![CDATA[SWW]]></category>

		<guid isPermaLink="false">http://blog.rolandbaer.ch/?p=65</guid>
		<description><![CDATA[I proudly present to you the second in a infinite number of posts of “Slippery When Wet.” In these posts I show you a little bastard I stubled on. Imagine you have a database table with a cloumn id of the data type integer that has set the IDENTITY. You use a stored procedure to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.rolandbaer.ch/wp-content/uploads/2008/10/slipperywhenwet.gif"><img src="http://blog.rolandbaer.ch/wp-content/uploads/2008/10/slipperywhenwet-216x300.gif" alt="" title="Slippery When Wet" width="216" height="300" class="alignright size-medium wp-image-61" /></a>I proudly present to you the second in a infinite number of posts of “Slippery When Wet.” In these posts I show you a little bastard I stubled on.</p>
<p>Imagine you have a database table with a cloumn id of the data type integer that has set the IDENTITY. You use a stored procedure to insert a new entry into this table. Inside this stored procedure you use the SCOPE_IDENTITY() function to get the identifier created for this row. With RETURN SCOPE_IDENTITY() you give the identity to the caller.</p>
<p>You call this stored procedure from a SqlComand with ExecuteReader() that returns you an SqlDataReader object.</p>
<p>From this SqlDataReader you read now the identifier with GetInt32().</p>
<p><strong>Wrong ! </strong></p>
<p>This will give you an InvalidCastException. SCOPE_IDENTITY()&#8217;s return type is numeric, although your identifier column is an integer. SqlDataReader&#8217;s GetXY functions do not convert the data and throw the exception when the data is not already of the right type.</p>
<h3>The first solution</h3>
<p>You can read the value with GetDecimal() and cast the value to an int:</p>
<div class="codecolorer-container csharp geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #6666cc; font-weight: bold;">int</span> identifier <span style="color: #008000;">=</span> <span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">int</span><span style="color: #008000;">&#41;</span>reader<span style="color: #008000;">.</span><span style="color: #0000FF;">GetDecimal</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">0</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></div>
<h3>The second solution</h3>
<p>You cast the identifier inside the stored procedure und return it already as an integer:</p>
<div class="codecolorer-container sql geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="sql codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #993333; font-weight: bold;">CAST</span><span style="color: #66cc66;">&#40;</span>SCOPE_IDENTITY<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> <span style="color: #993333; font-weight: bold;">INT</span><span style="color: #66cc66;">&#41;</span></div></div>
<p>Whatever solution you choose, take care that you use always the same inside your application.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rolandbaer.ch/2008/10/25/slippery-when-wet-2-scope-identity-sqldatareader/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exception after sending data async from a thread</title>
		<link>http://blog.rolandbaer.ch/2008/05/24/exception-async-send-thread/</link>
		<comments>http://blog.rolandbaer.ch/2008/05/24/exception-async-send-thread/#comments</comments>
		<pubDate>Sat, 24 May 2008 14:59:16 +0000</pubDate>
		<dc:creator>Roland Bär</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Pitfall]]></category>

		<guid isPermaLink="false">http://blog.rolandbaer.ch/?p=55</guid>
		<description><![CDATA[If you have a situation like this: void MyThreadFunc&#40;&#41; &#123; // do some work socket.BeginSend&#40;buffer, 0, buffer.Length, 0, new AsyncCallback&#40;MyCallback&#41;, s&#41;; &#125; void MyCallback&#40;IAsyncResult ar&#41; &#123; Socket s = &#40;Socket&#41; ar.AsyncState; s.EndSend&#40;ar&#41;; &#125; And you send a big buffer over a slow connection it can happen that calling EndSend() will throw a SocketException &#8216;The I/O [...]]]></description>
			<content:encoded><![CDATA[<p>If you have a situation like this:</p>
<div class="codecolorer-container csharp geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #6666cc; font-weight: bold;">void</span> MyThreadFunc<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><br />
<span style="color: #008000;">&#123;</span><br />
<span style="color: #008080; font-style: italic;">// do some work</span><br />
<br />
socket<span style="color: #008000;">.</span><span style="color: #0000FF;">BeginSend</span><span style="color: #008000;">&#40;</span>buffer, <span style="color: #FF0000;">0</span>, buffer<span style="color: #008000;">.</span><span style="color: #0000FF;">Length</span>, <span style="color: #FF0000;">0</span>, <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> AsyncCallback<span style="color: #008000;">&#40;</span>MyCallback<span style="color: #008000;">&#41;</span>, s<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<span style="color: #008000;">&#125;</span><br />
<br />
<span style="color: #6666cc; font-weight: bold;">void</span> MyCallback<span style="color: #008000;">&#40;</span>IAsyncResult ar<span style="color: #008000;">&#41;</span><br />
<span style="color: #008000;">&#123;</span><br />
Socket s <span style="color: #008000;">=</span> <span style="color: #008000;">&#40;</span>Socket<span style="color: #008000;">&#41;</span> ar<span style="color: #008000;">.</span><span style="color: #0000FF;">AsyncState</span><span style="color: #008000;">;</span><br />
s<span style="color: #008000;">.</span><span style="color: #0000FF;">EndSend</span><span style="color: #008000;">&#40;</span>ar<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<span style="color: #008000;">&#125;</span></div></div>
<p>And you send a big buffer over a slow connection it can happen that calling EndSend() will throw a SocketException &#8216;The I/O operation has been aborted because of either a thread exit or an application request&#8217;.</p>
<p>This happens because the Thread that started the sending is no more available when the sending ends. The only solution I know is to make sure the thread is still available or to use syncronous sending if possible.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rolandbaer.ch/2008/05/24/exception-async-send-thread/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Benutzen der NAnt-Properties</title>
		<link>http://blog.rolandbaer.ch/2007/11/21/benutzen-der-nant-properties/</link>
		<comments>http://blog.rolandbaer.ch/2007/11/21/benutzen-der-nant-properties/#comments</comments>
		<pubDate>Wed, 21 Nov 2007 20:01:29 +0000</pubDate>
		<dc:creator>Roland Bär</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Deutsch]]></category>
		<category><![CDATA[NAnt]]></category>

		<guid isPermaLink="false">http://blog.rolandbaer.ch/2007/03/17/benutzen-der-nant-properties/</guid>
		<description><![CDATA[Der Zugriff auf die NAnt-Properties ist meiner Meinung nach etwas unglücklich gewählt, da zwei verschiedene Varianten je nach Kontext benutzt werden müssen. Folgendes Beispiel zeigt sehr schön die beiden Varianten, wie NAnt-Properties im jeweiligen Zusammenhang angewendet werden müssen: &#60;delete file=&#34;${Directory}${File}.new&#34; if=&#34;${file::exists(Directory + '' + File + '.new')}&#34; /&#62; Dieser Befehl löscht die Datei, falls sie [...]]]></description>
			<content:encoded><![CDATA[<p>Der Zugriff auf die <a href="http://nant.sourceforge.net/release/latest/help/fundamentals/properties.html">NAnt-Properties</a> ist meiner Meinung nach etwas unglücklich gewählt, da zwei verschiedene Varianten je nach Kontext benutzt werden müssen.</p>
<p>Folgendes Beispiel zeigt sehr schön die beiden Varianten, wie NAnt-Properties im jeweiligen Zusammenhang angewendet werden müssen:</p>
<div class="codecolorer-container xml geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;delete</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;${Directory}${File}.new&quot;</span> </span><br />
<span style="color: #009900;"><span style="color: #000066;">if</span>=<span style="color: #ff0000;">&quot;${file::exists(Directory + '' + File + '.new')}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span></div></div>
<p>Dieser Befehl löscht die Datei, falls sie vorhanden ist. Für den Dateinamen muss die Syntax mit dem ${} benutz werden, die so genannte &#8216;<a id="example">property expansion&#8217;.</a></p>
<p>Für die Bedingung wird dann die Methode für den Zugriff auf das Property innerhalb einer <a href="http://nant.sourceforge.net/release/latest/help/fundamentals/expressions.html">Expression</a> benutzt. Dabei wird auf ${} verzichtet.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rolandbaer.ch/2007/11/21/benutzen-der-nant-properties/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exception &#8220;No web service found at:&#8221; with /js or /jsdebug</title>
		<link>http://blog.rolandbaer.ch/2007/03/09/exception-no-web-service-found-at-with-js-or-jsdebug/</link>
		<comments>http://blog.rolandbaer.ch/2007/03/09/exception-no-web-service-found-at-with-js-or-jsdebug/#comments</comments>
		<pubDate>Fri, 09 Mar 2007 10:35:38 +0000</pubDate>
		<dc:creator>Roland Bär</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Pitfall]]></category>

		<guid isPermaLink="false">http://blog.rolandbaer.ch/2007/03/09/exception-no-web-service-found-at-with-js-or-jsdebug/</guid>
		<description><![CDATA[With &#8220;ASP.NET 2.0 AJAX Extensions 1.0&#8243; (I love this name with two version numbers inside&#8230;) you can request a JavaScript Proxy for a web service with appending /js or /jsdebug to the web service path, like &#8220;http://my-server/my-service.asmx/js&#8221;. When I deployed my application I&#8217;ve got the InvalidOperationException &#8220;No web service found at:&#8221;. When I called the [...]]]></description>
			<content:encoded><![CDATA[<p>With &#8220;ASP.NET 2.0 AJAX Extensions 1.0&#8243; (I love this name with two version numbers inside&#8230;) you can request a JavaScript Proxy for a web service with appending /js or /jsdebug to the web service path, like &#8220;http://my-server/my-service.asmx/js&#8221;.</p>
<p>When I deployed my application I&#8217;ve got the InvalidOperationException &#8220;No web service found at:&#8221;. When I called the web service without /js or /jsdebug the web service worked (at least the generated forms in the Browser where shown). </p>
<p>I&#8217;ve spent a lot of time &#8217;til I recognized the File my-service.asmx was not included in the deploy package. So without the /js appended the my-service.asmx file was not needed, the code from the compiled dll was executed directly, but when I added /js it needed the file.</p>
<p>Conclusion:<br />
Don&#8217;t forget to add the .asmx files in the deployment of your ASP.NET AJAX Project!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rolandbaer.ch/2007/03/09/exception-no-web-service-found-at-with-js-or-jsdebug/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Verhalten des System.Timers.Timer bei neusetzen des Intervalles</title>
		<link>http://blog.rolandbaer.ch/2006/10/31/verhalten-des-systemtimerstimer-bei-neusetzen-des-intevalles/</link>
		<comments>http://blog.rolandbaer.ch/2006/10/31/verhalten-des-systemtimerstimer-bei-neusetzen-des-intevalles/#comments</comments>
		<pubDate>Tue, 31 Oct 2006 10:42:03 +0000</pubDate>
		<dc:creator>Roland Bär</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Deutsch]]></category>

		<guid isPermaLink="false">http://blog.rolandbaer.ch/2006/10/31/verhalten-des-systemtimerstimer-bei-neusetzen-des-intevalles/</guid>
		<description><![CDATA[Nur als kleine Gedächnisstütze für mich: Wenn man beim System.Timers.Timer das Interval neu setzt, wird dieses nach dem nächsten Auslösen des Timers verwendet: Kurzer Bespielcode: using System; public class MyClass &#123; &#160; private static System.Timers.Timer timer = new System.Timers.Timer&#40;&#41;; &#160; public static void Main&#40;&#41; &#160; &#123; &#160; &#160; timer.Elapsed += new System.Timers.ElapsedEventHandler&#40;OnTimer&#41;; &#160; &#160; timer.Interval [...]]]></description>
			<content:encoded><![CDATA[<p>Nur als kleine Gedächnisstütze für mich:</p>
<p>Wenn man beim System.Timers.Timer das Interval neu setzt, wird dieses nach dem nächsten Auslösen des Timers verwendet:</p>
<p>Kurzer Bespielcode:</p>
<div class="codecolorer-container csharp geshi" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System</span><span style="color: #008000;">;</span><br />
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">class</span> MyClass<br />
<span style="color: #008000;">&#123;</span><br />
&nbsp; <span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #0600FF; font-weight: bold;">static</span> <span style="color: #000000;">System.<span style="color: #0000FF;">Timers</span></span><span style="color: #008000;">.</span><span style="color: #0000FF;">Timer</span> timer <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> <span style="color: #000000;">System.<span style="color: #0000FF;">Timers</span></span><span style="color: #008000;">.</span><span style="color: #0000FF;">Timer</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
&nbsp; <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #0600FF; font-weight: bold;">static</span> <span style="color: #6666cc; font-weight: bold;">void</span> Main<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><br />
&nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; timer<span style="color: #008000;">.</span><span style="color: #0000FF;">Elapsed</span> <span style="color: #008000;">+=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> <span style="color: #000000;">System.<span style="color: #0000FF;">Timers</span></span><span style="color: #008000;">.</span><span style="color: #0000FF;">ElapsedEventHandler</span><span style="color: #008000;">&#40;</span>OnTimer<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; timer<span style="color: #008000;">.</span><span style="color: #0000FF;">Interval</span> <span style="color: #008000;">=</span> <span style="color: #FF0000;">3000</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; timer<span style="color: #008000;">.</span><span style="color: #0000FF;">Start</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000000;">System.<span style="color: #0000FF;">Threading</span></span><span style="color: #008000;">.</span><span style="color: #0000FF;">Thread</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Sleep</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">7000</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; timer<span style="color: #008000;">.</span><span style="color: #0000FF;">Interval</span> <span style="color: #008000;">=</span> <span style="color: #FF0000;">2000</span><span style="color: #008000;">;</span><br />
<br />
&nbsp; &nbsp; Console<span style="color: #008000;">.</span><span style="color: #0000FF;">ReadLine</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; <span style="color: #008000;">&#125;</span><br />
<br />
&nbsp; <span style="color: #0600FF; font-weight: bold;">protected</span> <span style="color: #0600FF; font-weight: bold;">static</span> <span style="color: #6666cc; font-weight: bold;">void</span> OnTimer<span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">object</span> sender, <span style="color: #000000;">System.<span style="color: #0000FF;">Timers</span></span><span style="color: #008000;">.</span><span style="color: #0000FF;">ElapsedEventArgs</span> e<span style="color: #008000;">&#41;</span><br />
&nbsp; <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; Console<span style="color: #008000;">.</span><span style="color: #0000FF;">WriteLine</span><span style="color: #008000;">&#40;</span>DateTime<span style="color: #008000;">.</span><span style="color: #0000FF;">Now</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ToString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; <span style="color: #008000;">&#125;</span><br />
<span style="color: #008000;">&#125;</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.rolandbaer.ch/2006/10/31/verhalten-des-systemtimerstimer-bei-neusetzen-des-intevalles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

