<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/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>You had me at "Hello World" : ASP.Net</title><link>http://blogs.msdn.com/helloworld/archive/tags/ASP.Net/default.aspx</link><description>Tags: ASP.Net</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>In God We Trust, Everybody Else Must Bring Data</title><link>http://blogs.msdn.com/helloworld/archive/2008/08/25/in-god-we-trust-everybody-else-must-bring-data.aspx</link><pubDate>Mon, 25 Aug 2008 23:25:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8896064</guid><dc:creator>HelloWorld</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/helloworld/comments/8896064.aspx</comments><wfw:commentRss>http://blogs.msdn.com/helloworld/commentrss.aspx?PostID=8896064</wfw:commentRss><description>&lt;p&gt;One day, I was presented with a problem, that the finalizer was not called during application pool recycle. I was busy, so I did not have chance to respond. Later on, I checked the code, it was modified to inherit from CriticalFinalizerObject class, and a comment saying that even though the class is inherited from CriticalFinalizerObject, the finalizer sometimes is not getting called. There was a logic in the finalizer that is often not got executed, the &lt;em&gt;assumption&lt;/em&gt; was, the finalizer sometime was not called.&lt;/p&gt;  &lt;p&gt;After digging the code, I discovered what was going on, above the logic that often not get executed, there was one line of code that close a FileStream object that is also a field of this class.&lt;/p&gt;  &lt;p&gt;Managed code does not guarantee the order of the objects that are being garbage-collected, the finalizer may have accessed the garbage-collected objects. The code below the code that closes the FileStream object did not get executed if the FileStream has been garbage-collected.&lt;/p&gt;  &lt;p&gt;It does not matter whether the class is inherited from CriticalFinalizerObject or not, the exception will give the impression that the finalizer was not called.&lt;/p&gt;  &lt;p&gt;A quick look on ASP.Net Event Log shows ObjectDisposed exception whenever the logic is not called, a simple logging showed that the finalizer was always called. After isolating the issue, the fix is much simpler and guaranteed to work all the time.&lt;/p&gt;  &lt;p&gt;Next time you hear about a problem, ask for data, profiler, repro steps. Just like a Test Manager that I knew said, ‘In God we trust, everybody else must bring data’.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8896064" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/helloworld/archive/tags/Programming/default.aspx">Programming</category><category domain="http://blogs.msdn.com/helloworld/archive/tags/ASP.Net/default.aspx">ASP.Net</category><category domain="http://blogs.msdn.com/helloworld/archive/tags/.Net+Framework/default.aspx">.Net Framework</category></item><item><title>Replacing ASMX Web Service with WCF Web Service</title><link>http://blogs.msdn.com/helloworld/archive/2008/08/01/replacing-asmx-web-service-with-wcf-web-service.aspx</link><pubDate>Fri, 01 Aug 2008 22:38:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8803015</guid><dc:creator>HelloWorld</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/helloworld/comments/8803015.aspx</comments><wfw:commentRss>http://blogs.msdn.com/helloworld/commentrss.aspx?PostID=8803015</wfw:commentRss><description>&lt;p&gt;I found a good article about replacing ASMX web wervice with WCF web service here (&lt;a href="http://weblogs.manas.com.ar/waj/2007/05/31/asmx-to-wcf-migration/"&gt;ASMX to WCF migration&lt;/a&gt;). Very cool, and my client application do not need to be recompiled.&lt;/p&gt;  &lt;p&gt;Just one thing that I notice, I believe on step 3, instead of XmlSerializerAttribute it should be XmlSerializerFormat. Have fun!&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8803015" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/helloworld/archive/tags/Programming/default.aspx">Programming</category><category domain="http://blogs.msdn.com/helloworld/archive/tags/ASP.Net/default.aspx">ASP.Net</category><category domain="http://blogs.msdn.com/helloworld/archive/tags/WCF/default.aspx">WCF</category></item><item><title>Free Microsoft Press e-books (LINQ, ASP.Net AJAX, Silverlight)</title><link>http://blogs.msdn.com/helloworld/archive/2008/01/03/free-microsoft-press-e-books-linq-asp-net-ajax-silverlight.aspx</link><pubDate>Thu, 03 Jan 2008 20:56:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6970230</guid><dc:creator>HelloWorld</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/helloworld/comments/6970230.aspx</comments><wfw:commentRss>http://blogs.msdn.com/helloworld/commentrss.aspx?PostID=6970230</wfw:commentRss><description>&lt;p&gt;Microsoft is offering free e-books from Microsoft Press. The subjects that I have seen, LINQ, ASP.Net AJAX, and Silverlight 1.0. All of these are introduction e-books. Those are new cool technologies.&lt;/p&gt;  &lt;p&gt;I would like to encourage you to take advantage of this free e-books &lt;a href="http://www.microsoft.com/learning/vstudio/2008/default.mspx#EBOOK"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6970230" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/helloworld/archive/tags/Programming/default.aspx">Programming</category><category domain="http://blogs.msdn.com/helloworld/archive/tags/ASP.Net/default.aspx">ASP.Net</category><category domain="http://blogs.msdn.com/helloworld/archive/tags/.Net+Framework/default.aspx">.Net Framework</category><category domain="http://blogs.msdn.com/helloworld/archive/tags/LINQ/default.aspx">LINQ</category><category domain="http://blogs.msdn.com/helloworld/archive/tags/Silverlight/default.aspx">Silverlight</category></item><item><title>Using X86 COM interop with ASP.Net application in Windows x64</title><link>http://blogs.msdn.com/helloworld/archive/2007/07/14/using-x86-com-interop-with-asp-net-application-in-windows-x64.aspx</link><pubDate>Sat, 14 Jul 2007 05:51:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3858602</guid><dc:creator>HelloWorld</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/helloworld/comments/3858602.aspx</comments><wfw:commentRss>http://blogs.msdn.com/helloworld/commentrss.aspx?PostID=3858602</wfw:commentRss><description>&lt;P&gt;It has been almost two months since my last post. It has been very busy here..&lt;/P&gt;
&lt;P&gt;I got several good notes with one my previous &lt;A class="" title="x86 COM Interop in x64 Environment" href="http://blogs.msdn.com/controlpanel/blogs/Retrieving%20the%20COM%20class%20factory%20for%20component%20with%20CLSID%20%7BGUID%20HERE%7D%20failed%20due%20to%20the%20following%20error:%2080040154." mce_href="http://blogs.msdn.com/controlpanel/blogs/Retrieving the COM class factory for component with CLSID {GUID HERE} failed due to the following error: 80040154."&gt;post&lt;/A&gt;, about using x86 COM interop in x64 environment. I also had few questions about using x86 COM interop with ASP.Net application in the 64-bit Windows, such as Windows Server 2003 x64, or Vista x64.&lt;/P&gt;
&lt;P&gt;Well, IIS in 64-bit Windows is also 64-bit and uses 64-bit version of .Net Framework. You might deployed your app as pre-compiled binaries or deploying the source, either way, the same error will be thrown in the app is using a 32-bit COM interop. The same error, Retrieving the COM class factory for component with CLSID {GUID HERE} failed due to the following error: 80040154.&lt;/P&gt;
&lt;P&gt;If you deployed the ASP.Net source code to the server, ASP.Net does the compilation and it is more challenging to force ASP.Net to compile it as 32-bit application, as the IIS itself is 64-bit.&lt;/P&gt;
&lt;P&gt;There is a way to do it, I don't say that this is ideal, but it works.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Configure IIS to run 32-bit ASP.Net application.&lt;BR&gt;&lt;A href="http://technet2.microsoft.com/WindowsServer/en/library/140077b8-8c96-49b0-be17-e47095983c2b1033.mspx?mfr=true"&gt;http://technet2.microsoft.com/WindowsServer/en/library/140077b8-8c96-49b0-be17-e47095983c2b1033.mspx?mfr=true&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;Register ASP.Net 32-bit with IIS.&lt;BR&gt;Open a command-prompt&amp;nbsp;window at&amp;nbsp;%windows%\Microsoft.Net\Framework\v2.0.50727 and call aspnet_regiis -i.&lt;/LI&gt;
&lt;LI&gt;Enable the 32-bit ASP.Net web service extension from IIS Service Manager&amp;nbsp;(it is not automatically enabled from step 2).&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;Your ASP.Net application and your 32-bit COM interop now will work. The most ideal situation would be to get the 64-bit version of the COM interop.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3858602" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/helloworld/archive/tags/Programming/default.aspx">Programming</category><category domain="http://blogs.msdn.com/helloworld/archive/tags/ASP.Net/default.aspx">ASP.Net</category><category domain="http://blogs.msdn.com/helloworld/archive/tags/Windows+Vista/default.aspx">Windows Vista</category><category domain="http://blogs.msdn.com/helloworld/archive/tags/64-bit/default.aspx">64-bit</category><category domain="http://blogs.msdn.com/helloworld/archive/tags/com+interop/default.aspx">com interop</category><category domain="http://blogs.msdn.com/helloworld/archive/tags/.Net+Framework/default.aspx">.Net Framework</category></item><item><title>Code Coverage result from ASP.Net project</title><link>http://blogs.msdn.com/helloworld/archive/2006/05/06/code-coverage-result-from-asp-net-project.aspx</link><pubDate>Sat, 06 May 2006 04:47:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:591246</guid><dc:creator>HelloWorld</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/helloworld/comments/591246.aspx</comments><wfw:commentRss>http://blogs.msdn.com/helloworld/commentrss.aspx?PostID=591246</wfw:commentRss><description>&lt;P&gt;One thing that I love from Visual Studio 2005 unit testing is the code coverage result.&lt;/P&gt;
&lt;P&gt;Obtaining code coverage result for ASP.Net projects it little bit tricky. From my experience, the requirements are:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;IIS must be in the same box where you run your test assemblies.&lt;/LI&gt;
&lt;LI&gt;You have to be the admin on that box, or if you are not, the web project must run with the same identity with you.&lt;/LI&gt;
&lt;LI&gt;If you are using Remote Desktop to work on your server, make sure you are connected in the console mode (command line: mstsc /console /v:YourServerName)&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;To setup your test project to generate code, open your solution, click File&amp;gt;Add&amp;gt;Existing Web Site, select localhost, and add your site from there.&lt;/P&gt;
&lt;P&gt;After your site is added, open the test run configuration, select Code Coverage option, and you will be able to see your ASP.Net project there, check the checkbox, and your test will generate code coverage result.&lt;/P&gt;
&lt;P&gt;What will happen if you add a remote site instead of local site? You can add remote site only if the remote site has FrontPage Server extension installed and configured, but still, unless you are running the test in the same box with the IIS, you will not get the code coverage result.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=591246" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/helloworld/archive/tags/Programming/default.aspx">Programming</category><category domain="http://blogs.msdn.com/helloworld/archive/tags/ASP.Net/default.aspx">ASP.Net</category></item></channel></rss>