<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Anuranjan Kukreja's Weblog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/akukreja/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/akukreja/feed.xml</link>
    <description />
    <lastBuildDate>Wed, 17 Apr 2019 03:47:40 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Get DLL Out of The GAC</title>
      <link>https://docs.microsoft.com/archive/blogs/akukreja/get-dll-out-of-the-gac</link>
      <pubDate>Fri, 23 May 2008 03:59:00 GMT</pubDate>
      <dc:creator><![CDATA[Anuranjan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/akukreja/2008/05/23/get-dll-out-of-the-gac/</guid>
      <description><![CDATA[DLLs once deployed in GAC (normally located at c:\windows\assembly) can’t be viewed or used as a...]]></description>
      <content:encoded><![CDATA[<P><SPAN lang=EN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN">DLLs once deployed in GAC (normally located at c:\windows\assembly) can’t be viewed or used as a normal DLL file.&nbsp;They can’t be directly referenced from VS project. Developers usually&nbsp;keep a copy of the original DLL file and refer to it in the project at development (design)&nbsp;time, which uses the assembly from GAC during run-time of the project.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P>
<P><SPAN lang=EN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN">During execution (run-time) if the assembly is found to be signed and deployed in GAC the CLR automatically picks up the assembly from the GAC instead of the DLL referenced&nbsp;during design time in VS.&nbsp;In case the developer has deleted the original DLL or don't have it for some reason, there is a way to get the DLL file from GAC. Follow the following steps to copy DLL from GAC <o:p></o:p></SPAN></P>
<P><SPAN lang=EN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN">1. Run </SPAN><SPAN lang=EN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Courier New'; mso-ansi-language: EN">regsvr32 /u C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\shfusion.dll</SPAN><SPAN lang=EN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN"> - </SPAN><SPAN lang=EN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Courier New'; mso-ansi-language: EN">shfusion.dll is an explorer extension DLL that gives a distinct look to the GAC folder.&nbsp;Unregistering&nbsp;this&nbsp;file will remove the <EM><SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Courier New'">assembly cache viewer</SPAN></EM> and the GAC folder&nbsp;will be then visible as any normal folder in explorer.&nbsp;</SPAN><SPAN lang=EN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN"><o:p></o:p></SPAN></P>
<P><SPAN lang=EN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Courier New'; mso-ansi-language: EN">2. Open&nbsp;“%windir%\assembly\GAC_MSIL</SPAN><SPAN lang=EN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN">”. <o:p></o:p></SPAN></P>
<P><SPAN lang=EN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Courier New'; mso-ansi-language: EN">3. Browse to your DLL folder into the deep to find your DLL.</SPAN><SPAN lang=EN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN"> <o:p></o:p></SPAN></P>
<P><SPAN lang=EN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Courier New'; mso-ansi-language: EN">4. Copy the DLL somewhere on your hard disk and refer it from there in your project</SPAN><SPAN lang=EN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN"> <o:p></o:p></SPAN></P>
<P><SPAN lang=EN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN">5.&nbsp;&nbsp;&nbsp; Run "</SPAN><EM><SPAN lang=EN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Courier New'; mso-ansi-language: EN">regsvr32 /i %windir%\Microsoft.NET\Framework\&lt;.NET version directory&gt; \shfusion.dll" to r</SPAN></EM><SPAN lang=EN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN">e-register the </SPAN><SPAN lang=EN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Courier New'; mso-ansi-language: EN">shfusion.dll file and regain the original distinct view of the GAC.</SPAN><SPAN lang=EN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN"><o:p></o:p></SPAN></P>
<P><SPAN lang=EN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Courier New'; mso-ansi-language: EN">&nbsp;References - </SPAN><SPAN lang=EN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN"><A href="https://msdn.microsoft.com/en-us/library/34149zk3(VS.71).aspx">https://msdn.microsoft.com/en-us/library/34149zk3(VS.71).aspx</A>&nbsp;for additional information on <EM><SPAN style="FONT-FAMILY: 'Verdana','sans-serif'">assembly cache viewer </SPAN></EM>(</SPAN><EM><SPAN lang=EN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Courier New'; mso-ansi-language: EN">shfusion.dll</SPAN></EM><SPAN lang=EN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-language: EN">)<o:p></o:p></SPAN></P>
<P mce_keep="true">&nbsp;</P>]]></content:encoded>
    </item>
    <item>
      <title>Use Key Name or Key Containers to Sign .NET Assembly</title>
      <link>https://docs.microsoft.com/archive/blogs/akukreja/use-key-name-or-key-containers-to-sign-net-assembly</link>
      <pubDate>Fri, 02 May 2008 08:36:00 GMT</pubDate>
      <dc:creator><![CDATA[Anuranjan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/akukreja/2008/05/02/use-key-name-or-key-containers-to-sign-net-assembly/</guid>
      <description><![CDATA[In many .NET projects, the assembly requires to be stongly named. Actually every project should be...]]></description>
      <content:encoded><![CDATA[<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'">In many .NET projects, the assembly requires to be stongly named. Actually every project should be stongly named in .NET development for it's numerous advantages. Though I'll not talk on the benefits of stong names here. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'">I have seen that in many stongly named projects, a SNK (Strong Name Key) file is generated and then specified in the Assembly Key File property of the assembly from Visual Studio. <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'">Specifing the SNK file directly to the assembly requires the assembly to be deployed to the production with the same SNK file or at least with a SNK file with the same name that was specified in the Assembly Key File property of the assembly while development.<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'">This certainly doesn't look to be a good practice as it forces the customer to follow pre-defined SNK file names on production boxes. This will be an issue if the customer is already having an SNK file in production and wants to use the same SNK file for all the applications and assemblies. I believe that this a very fair ask for any customer.<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'">To solve this issue, .NET development best practices defines a solution by using “Key Containers”. A key container is nothing but logical container that encapsulates the SNK file in itself.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>So when assemblies are generated they should not have any SNK file specified in Assembly Key FIle property rather the key container of the snk file should be specified in the Assembly Key Name property of the assmbly.<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'">This gives lot of liberty to the customer as he can use any snk file by just putting that into the container at deployment time.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>At the deploment time a key container with the same name as specified in the assembly needs to be created which shall hold the SNK file for the assembly(ies). This SNK file can be any SNK file that the customer wants to use. This gives the customer control over signing the assembly rather developer doing it. Also, SNK file can be easily changed for the assemblies later without impacting<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>other application using the same SNK file.<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'">How to generate and use key containers:<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'">1. Create a snk file that you want to use for signing the assemblies. Use the following command to generate key.snk file from .NET SDK command prompt.<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'">sn.exe -k c:\key.snk</SPAN><SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'">2. Create a key container and assign the snk file to it. Following command create a key container named "MyContainer" and also assigns the strong name, generated in step 1, to it.<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'">sn.exe -i key.snk MyContainer<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'">3. Specify the key container to the .NET assembly through Visual Studio. <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'">Right click on the project and select Properties to get the following screen. Specify key container, "MyContainer", in the Assembly Key Name property as shown in the attached image. <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'">4. To delete the MyContainer key container at a later stage, use the following command. <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'">sn.exe -d MyContainer<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;</SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'">References - <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'">1. MSDN link describing the sn.exe tool and all its parameters - https://msdn.microsoft.com/en-us/library/k5b5tt23(VS.80).aspx&nbsp;</SPAN><SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'"><STRONG>Note: Key Containers are deprecated in .Net 2.0. Instead, use the environment variable to point to your SNK file from multiple projects in VS2005.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>Simply update the ".csproj" file to set the "SignAssembly" property to "true" and the "AssemblyOriginatorKeyFile" to the environment variable point to the SNK file (e.g. $(MY_KEY_FILE)). <o:p></o:p></STRONG></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'">Add the following following tags into the .csproj and provide them with the environment variable name. The SNK file will be picked up as pointed by the environment variable. In case environment variable returns blank value then the project will be buit without strong name:<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'">&lt;AssemblyOriginatorKeyFile&gt;$(MY_KEY_FILE)&lt;/AssemblyOriginatorKeyFile&gt;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'">&lt;SignAssembly&gt;true&lt;/SignAssembly&gt;<o:p></o:p></SPAN></P>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/08/45/03/83/KeyContainerScreenshot.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-08-45-03-83/KeyContainerScreenshot.jpg">KeyContainerScreenshot.jpg</a></p>]]></content:encoded>
    </item>
    <item>
      <title>BizTalk Operations Guide Released</title>
      <link>https://docs.microsoft.com/archive/blogs/akukreja/biztalk-operations-guide-released</link>
      <pubDate>Sat, 22 Mar 2008 14:25:00 GMT</pubDate>
      <dc:creator><![CDATA[Anuranjan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/akukreja/2008/03/22/biztalk-operations-guide-released/</guid>
      <description><![CDATA[The 660 page guide is available on MSDN, and as a separate PDF, DOCX or CHM download. 
&nbsp;
The...]]></description>
      <content:encoded><![CDATA[<P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 115%" class=MsoNormal><SPAN style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'">The 660 page guide is available on <A href="https://msdn2.microsoft.com/en-us/library/cc296643.aspx" mce_href="https://msdn2.microsoft.com/en-us/library/cc296643.aspx">MSDN</A>, and as a separate PDF, DOCX or CHM <A href="https://www.microsoft.com/downloads/details.aspx?FamilyId=5251F103-329D-4F8D-95B5-64F99F2F6DFC&amp;displaylang=en" mce_href="https://www.microsoft.com/downloads/details.aspx?FamilyId=5251F103-329D-4F8D-95B5-64F99F2F6DFC&amp;displaylang=en"><FONT color=#0000ff>download</FONT></A>. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P>
<P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 115%" class=MsoNormal><SPAN style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'"><o:p>&nbsp;</o:p></SPAN></P>
<P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 115%" class=MsoNormal><SPAN style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'">The guide is based on real-world experience from BizTalk Rangers, PFE and other customer engagements. This guide is intended to provide guidance around maintaining and operating BizTalk Solutions in demanding production environments. This has been a long standing request from <U>customers</U>. <o:p></o:p></SPAN></P>
<P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 115%" class=MsoNormal><SPAN style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'"><o:p>&nbsp;</o:p></SPAN></P>
<P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 115%" class=MsoNormal><SPAN style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'">The target audience is Microsoft field, partner organizations, and customers who plan, deploy, and maintain BizTalk Server installations. The guide was created from collections of checklists, best practices, and presentations to guide future BizTalk Server operations IT professionals. <o:p></o:p></SPAN></P>
<P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 115%" class=MsoNormal><SPAN style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'"><o:p>&nbsp;</o:p></SPAN></P>
<P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 115%" class=MsoNormal><SPAN style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'">Key portions of this guide are new;<SPAN style="COLOR: #1f497d"> </SPAN>while other portions consists of documentation taken from BizTalk Server 2006 R2 Help, white papers, Knowledge Base articles, and other sources. It has been carefully reviewed and vetted by experts from the community of BizTalk Server IT professionals and members of the product development team, whom we gratefully acknowledge. We believe that the information presented here will help BizTalk Server users solve, and above all, avoid many of the common problems. </SPAN></P>
<P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 115%" class=MsoNormal><SPAN style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'"></SPAN>&nbsp;</P>
<P style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 115%" class=MsoNormal><SPAN style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'">The guide is intended for BizTalk Server 2006 and the R2&nbsp;version.</SPAN><SPAN style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'"><o:p>&nbsp;</o:p></SPAN></P>
<P><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">Full URL: <A href="https://msdn2.microsoft.com/en-us/library/cc296643.aspx" mce_href="https://msdn2.microsoft.com/en-us/library/cc296643.aspx">https://msdn2.microsoft.com/en-us/library/cc296643.aspx</A></SPAN></P>]]></content:encoded>
    </item>
  </channel>
</rss>