<?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>BizTalk 2006 - Windows SharePoint Services adapter : .Net</title><link>http://blogs.msdn.com/ahamza/archive/tags/.Net/default.aspx</link><description>Tags: .Net</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>WebDev.WebServer.exe does not start - Configuration system failed to initialize</title><link>http://blogs.msdn.com/ahamza/archive/2007/03/28/webdev-webserver-exe-does-not-start-configuration-system-failed-to-initialize.aspx</link><pubDate>Thu, 29 Mar 2007 00:56:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1980945</guid><dc:creator>Adrian Hamza</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/ahamza/comments/1980945.aspx</comments><wfw:commentRss>http://blogs.msdn.com/ahamza/commentrss.aspx?PostID=1980945</wfw:commentRss><description>&lt;P&gt;I have Visual Studio 2005 with Service Pack 1 installed and I cannot debug any web service or web application. This worked for a while and then it stopped working. I researched this on a couple of sites and the suggested solutions were&lt;/P&gt;
&lt;P&gt;-&amp;nbsp;Debug with F5 &lt;BR&gt;-&amp;nbsp;Run with CTRL + F5&amp;nbsp; &lt;BR&gt;- copy WebDev.WebServer.exe from another machine if not present in .Net Framework folder &lt;BR&gt;-&amp;nbsp;From .Net Framework folder run WebDev.WebServer.exe /PORT:8081 /PATH:"&lt;EM&gt;path to web app&lt;/EM&gt;" &lt;BR&gt;-&amp;nbsp;disable or open firewall port&lt;/P&gt;
&lt;P&gt;I tried all of these and it still failed with several errors&lt;BR&gt;&lt;EM&gt;Configuration system failed to initialize&lt;BR&gt;Unable to launch Visual Studio's Localhost Web Server.&lt;BR&gt;&amp;nbsp;ASP.NET Development Server failed to start listening on port 8081.&lt;BR&gt;&amp;nbsp;Error message:&lt;BR&gt;&amp;nbsp;Configuration system failed to initialize&lt;BR&gt;&lt;/EM&gt;&lt;BR&gt;In my case, this error was caused by system.net\machineKey element in machine.config. Removing this element fixed the problem. Of course on&amp;nbsp;a production system you don't want to this but you would not run WebDev.WebServer.exe either so that's not actually a problem.&lt;BR&gt;I hope this helps other people facing the same problem!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1980945" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/ahamza/archive/tags/.Net/default.aspx">.Net</category></item><item><title>64 bit and managed code</title><link>http://blogs.msdn.com/ahamza/archive/2006/10/30/64-bit-and-managed-code.aspx</link><pubDate>Mon, 30 Oct 2006 18:45:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:885975</guid><dc:creator>Adrian Hamza</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/ahamza/comments/885975.aspx</comments><wfw:commentRss>http://blogs.msdn.com/ahamza/commentrss.aspx?PostID=885975</wfw:commentRss><description>&lt;P&gt;This article covers some 64 bit aspects regarding managed code and COM+ applications. The 64 bit info regarding managed code was taken from &lt;A class="" title="Josh Williams' blog" href="http://blogs.msdn.com/joshwil/" target=_blank mce_href="http://blogs.msdn.com/joshwil/"&gt;Josh Williams' blog&lt;/A&gt; and I want to thank him for putting all this useful information online. Personally, I found&amp;nbsp;his postings&amp;nbsp;very usefull. The COM+ application info I was able to find it in the documentation for CoCreateInstanceEx and CLSCTX enumeration.&lt;/P&gt;
&lt;P&gt;Josh's articles cover mostly the subject of porting managed code EXE apps to 64 bit. Here are some links that you will find very useful:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;A class="" title="Behavior of 1.0/1.1 managed apps on 64bit machines" href="http://blogs.msdn.com/joshwil/archive/2004/03/13/89163.aspx" target=_blank mce_href="http://blogs.msdn.com/joshwil/archive/2004/03/13/89163.aspx"&gt;Behavior of 1.0/1.1 managed apps on 64bit machines&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A class="" title="what is the WOW64 and what does it mean to managed apps that you run on 64bit machines?" href="http://blogs.msdn.com/joshwil/archive/2004/03/11/88280.aspx" target=_blank mce_href="http://blogs.msdn.com/joshwil/archive/2004/03/11/88280.aspx"&gt;What is the WOW64 and what does it mean to managed apps that you run on 64bit machines?&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A class="" title="How the OS Loader will force .Net v1.0/1.1 executables to run under WOW64 on a 64-Bit Machine" href="http://blogs.msdn.com/joshwil/archive/2004/10/15/243019.aspx" target=_blank mce_href="http://blogs.msdn.com/joshwil/archive/2004/10/15/243019.aspx"&gt;How the OS Loader will force .Net v1.0/1.1 executables to run under WOW64 on a 64-Bit Machine&lt;/A&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;If you don't have the patience to read these articles, here's my scaled down summary with explanations removed:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;AMD64 &lt;/STRONG&gt;- 64 bit processor designed by AMD, initially named &lt;STRONG&gt;X86-64&lt;/STRONG&gt;. Intel has its own compatible processors under the names &lt;STRONG&gt;EM64T, IA-32e, or Intel 64&lt;/STRONG&gt;. &lt;STRONG&gt;x86-64&lt;/STRONG&gt; and &lt;STRONG&gt;x64 &lt;/STRONG&gt;names are used by vendors to refer to these processors.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;IA64 - &lt;/STRONG&gt;a 64-bit processor architecture developed cooperatively by Intel Corporation and Hewlett-Packard&lt;/LI&gt;
&lt;LI&gt;Once a process is started up as either 32bit or 64bit all of the dlls/assemblies that are loaded into that process have to be compatible with that bitness. Incidently, the same is true about the .Net Framework version loaded in the process.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;.Net 1.0 and .Net 1.1 EXE&lt;/STRONG&gt; applications running on a 64 bit machine will run in 32-bit runtime in WOW64 mode. The selection of the .Net Framework (1.0, 1.1 or 2.0) will be determined by the CLR’s loader policy, just as it would be on a 32-bit box.&lt;/LI&gt;
&lt;LI&gt;If you know that your &lt;STRONG&gt;.Net 1.0 or .Net 1.1 EXE&lt;/STRONG&gt; app is safe to be run in 64 bit mode, you can&amp;nbsp;run &lt;A class="" title="CorFlags.exe documentation" href="http://msdn2.microsoft.com/en-us/library/ms164699.aspx" target=_blank mce_href="http://msdn2.microsoft.com/en-us/library/ms164699.aspx"&gt;CorFlags.exe&lt;/A&gt; with the /UpgradeCLRHeader parameter on your EXE in order to upgrade the IMAGE_COR20_HEADER runtime version to 2.5 (version number for .Net Framework 2.0). This will make your EXE to run as 64 bit app on a 64 bit machine. A v1.0/1.1 image which has had its MinorRuntimeVersion whacked will still be compatible with the v1.0/1.1 runtimes.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;.Net 1.0 and .Net 1.1 assemblies can be loaded and executed as 64 bit native into a 64 bit process.&lt;/STRONG&gt; This can be done even without setting the IMAGE_COR20_HEADER runtime version to 2.5. If you make a .Net 2.0 executable and link against a v1.0/1.1 dll you will be able to load it into your process as if it was a .Net 2.0 MSIL assembly. If that v1.0/1.1 dll has code that isn’t safe to run in 64-bit mode it may crash.&lt;/LI&gt;
&lt;LI&gt;.Net 2.0 when installed on a 64 bit machine it will also install the 32 bit version of the framework. .Net 2.0&amp;nbsp;32 bit version will be installed in \WINDOWS\Microsoft.Net\Framework just as it would on a native 32bit machine whereas the 64bit version ends up in \WINDOWS\Microsoft.Net\Framework64.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;.Net 2.0 EXEs and DLLs have bitness information &lt;/STRONG&gt;attached at compile time. CLR headers of your PE image can be marked with&amp;nbsp;one of four things: MSIL, x86, x64, IA64 (names vary). You can chose how the assembly is being compiled, by default MSIL.&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;x86&amp;nbsp;EXE - runs fine on 32 bit, runs in WOW64 mode on 64 bit&lt;/LI&gt;
&lt;LI&gt;x64 EXE - runs as 64 bit on x64 machines, raises BadImageException on anything else (including IA64)&lt;/LI&gt;
&lt;LI&gt;IA64 EXE - runs as 64 bit on IA64 machine, raises BadImageException on anything else (including x64)&lt;/LI&gt;
&lt;LI&gt;MSIL EXE (aka anycpu/neutral/agnostic) - the&amp;nbsp;assembly is not processor specific. It runs as 32 bit on x86 machines, as 64 bit on x64 and IA64 machines.&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;
&lt;P&gt;The articles above, however do not cover the COM+ application case. Let's say I have an out-of-proc managed COM+ component. This component is implemented as&amp;nbsp;a C# class derived from ServicedComponent with attribute ApplicationActivation set to ActivationOption.Server. The assembly containing this component was compiled using .Net 2.0 and it's marked as anycpu/MSIL. This means that the assembly and component are processor neutral and it can run as both 32 and 64 bit on a 64 bit machine. Because the server is out-of-proc, the client and server do not need to share the same bitness. The client can be 32 bit and the server 64 bit, or viceversa. This can be used successfully to integrate legacy 32 bit components into 64 bit applications. Here's an article named &lt;A class="" title="64-bit Insider" href="http://www.64advantage.com/files/64-bit%20Insider%20Volume%201%20Issue%201.pdf" target=_blank mce_href="http://www.64advantage.com/files/64-bit%20Insider%20Volume%201%20Issue%201.pdf"&gt;64-bit Insider&lt;/A&gt; that covers this aspect.&lt;/P&gt;
&lt;P&gt;When a client app instantiates this component, the COM+ component will be created in its own process. Will that process have the same bitness as the client, will it have the bitness determined by the COM+ application settings or by the managed code setting?&amp;nbsp;This article &lt;A class="" href="http://windowssdk.msdn.microsoft.com/en-us/library/ms693716.aspx" target=_blank mce_href="http://windowssdk.msdn.microsoft.com/en-us/library/ms693716.aspx"&gt;http://windowssdk.msdn.microsoft.com/en-us/library/ms693716.aspx&lt;/A&gt;&amp;nbsp;about CLSCTX (paramater to CoCreateInstance) shades some light&amp;nbsp;on some of these aspects, so I included some of the information here. Here's my summary:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;the client of the COM+ application can control the bitness of the server process by passing in CLSCTX_ACTIVATE_32_BIT_SERVER&amp;nbsp;or CLSCTX_ACTIVATE_64_BIT_SERVER (when calling CoCreateInstanceEx).&lt;/LI&gt;
&lt;LI&gt;the server COM+ component can have its own &lt;A class="" title="COM+ application bitness settings" href="http://windowssdk.msdn.microsoft.com/en-us/library/ms694319.aspx" target=_blank mce_href="http://windowssdk.msdn.microsoft.com/en-us/library/ms694319.aspx"&gt;bitness setting&lt;/A&gt;. If the client passes in one of the values above, the client value will overide the server value.&lt;/LI&gt;
&lt;LI&gt;If neither the client nor the server specifies a preference then&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;on Windows XP or Windows Server 2003 without SP1 - 64 bit will be tried first with fallback to 32 bit in case of failure&lt;/LI&gt;
&lt;LI&gt;on Windows Server 2003 with SP1 or later - the server will match the client architecture first, and it will fallback to the alternative in case of failure&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;
&lt;P&gt;The table below taken from MSDN documentation shows the results of the various combinations of client architectures and client settings and server architectures and server settings.&lt;/P&gt;
&lt;P&gt;I hope you found this information useful.&lt;/P&gt;
&lt;DIV class=labelheading&gt;&lt;B&gt;&lt;!----&gt;&lt;/B&gt;&lt;/DIV&gt;
&lt;DIV class=tableSection&gt;
&lt;TABLE class="" width="100%" border=1&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class=""&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;32-bit client, no flag&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;64-bit client, no flag&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;32-bit client, 32-bit flag&lt;SUP&gt;1&lt;/SUP&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;32-bit client, 64-bit flag&lt;SUP&gt;2&lt;/SUP&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;64-bit client, 32-bit flag&lt;SUP&gt;1&lt;/SUP&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;64-bit client, 64-bit flag&lt;SUP&gt;2&lt;/SUP&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;
&lt;P&gt;32-bit server, match client registry value&lt;SUP&gt;3&lt;/SUP&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;32-bit server&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;F&lt;SUP&gt;8&lt;/SUP&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;32-bit server&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;F&lt;SUP&gt;8&lt;/SUP&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;32-bit server&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;F&lt;SUP&gt;8&lt;/SUP&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;
&lt;P&gt;32-bit server, 32-bit registry value&lt;SUP&gt;4&lt;/SUP&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;32-bit server&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;32-bit server&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;32-bit server&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;F&lt;SUP&gt;8&lt;/SUP&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;32-bit server&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;F&lt;SUP&gt;8&lt;/SUP&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;
&lt;P&gt;32-bit server, 64-bit registry value&lt;SUP&gt;5&lt;/SUP&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;F&lt;SUP&gt;8&lt;/SUP&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;F&lt;SUP&gt;8&lt;/SUP&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;32-bit server&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;F&lt;SUP&gt;8&lt;/SUP&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;32-bit server&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;F&lt;SUP&gt;8&lt;/SUP&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;
&lt;P&gt;32-bit server, no registry value&lt;SUP&gt;6&lt;/SUP&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;64/32&lt;SUP&gt;9&lt;/SUP&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;64/32&lt;SUP&gt;9&lt;/SUP&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;32-bit server&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;F&lt;SUP&gt;8&lt;/SUP&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;32-bit server&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;F&lt;SUP&gt;8&lt;/SUP&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;
&lt;P&gt;32-bit server, no registry value,&lt;/P&gt;
&lt;P&gt;Windows Server 2003 SP1&lt;SUP&gt;7&lt;/SUP&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;32-bit server&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;64/32&lt;SUP&gt;9&lt;/SUP&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;32-bit server&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;F&lt;SUP&gt;8&lt;/SUP&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;32-bit server&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;F&lt;SUP&gt;8&lt;/SUP&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;
&lt;P&gt;64-bit server, match client registry value&lt;SUP&gt;3&lt;/SUP&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;F&lt;SUP&gt;8&lt;/SUP&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;64-bit server&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;F&lt;SUP&gt;8&lt;/SUP&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;64-bit server&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;F&lt;SUP&gt;8&lt;/SUP&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;64-bit server&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;
&lt;P&gt;64-bit server, 32-bit registry value&lt;SUP&gt;4&lt;/SUP&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;F&lt;SUP&gt;8&lt;/SUP&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;F&lt;SUP&gt;8&lt;/SUP&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;F&lt;SUP&gt;8&lt;/SUP&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;64-bit server&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;F&lt;SUP&gt;8&lt;/SUP&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;64-bit server&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;
&lt;P&gt;64-bit server, 64-bit registry value&lt;SUP&gt;5&lt;/SUP&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;64-bit server&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;64-bit server&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;F&lt;SUP&gt;8&lt;/SUP&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;64-bit server&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;F&lt;SUP&gt;8&lt;/SUP&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;64-bit server&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;
&lt;P&gt;64-bit server, no registry value&lt;SUP&gt;6&lt;/SUP&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;64-bit server&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;64-bit server&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;F&lt;SUP&gt;8&lt;/SUP&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;64-bit server&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;F&lt;SUP&gt;8&lt;/SUP&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;64-bit server&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;
&lt;P&gt;64-bit server, no registry value, Windows Server 2003 SP1&lt;SUP&gt;7&lt;/SUP&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;32/64&lt;SUP&gt;10&lt;/SUP&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;64-bit server&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;F&lt;SUP&gt;8&lt;/SUP&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;64-bit server&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;F&lt;SUP&gt;8&lt;/SUP&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class=""&gt;
&lt;P&gt;64-bit server&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;
&lt;DIV class=tableSection&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=tableSection&gt;Additional useful information can also be found in the &lt;A class="" title="Serviced Components in 32-bit and 64-bit Architectures" href="http://msdn2.microsoft.com/en-us/library/ms229076(VS.80).aspx" target=_blank mce_href="http://msdn2.microsoft.com/en-us/library/ms229076(VS.80).aspx"&gt;Serviced Components in 32-bit and 64-bit Architectures&lt;/A&gt;&amp;nbsp;article. A COM application will either be 32 bit or 64 bit but it cannot be both. In order to register a 64 bit COM+ application for an assembly containing a serviced component you will have to run the 64 bit version of regsvcs tool. If you want the same serviced component to run as both 32 bit and 64 bit you will need to have 2 separate components sharing (inheriting) a common implementation, each serviced component with its own COM+ application for it.&lt;/DIV&gt;
&lt;P&gt;&lt;SUP&gt;1&lt;/SUP&gt; CLSCTX_ACTIVATE_32_BIT_SERVER.&lt;/P&gt;
&lt;P&gt;&lt;SUP&gt;2&lt;/SUP&gt; CLSCTX_ACTIVATE_64_BIT_SERVER.&lt;/P&gt;
&lt;P&gt;&lt;SUP&gt;3&lt;/SUP&gt; PreferredServerBitness registry value = 1. See &lt;A class="" href="http://windowssdk.msdn.microsoft.com/en-us/library/ms694319.aspx" target=_blank mce_href="http://windowssdk.msdn.microsoft.com/en-us/library/ms694319.aspx"&gt;PreferredServerBitness&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&lt;SUP&gt;4&lt;/SUP&gt; PreferredServerBitness registry value = 2.&lt;/P&gt;
&lt;P&gt;&lt;SUP&gt;5&lt;/SUP&gt; PreferredServerBitness registry value = 3.&lt;/P&gt;
&lt;P&gt;&lt;SUP&gt;6&lt;/SUP&gt; PreferredServerBitness registry value is missing and Windows Server XP or Windows Server 2003 without SP 1 or later is installed.&lt;/P&gt;
&lt;P&gt;&lt;SUP&gt;7&lt;/SUP&gt; PreferredServerBitness registry value is missing and Windows Server 2003 SP 1 or later is installed.&lt;/P&gt;
&lt;P&gt;&lt;SUP&gt;8&lt;/SUP&gt; Fails with CO_CLASSNOTREG error.&lt;/P&gt;
&lt;P&gt;&lt;SUP&gt;9&lt;/SUP&gt; A 64-bit server is activated if it exists; otherwise a 32-bit server is activated.&lt;/P&gt;
&lt;P&gt;&lt;SUP&gt;10&lt;/SUP&gt; A 32-bit server is activated if it exists; otherwise a 64-bit server is activated.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=885975" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/ahamza/archive/tags/.Net/default.aspx">.Net</category></item><item><title>Using DelayedFileSystemWatcher sample</title><link>http://blogs.msdn.com/ahamza/archive/2006/02/06/526222.aspx</link><pubDate>Tue, 07 Feb 2006 04:44:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:526222</guid><dc:creator>Adrian Hamza</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/ahamza/comments/526222.aspx</comments><wfw:commentRss>http://blogs.msdn.com/ahamza/commentrss.aspx?PostID=526222</wfw:commentRss><description>&lt;P&gt;See attached file for a sample on how to use DelayedFileSystemWatcher class described in my previous post &lt;A HREF="/ahamza/archive/2006/02/04/FileSystemWatcher_Duplicate_Events.aspx"&gt;FileSystemWatcher generates duplicate events - How to workaround&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=526222" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/ahamza/attachment/526222.ashx" length="2298" type="text/plain" /><category domain="http://blogs.msdn.com/ahamza/archive/tags/.Net/default.aspx">.Net</category></item><item><title>FileSystemWatcher generates duplicate events - How to workaround</title><link>http://blogs.msdn.com/ahamza/archive/2006/02/04/FileSystemWatcher-Duplicate-Events.aspx</link><pubDate>Sun, 05 Feb 2006 05:09:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:525020</guid><dc:creator>Adrian Hamza</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/ahamza/comments/525020.aspx</comments><wfw:commentRss>http://blogs.msdn.com/ahamza/commentrss.aspx?PostID=525020</wfw:commentRss><description>&lt;p&gt;I had to use the FileSystemWatcher class these days and I found out that it raises multiple duplicate events. If you are not familiar with FileSystemWatcher class, this class allows you to watch a particular folder and receive notifications/events every time there is change happening in that folder. You can subcribe to all sorts of events: file created, file changed, file renamed, file accessed, directory created, directory renamed, directory accessed, etc.&lt;/p&gt;
&lt;p&gt;The problem is that multiple duplicate events are being raised. For instance, if I copy a file over an existing file, instead of raising one file changed event, the FileSystemWatcher object will raise 5 !!! such file change events that are identical. If you are creating a file, the FileSystemWatcher class will raise a file created event and at least a file changed event. &lt;/p&gt;
&lt;p&gt;I think that some of these issues are caused by the Win32 APIs and they are normal, others (like the file createad and file changed events when creating a file) are probably caused by applications. Many applications will first create an empty file and then they will update the file with the file content hence the file created, file changed events being raised when creating a new document. &lt;/p&gt;
&lt;p&gt;This can be worked around by queueing the events (let's say over a 1 second period) and then remove any duplicates. And this is what I did. I implemented my own version of FileSystemWatcher class (named DelayedFileSystemWatcher) that mimics MOST of the FileSystemWatcher behavior and it removes duplicate events.&lt;/p&gt;
&lt;p&gt;DelayedFileSystemWatcher class will delay processing of any events that are being raised. All events that are raised (except error events) by the inner FileSystemWatcher object will be queued to a collection. The ElapsedEventHandler method will be invoked automatically (through a System.Timer.Timer event) every 1 second. This method will analyze all events in the queue. The first time an event is found, it will be marked as "Delayed" and it won't be processed. The next time the method is executed, the already "Delayed" events will be raised but first all events that are duplicate of "Delayed" events will be removed. An event in the queue will either be delayed (processing postponed for next timer event), raised (it's already delayed and it's the first event of his kind), or deleted (delayed or not but there was an event in front of it that was similar/duplicate).So this class mimics FileSystemWatcher but it removes duplicate events that show up within 2 timer events. A second event is duplicate of a first event if both events are of the same type and have all properties equal or if the second event is a an update/changed event, first event is a create event and both events refer to the same file.&lt;/p&gt;
&lt;p&gt;See code file attached. &lt;strong&gt;DISCLAIMER: Use this code at your own risk. No support is provided and this code has NOT been tested.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;[Last file update - February 09, 2006]&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=525020" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/ahamza/attachment/525020.ashx" length="21251" type="text/plain" /><category domain="http://blogs.msdn.com/ahamza/archive/tags/.Net/default.aspx">.Net</category></item></channel></rss>