<?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>mikkole</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/mikkole/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/mikkole/feed.xml</link>
    <description>My adventures in the world of software development. Few tips &amp;amp; tricks included.</description>
    <lastBuildDate>Wed, 17 Apr 2019 04:09:28 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>How to integrate BizTalk Server 2013 with Service Bus for Windows Server using SAS for authorization</title>
      <link>https://docs.microsoft.com/archive/blogs/mikkole/how-to-integrate-biztalk-server-2013-with-service-bus-for-windows-server-using-sas-for-authorization</link>
      <pubDate>Wed, 21 Jan 2015 05:27:00 GMT</pubDate>
      <dc:creator><![CDATA[MikkoLe]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mikkole/2015/01/21/how-to-integrate-biztalk-server-2013-with-service-bus-for-windows-server-using-sas-for-authorization/</guid>
      <description><![CDATA[There is a great article by Paolo Salvatori about integrating BizTalk Server with Service Bus for...]]></description>
      <content:encoded><![CDATA[<p>There is a great article by Paolo Salvatori about integrating BizTalk Server with Service Bus for Windows Server (the on-premises version). You can find the article from here: <br /><a href="https://code.msdn.microsoft.com/windowsapps/How-to-integrate-BizTalk-07fada58">https://code.msdn.microsoft.com/windowsapps/How-to-integrate-BizTalk-07fada58</a>&nbsp;<br />However, it does not talk about how to use Shared Access Signatures (SAS) for authorization.</p>
<p>Let us assume that you have a Service Bus topic and subscription set up with SAS authorization. In addition, you have deployed an orchestration to BizTalk, which can process messages available in the subscription. Now you just need to know how to connect these dots, which basically means setting up a Receive Location.</p>
<p>The problem is that when Service Bus is configured to use SAS, SB-Messaging adapter in BizTalk Server 2013 cannot be used, as there is no way to configure the SAS key (by the way, SB-Messaging adapter in BizTalk Server 2013 R2 does support this, so first you should consider upgrading to the newest version). Therefore, WCF-Custom adapter has to be used and few custom endpoint behaviors need to implemented to enable the integration.</p>
<h4><strong>Create ListenUriEndpointBehavior</strong></h4>
<p>You have to specify the URL of the Service Bus topic as the address for WCF-Custom adapter. There is no place to set the actual URL of the subscription where the messages are read. Therefore, we need a custom endpoint behavior to set it at runtime.</p>
<p>You can use Paolo's example for implementing this endpoint behavior, check the link from the top of this post.</p>
<h4><strong>Create TokenProviderEndpointBehavior</strong></h4>
<p>We need to have another custom endpoint behavior for providing the token to access the Service Bus.</p>
<p>This is where the implementation differs from Paolo's example, as we do not use <em>WindowsTokenProvider</em> or <em>OAuthTokenProvider</em> for creating the token. Instead, we are using <em>SharedAccessSignatureTokenProvider</em> and you can find the code example for the endpoint behavior below (modified from Paolo's original example). Please note that code needs a reference to Microsoft.ServiveBus.dll, which is located at "C:\Program Files\Service Bus\(your Service Bus version number)\" by default.</p>
<pre class="scroll"><code class="csharp">using System;<br /> using System.Configuration;<br /> using System.Diagnostics;<br /> using System.ServiceModel.Channels;<br /> using System.ServiceModel.Configuration;<br /> using System.ServiceModel.Description;<br /> using System.ServiceModel.Dispatcher;<br /> using Microsoft.ServiceBus;<br /> <br /> public class TokenProviderBehaviorExtensionElement : BehaviorExtensionElement<br /> {<br /> #region Private Constants<br /> private const string KeyNamePropertyName = "sharedAccessKeyName";<br /> private const string KeyNamePropertyDescription = "Gets or sets the shared access key name.";<br /> private const string KeyPropertyName = "sharedAccessKey";<br /> private const string KeyPropertyDescription = "Gets or sets the shared access key.";<br /> private const string IsTrackingEnabledPropertyName = "isTrackingEnabled";<br /> private const string IsTrackingEnabledPropertyDescription = "Gets or sets a value indicating whether tracking is enabled.";<br /> #endregion<br /> <br /> #region BehaviorExtensionElement Members<br /> /// &lt;summary&gt;<br /> /// Creates a behavior extension based on the current configuration settings.<br /> /// &lt;/summary&gt;<br /> /// &lt;returns&gt;The behavior extension.&lt;/returns&gt;<br /> protected override object CreateBehavior()<br /> {<br /> return new TokenProviderEndpointBehavior(SharedAccessKeyName, SharedAccessKey, IsTrackingEnabled);<br /> }<br /> <br /> /// &lt;summary&gt;<br /> /// Gets the type of behavior.<br /> /// &lt;/summary&gt;<br /> public override Type BehaviorType<br /> {<br /> get<br /> {<br /> return typeof(TokenProviderEndpointBehavior);<br /> }<br /> }<br /> #endregion<br /> <br /> #region Public Properties<br /> /// &lt;summary&gt;<br /> /// Gets or sets the shared access key name.<br /> /// &lt;/summary&gt;<br /> [ConfigurationProperty(KeyNamePropertyName, IsRequired = true)]<br /> [SettingsDescription(KeyNamePropertyDescription)]<br /> public string SharedAccessKeyName<br /> {<br /> get<br /> {<br /> return (string)base[KeyNamePropertyName];<br /> }<br /> set<br /> {<br /> base[KeyNamePropertyName] = value;<br /> }<br /> }<br /> <br /> /// &lt;summary&gt;<br /> /// Gets or sets the shared access key.<br /> /// &lt;/summary&gt;<br /> [ConfigurationProperty(KeyPropertyName, IsRequired = true)]<br /> [SettingsDescription(KeyPropertyDescription)]<br /> public string SharedAccessKey<br /> {<br /> get<br /> {<br /> return (string)base[KeyPropertyName];<br /> }<br /> set<br /> {<br /> base[KeyPropertyName] = value;<br /> }<br /> }<br /> <br /> /// &lt;summary&gt;<br /> /// Gets or sets a value indicating whether tracking is enabled.<br /> /// &lt;/summary&gt;<br /> [ConfigurationProperty(IsTrackingEnabledPropertyName, DefaultValue = true, IsRequired = false)]<br /> [SettingsDescription(IsTrackingEnabledPropertyDescription)]<br /> public bool IsTrackingEnabled<br /> {<br /> get<br /> {<br /> return (bool)base[IsTrackingEnabledPropertyName];<br /> }<br /> set<br /> {<br /> base[IsTrackingEnabledPropertyName] = value;<br /> }<br /> }<br /> #endregion<br /> }<br /> <br /> public class TokenProviderEndpointBehavior : IEndpointBehavior<br /> {<br /> #region Private Constants<br /> private const string MessageFormat = "[TokenProviderEndpointBehavior] TokenProvider = {0}, key = {1}";<br /> #endregion<br /> <br /> #region Private Fields<br /> private readonly string sharedAccessKeyName;<br /> private readonly string sharedAccessKey;<br /> private readonly bool isTrackingEnabled;<br /> #endregion<br /> <br /> #region Public Constructors<br /> /// &lt;summary&gt;<br /> /// Initializes a new instance of the TokenProviderEndpointBehavior class.<br /> /// &lt;/summary&gt;<br /> /// &lt;param name="sharedAccessKeyName"&gt;The shared access key name.&lt;/param&gt;<br /> /// &lt;param name="sharedAccessKey"&gt;The shared access key.&lt;/param&gt;<br /> /// &lt;param name="isTrackingEnabled"&gt;A boolean value indicating whether tracking is enabled.&lt;/param&gt;<br /> public TokenProviderEndpointBehavior(string sharedAccessKeyName,<br /> string sharedAccessKey,<br /> bool isTrackingEnabled)<br /> {<br /> this.sharedAccessKeyName = sharedAccessKeyName;<br /> this.sharedAccessKey = sharedAccessKey;<br /> this.isTrackingEnabled = isTrackingEnabled;<br /> }<br /> #endregion<br /> <br /> #region IEndpointBehavior Members<br /> /// &lt;summary&gt;<br /> /// Implement to pass data at runtime to bindings to support custom behavior.<br /> /// &lt;/summary&gt;<br /> /// &lt;param name="endpoint"&gt;The endpoint to modify.&lt;/param&gt;<br /> /// &lt;param name="bindingParameters"&gt;The objects that binding elements require to support the behavior.&lt;/param&gt;<br /> void IEndpointBehavior.AddBindingParameters(ServiceEndpoint endpoint, BindingParameterCollection bindingParameters)<br /> {<br /> var tokenProvider = TokenProvider.CreateSharedAccessSignatureTokenProvider(sharedAccessKeyName, sharedAccessKey);<br /> bindingParameters.Add(new TransportClientEndpointBehavior<br /> {<br /> TokenProvider = tokenProvider<br /> });<br /> Trace.WriteLineIf(isTrackingEnabled, string.Format(MessageFormat, tokenProvider.GetType(), sharedAccessKeyName));<br /> }<br /> <br /> void IEndpointBehavior.ApplyClientBehavior(ServiceEndpoint endpoint, ClientRuntime clientRuntime)<br /> {<br /> }<br /> <br /> void IEndpointBehavior.ApplyDispatchBehavior(ServiceEndpoint endpoint, EndpointDispatcher endpointDispatcher)<br /> {<br /> }<br /> <br /> void IEndpointBehavior.Validate(ServiceEndpoint endpoint)<br /> {<br /> }<br /> #endregion<br /> }</code></pre>
<h4><strong>Create additional endpoint behaviors</strong></h4>
<p>Paolo also introduces <em>SessionChannelEndpoint</em> behavior for receiving messages from sessionful queue or subscription and <em>ServiceBusMessageInspector</em> for converting Service Bus message properties into BizTalk context properties. Consider whether they are useful for you, but they are not necessary in order to get the basic integration working.</p>
<h4><strong>Build and deploy endpoint behaviors</strong></h4>
<p>After you have created all custom endpoint behaviors, preferably to a separate class library project, you can go ahead, build the project, and deploy the DLL into GAC (for example by using the GACUTIL tool).</p>
<p>Also, make sure that the referenced Service Bus assembly (Microsoft.ServiceBus.dll) can be accessed from your assemblies at runtime. Simplest way to ensure that is by inserting it also into GAC.</p>
<h4><strong>Present endpoint behaviors to WCF-Custom adapter</strong></h4>
<p>Create a configuration file for WCF-Custom adapter:</p>
<ul>
<li>Copy content from the example below and save it to a temporary location with .config -extension</li>
<li>Replace assembly type attribute contents with correct values of your assembly built in the previous step, only 'bizTalkListenUri' and 'bizTalkSecurity' rows</li>
<li>Verify that version number of Microsoft.ServiceBus assembly is correct in all other rows (Service Bus 1.1 works with the DLL version 2.1.0.0)</li>
</ul>
<pre class="scroll"><code class="html">&lt;?xml version="1.0" encoding="utf-8"?&gt;<br /> &lt;configuration&gt;<br /> &lt;system.serviceModel&gt;<br /> &lt;extensions&gt;<br /> &lt;behaviorExtensions&gt;<br /> &lt;add name="connectionStatusBehavior" type="Microsoft.ServiceBus.Configuration.ConnectionStatusElement, Microsoft.ServiceBus, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /&gt;<br /> &lt;add name="transportClientEndpointBehavior" type="Microsoft.ServiceBus.Configuration.TransportClientEndpointBehaviorElement, Microsoft.ServiceBus, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /&gt;<br /> &lt;add name="serviceRegistrySettings" type="Microsoft.ServiceBus.Configuration.ServiceRegistrySettingsElement, Microsoft.ServiceBus, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /&gt;<br /> &lt;add name="bizTalkListenUri" type="YourAssembly.ListenUriBehaviorExtensionElement, YourAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=224520fd53ada681" /&gt;<br /> &lt;add name="bizTalkSecurity" type="YourAssembly.TokenProviderBehaviorExtensionElement, YourAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=224520fd53ada681" /&gt;<br /> &lt;/behaviorExtensions&gt;<br /> &lt;bindingElementExtensions&gt;<br /> &lt;add name="netMessagingTransport" type="Microsoft.ServiceBus.Messaging.Configuration.NetMessagingTransportExtensionElement, Microsoft.ServiceBus, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /&gt;<br /> &lt;add name="tcpRelayTransport" type="Microsoft.ServiceBus.Configuration.TcpRelayTransportElement, Microsoft.ServiceBus, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /&gt;<br /> &lt;add name="httpRelayTransport" type="Microsoft.ServiceBus.Configuration.HttpRelayTransportElement, Microsoft.ServiceBus, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /&gt;<br /> &lt;add name="httpsRelayTransport" type="Microsoft.ServiceBus.Configuration.HttpsRelayTransportElement, Microsoft.ServiceBus, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /&gt;<br /> &lt;add name="onewayRelayTransport" type="Microsoft.ServiceBus.Configuration.RelayedOnewayTransportElement, Microsoft.ServiceBus, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /&gt;<br /> &lt;/bindingElementExtensions&gt;<br /> &lt;bindingExtensions&gt;<br /> &lt;add name="basicHttpRelayBinding" type="Microsoft.ServiceBus.Configuration.BasicHttpRelayBindingCollectionElement, Microsoft.ServiceBus, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /&gt;<br /> &lt;add name="webHttpRelayBinding" type="Microsoft.ServiceBus.Configuration.WebHttpRelayBindingCollectionElement, Microsoft.ServiceBus, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /&gt;<br /> &lt;add name="ws2007HttpRelayBinding" type="Microsoft.ServiceBus.Configuration.WS2007HttpRelayBindingCollectionElement, Microsoft.ServiceBus, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /&gt;<br /> &lt;add name="netTcpRelayBinding" type="Microsoft.ServiceBus.Configuration.NetTcpRelayBindingCollectionElement, Microsoft.ServiceBus, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /&gt;<br /> &lt;add name="netOnewayRelayBinding" type="Microsoft.ServiceBus.Configuration.NetOnewayRelayBindingCollectionElement, Microsoft.ServiceBus, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /&gt;<br /> &lt;add name="netEventRelayBinding" type="Microsoft.ServiceBus.Configuration.NetEventRelayBindingCollectionElement, Microsoft.ServiceBus, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /&gt;<br /> &lt;add name="netMessagingBinding" type="Microsoft.ServiceBus.Messaging.Configuration.NetMessagingBindingCollectionElement, Microsoft.ServiceBus, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /&gt;<br /> &lt;/bindingExtensions&gt;<br /> &lt;/extensions&gt;<br /> &lt;/system.serviceModel&gt;<br /> &lt;/configuration&gt;</code></pre>
<p>Import the configuration file:</p>
<ul>
<li>Open 'BizTalk Administration Console'</li>
<li>Expand the navigation tree to 'BizTalk Administration' &gt; 'BizTalk Group' &gt; 'Platform Settings' &gt; 'Adapters'</li>
<li>Select 'WCF-Custom' from the navigation tree</li>
<li>Double-click receive handler in the right-hand pane and click Properties-button</li>
<li>Click Import-button and select the configuration file from your hard drive</li>
</ul>
<h4><strong>Create and configure the receive location</strong></h4>
<p>Create new Receive Location and specify following properties:</p>
<ul>
<li>Select 'WCF-Custom' adapter</li>
<li>Select 'XMLReceive' pipeline</li>
<li>Click Configure-button</li>
</ul>
<p>In the General-tab:</p>
<ul>
<li>Specify the address of the topic, for example "sb://yourserver.domain.com/ServiceBusDefaultNameSpace/your_topic_name"</li>
</ul>
<p>In the Binding-tab:</p>
<ul>
<li>Select 'netMessagingBinding' as binding type</li>
</ul>
<p>In he Behavior-tab:</p>
<ul>
<li>Right-click 'EndpointBehavior' in left-hand pane and select 'Add extension'</li>
<li>Select 'bizTalkSecurity' from the list and click OK</li>
<li>Enter shared access key and key name in right-hand pane</li>
<li>Right-click 'EndpointBehavior' in left-hand pane and select 'Add extension'</li>
<li>Select 'bizTalkListenUri' from the list and click OK</li>
<li>Enter full URL to your subscription in right-hand pane, for example: "sb://yourserver.domain.com/ServiceBusDefaultNameSpace/your_topic_name/subscriptions/your_subscription_name"</li>
</ul>
<p>That should do it and by starting the receive location, messages from the Service Bus should start appearing in BizTalk.</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Queries failing because of the ARITHABORT setting</title>
      <link>https://docs.microsoft.com/archive/blogs/mikkole/queries-failing-because-of-the-arithabort-setting</link>
      <pubDate>Thu, 02 Jan 2014 23:24:00 GMT</pubDate>
      <dc:creator><![CDATA[MikkoLe]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mikkole/2014/01/02/queries-failing-because-of-the-arithabort-setting/</guid>
      <description><![CDATA[So here is the scenario: you have a stored procedure which inserts new rows to a database table and...]]></description>
      <content:encoded><![CDATA[<p style="margin: 0in; font-family: Calibri; font-size: 11pt;" lang="en-US">So here is the scenario: you have a stored procedure which inserts new rows to a database table and you want to call it from your .NET code (in my case the application was a BizTalk orchestration using WCF-SQL adapters). You can successfully execute the procedure in SQL Server Management Studio, but when your code calls it, you get an error like this:</p>
<pre class="scroll"><code class="mysql">INSERT failed because the following SET options have incorrect settings: 'ARITHABORT'</code></pre>
<p style="margin: 0in; color: #1f497d; font-family: Calibri; font-size: 11pt;" lang="en-US">&nbsp;</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;" lang="en-US">The exception is pretty clear, you have ARITHABORT set to 'OFF' but you are trying to insert a row into a table that is referenced in an indexed view, or performing some other operation that requires the ARITHABORT setting to be 'ON'. Reason why the stored procedure works in SSMS is simply because it uses 'ON' as a default setting for ARITHABORT while OLE DB connection provider doesn't. You can find more information about the ARITHABORT setting from here: <a href="https://technet.microsoft.com/en-us/library/ms190306.aspx">https://technet.microsoft.com/en-us/library/ms190306.aspx</a></p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;" lang="en-US">&nbsp;</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;" lang="en-US">You can also use the SQL Server Profiler to find out what statements get executed before your stored procedure is actually called. In WCF-SQL adapter's case the ARITHABORT is explicitly set to 'OFF':</p>
<pre class="scroll"><code class="mysql">-- network protocol: TCP/IP<br /> set quoted_identifier on<br /> set arithabort off<br /> set numeric_roundabort off<br /> set ansi_warnings on<br /> set ansi_padding on<br /> set ansi_nulls on<br /> set concat_null_yields_null on<br /> set cursor_close_on_commit off<br /> set implicit_transactions off<br /> set language us_english<br /> set dateformat mdy<br /> set datefirst 7<br /> set transaction isolation level serializable</code></pre>
<p style="margin: 0in; color: #1f497d; font-family: Calibri; font-size: 11pt;">&nbsp;</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;" lang="en-US">Resolving the error is pretty easy, you add the following line after the BEGIN clause in your stored procedure:</p>
<pre class="scroll"><code class="mysql">SET ARITHABORT ON; </code></pre>
<p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt;" lang="en-US">&nbsp;</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;" lang="en-US">You can also modify the setting on the database level by right-clicking your database in SSMS and selecting Properties &gt; Options. In the list under the Miscellaneous-section you find the 'Arithmetic Abort Enabled'-setting:</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;" lang="en-US">&nbsp;</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;" lang="en-US"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/70/5126.arithabort.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-70/5126.arithabort.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/70/5126.arithabort.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-70/5126.arithabort.png" alt="" border="0" /></a></p>]]></content:encoded>
    </item>
    <item>
      <title>Access denied when deploying BizTalk solutions from Visual Studio</title>
      <link>https://docs.microsoft.com/archive/blogs/mikkole/access-denied-when-deploying-biztalk-solutions-from-visual-studio</link>
      <pubDate>Fri, 04 Oct 2013 01:37:00 GMT</pubDate>
      <dc:creator><![CDATA[MikkoLe]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mikkole/2013/10/04/access-denied-when-deploying-biztalk-solutions-from-visual-studio/</guid>
      <description><![CDATA[There is a possibility to get various kind of access denied errors when deploying BizTalk solutions...]]></description>
      <content:encoded><![CDATA[<p>There is a possibility to get various kind of access denied errors when deploying BizTalk solutions directly from Visual Studio. Here is my list of things to check if you are struggling to get past the errors. <br />By the way, if you are deploying your first BizTalk solution, you might also want to check the walkthrough of a basic deployment from MSDN (<a href="https://msdn.microsoft.com/en-us/library/aa559168(v=bts.80).aspx">https://msdn.microsoft.com/en-us/library/aa559168(v=bts.80).aspx</a>).<br />&nbsp;<br />- Make sure you have administrator rights on the server and you run Visual Studio as administrator. This is required because BizTalk assemblies are deployed into GAC (<a href="https://msdn.microsoft.com/en-us/library/yf1d93sz.aspx">https://msdn.microsoft.com/en-us/library/yf1d93sz.aspx</a>).</p>
<p>- Make sure your user account is member of BizTalk Server Administrators group and also member of SSO Administrators or SSO Affiliate Administrators group. These memberships should grant you required access to the database.</p>
<p>- Verify that your deployment configuration is correct by right-clicking the project in Visual Studio and selecting "Properties". Check that values for "Application Name", "Configuration Database" and "Server" are what you expect them to be. Note that the value of the "Server" should be the name of the SQL Server instance that hosts the&nbsp;Configuration Database.</p>
<p>- Make sure you have AssemblyInfo.cs file included in your project and it contains this line:</p>
<pre class="scroll"><code class="csharp">[assembly: Microsoft.XLANGs.BaseTypes.BizTalkAssembly(typeof(Microsoft.BizTalk.XLANGs.BTXEngine.BTXService))]</code></pre>
<p>- When everything else is checked, you might also want to check if some other process has a lock on the file(s) you are trying to replace. This can be done for example with Process Monitor (<a href="https://technet.microsoft.com/en-us/sysinternals/bb896653.aspx">https://technet.microsoft.com/en-us/sysinternals/bb896653.aspx</a>) by using "Find" -&gt; "Find Handle or DLL" -&gt; Enter path and filename of the DLL being updated. At least search indexing services or virus scanners might acquire these kind of locks which prevent you from replacing the file. Stopping these services while deploying should help.</p>]]></content:encoded>
    </item>
    <item>
      <title>Unit testing JavaScript in Visual Studio 2012</title>
      <link>https://docs.microsoft.com/archive/blogs/mikkole/unit-testing-javascript-in-visual-studio-2012</link>
      <pubDate>Mon, 19 Aug 2013 00:00:00 GMT</pubDate>
      <dc:creator><![CDATA[MikkoLe]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mikkole/2013/08/19/unit-testing-javascript-in-visual-studio-2012/</guid>
      <description><![CDATA[As most of the user interface functionality is nowadays being written in JavaScript, it is very...]]></description>
      <content:encoded><![CDATA[<p lang="en-US">As most of the user interface functionality is nowadays being written in JavaScript, it is very important to know how to unit test your JavaScript code. It's actually pretty easy to implement unit tests for JavaScript in Visual Studio 2012, and this article describes how it's done. However, please note that the testing frameworks and Visual Studio extensions presented in this article are not developed by Microsoft and supported only by individuals or teams who have built them.</p>
<p lang="en-US">Let's say you have created a new Web Application project, added a new JavaScript file called code.js and written a simple script that you want to test. Contents of that file look like this:</p>
<pre class="scroll"><code class="js">var myMathLib = {<br /> sum: function (a, b) {<br /> return a + b;<br /> }<br />}</code></pre>
<h3 lang="en-US">Writing the tests</h3>
<p lang="en-US">You need to start by selecting which framework you will use to test your scripts. Couple of good alternatives are QUnit and Jasmine (which is actually more of a behavior-driven development framework). These frameworks also have good extensions for Visual Studio which enable you to have great integrated development experience. Below you can find simple examples written for these frameworks, please note that they also support pretty advanced testing scenarios and you can find more info about the features from the links below.</p>
<p lang="en-US"><strong>QUnit</strong> (<a href="https://qunitjs.com/">https://qunitjs.com/</a>)</p>
<p lang="en-US">QUnit is one of the most popular testing frameworks and it's being used by jQuery and other popular JavaScript libraries. You can implement your test script to a separate file or folder, for example code-tests.js and the actual code for the test would look like this:</p>
<pre class="scroll"><code class="js">test("sum of 1 and 2", function () {<br /> var res = myMathLib.sum(1, 2);<br /> equal(res, 3, "is 3");<br />});<br /> </code></pre>
<p lang="en-US"><strong>Jasmine</strong> (<a href="https://pivotal.github.io/jasmine/">https://pivotal.github.io/jasmine/</a>)</p>
<p lang="en-US">In Jasmine, tests are written in BDD (<a href="https://en.wikipedia.org/wiki/Behavior-driven_development">https://en.wikipedia.org/wiki/Behavior-driven_development</a>) style. With Jasmine you also write tests to a separate file and the same test we wrote for QUnit would look like this:</p>
<pre class="scroll"><code class="js">describe("using myMathLib", function () {<br /> it("sum of 1 and 2 is 3", function () {<br /> expect(myMathLib.sum(1, 2)).toBe(3);<br /> });<br />}); </code></pre>
<h3 lang="en-US">Running the tests</h3>
<p lang="en-US">Now that the tests are written, you need to figure out how to run them. As JavaScript is executed by the browser, JavaScript testing frameworks are usually using a harness html that you open in a browser to run the tests. For running tests in Visual Studio, there is a great extension called Chutzpah (<a href="https://chutzpah.codeplex.com/">https://chutzpah.codeplex.com/</a>) which handles all the fuss for you in the background. What's great about Chutzpah is that it also has built in support for testing code written in TypeScript (<a href="https://www.typescriptlang.org/">https://www.typescriptlang.org/</a>) which you definitely need to check out if you are a C# developer and you don't already know what TypeScript is!</p>
<p lang="en-US">With Chutzpah installed, you don't need to have the harness file at all. It uses PhantomJS (<a href="https://phantomjs.org/">https://phantomjs.org/</a>) headless browser to run the tests in the background.&nbsp; One thing that you need to notice though is that all test files need to have the reference to the actual script file that contains the code to be tested. This can be achieved by adding&nbsp; this line to the top of the test script file (replace path attribute with relative path to your code file):</p>
<pre class="scroll"><code class="js">/// &lt;reference path="code.js" /&gt;<br /> </code></pre>
<p lang="en-US">Another benefit from using Chutzpah is that you don't need to reference test framework JavaScript libraries manually. Chutzpah has built in support for both QUnit and Jasmine test frameworks.</p>
<p lang="en-US">Actually Chutzpah is not just one extension, but has two extensions which you can choose from, or even install both if you want:</p>
<p lang="en-US"><strong>Context Menu Extension</strong> (<a href="https://visualstudiogallery.msdn.microsoft.com/71a4e9bd-f660-448f-bd92-f5a65d39b7f0">https://visualstudiogallery.msdn.microsoft.com/71a4e9bd-f660-448f-bd92-f5a65d39b7f0</a>)</p>
<p lang="en-US">This extension enables you to run tests directly from Visual Studio context menu. After the extensions is installed you are good to go, right-click JavaScript test file and you should see the new menu items:<br /><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/70/6332.jsunittest-contextmenu.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-70/6332.jsunittest_2D00_contextmenu.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/70/6332.jsunittest-contextmenu.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/200x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-70/6332.jsunittest_2D00_contextmenu.png" alt="" border="0" /></a></p>
<p lang="en-US">Selecting "Run JS Tests" will give output of the tests run to Output-window:<br /><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/70/5633.jsunittest-output.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-70/5633.jsunittest_2D00_output.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/70/5633.jsunittest-output.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/500x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-70/5633.jsunittest_2D00_output.png" alt="" border="0" /></a></p>
<p lang="en-US">As you noticed, you can also "Open in browser" to get more detailed report on the test run if the suppressed results of the Output window don't suit your needs.&nbsp;</p>
<p lang="en-US"><strong>Unit Test Explorer Test Adapter</strong> (<a href="https://visualstudiogallery.msdn.microsoft.com/f8741f04-bae4-4900-81c7-7c9bfb9ed1fe">https://visualstudiogallery.msdn.microsoft.com/f8741f04-bae4-4900-81c7-7c9bfb9ed1fe</a>)</p>
<p lang="en-US">This extension adds support for plugging in to Visual Studio's built in Unit Test Explorer. After this extension is installed, JavaScript unit tests will show up in Unit Test Explorer same way as any unit tests written in C# would be shown:<br /><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/70/7360.jsunittest-explorer.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-70/7360.jsunittest_2D00_explorer.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/70/7360.jsunittest-explorer.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/393x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-70/7360.jsunittest_2D00_explorer.png" alt="" border="0" /></a></p>
<p lang="en-US">Also it is good to note that if you happen to own a ReSharper license, you are good to go without installing Chutzpah extensions as it also has support for tests written in QUnit and Jasmine built-in. More info about JavaScript unit testing in ReSharper can be found here: <a href="https://www.jetbrains.com/resharper/webhelp/ReSharper_by_Language__JavaScript__Unit_Testing.html">https://www.jetbrains.com/resharper/webhelp/ReSharper_by_Language__JavaScript__Unit_Testing.html</a></p>
<h3 lang="en-US">Integrating unit tests with team builds</h3>
<p lang="en-US">When working in projects with multiple developers, it's a good practice to run unit tests with team builds.</p>
<p lang="en-US">Chutzpah works great with Team Foundation Server and there is a good article in Visual Studio ALM blog which has detailed instructions how to run tests in your TFS builds: <a href="https://blogs.msdn.com/b/visualstudioalm/archive/2012/07/09/javascript-unit-tests-on-team-foundation-service-with-chutzpah.aspx">https://blogs.msdn.com/b/visualstudioalm/archive/2012/07/09/javascript-unit-tests-on-team-foundation-service-with-chutzpah.aspx</a></p>
<p lang="en-US">Chutzpah also includes a command line runner, so you can basically run the tests from any system (or custom build process) by calling the executable. Running the tests from command line is pretty straight-forward:</p>
<p lang="en-US"><em>Chutzpah.console.exe (path-to-test-file) [options]</em></p>
<p lang="en-US">All options of command line runner can be found from here: <a href="https://chutzpah.codeplex.com/wikipage?title=Command%20Line%20Options&amp;referringTitle=Documentation">https://chutzpah.codeplex.com/wikipage?title=Command%20Line%20Options&amp;referringTitle=Documentation</a>&nbsp;</p>
<h3 lang="en-US">Summary</h3>
<p lang="en-US">So that's about it, with Visual Studio 2012 you can use the most popular JavaScript unit test frameworks and have a great development experience by using a Visual Studio extension. Hopefully with these tools you can increase quality of you JavaScript code and reduce time spent for debugging the code in the browser.</p>
<p lang="en-US">&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Evaluating BizTalk on Azure IaaS</title>
      <link>https://docs.microsoft.com/archive/blogs/mikkole/evaluating-biztalk-on-azure-iaas</link>
      <pubDate>Sat, 20 Apr 2013 23:23:00 GMT</pubDate>
      <dc:creator><![CDATA[MikkoLe]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mikkole/2013/04/20/evaluating-biztalk-on-azure-iaas/</guid>
      <description><![CDATA[General availability of Infrastructure as a Service (IaaS) support for Windows Azure was released...]]></description>
      <content:encoded><![CDATA[<p>General availability of Infrastructure as a Service (IaaS) support for Windows Azure was released this week. This means that you are able to run production applications on Virtual Machines hosted in Azure, backed by an enterprise SLA and supported by Microsoft Support. More info about the release can be found from Scott Guthrie's blog: <a href="https://weblogs.asp.net/scottgu/archive/2013/04/16/windows-azure-general-availability-of-infrastructure-as-a-service-iaas.aspx">https://weblogs.asp.net/scottgu/archive/2013/04/16/windows-azure-general-availability-of-infrastructure-as-a-service-iaas.aspx</a><br />&nbsp;<br />If you have BizTalk implementations currently running on-premise, you might want to evaluate how running them on Azure IaaS would help with your hosting challenges or cut operational costs. Starting up a single-server evaluation environment is super easy, and this is how it's done:<br />&nbsp;<br />First, <strong>go to <a href="https://manage.windowsazure.com/">https://manage.windowsazure.com/</a></strong> and sign in with your Microsoft Account that linked to your Azure subscription<br />- If you don't have a subscription you can sign up for a free trial at: <a href="https://www.windowsazure.com/en-us/pricing/free-trial/">https://www.windowsazure.com/en-us/pricing/free-trial/</a><br />- Also, if you are a MSDN subscriber, you get limited free access to Azure, read details about the benefits here: <a href="https://www.windowsazure.com/en-us/pricing/member-offers/msdn-benefits/">https://www.windowsazure.com/en-us/pricing/member-offers/msdn-benefits/</a></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/70/7128.AzureIaaS-New.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-70/7128.AzureIaaS_2D00_New.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/70/7128.AzureIaaS-New.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-70/7128.AzureIaaS_2D00_New.jpg" alt="" border="0" /></a></p>
<p><strong>Click on "+ NEW" button</strong> located at the bottom left corner and select Compute&nbsp;-&gt; Virtual Machine -&gt; From Gallery</p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/70/3808.AzureIaaS-Step1.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-70/3808.AzureIaaS_2D00_Step1.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/70/3808.AzureIaaS-Step1.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-70/3808.AzureIaaS_2D00_Step1.jpg" alt="" border="0" /></a></p>
<p><strong>Step1 (of the creation process):</strong> Select the virtual machine image to be created, which in BizTalk's case means that you need to select the edition of the product<br />- Evaluation edition contains evaluation versions of both BizTalk 2013 and SQL Server 2012<br />- Standard and Enterprise editions contains BizTalk 2013 and are meant for scaled out (production) environments where SQL is installed in a separate virtual machine<br />- Important: Refer to Azure pricing page to learn the rates of different editions: <a href="https://www.windowsazure.com/en-us/pricing/details/virtual-machines/">https://www.windowsazure.com/en-us/pricing/details/virtual-machines/</a><br />- Also note that Visual Studio is not part of these images at this time</p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/70/7534.AzureIaaS-Step2.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-70/7534.AzureIaaS_2D00_Step2.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/70/7534.AzureIaaS-Step2.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-70/7534.AzureIaaS_2D00_Step2.jpg" alt="" border="0" /></a></p>
<p><strong>Step2:</strong> Enter virtual machine configuration<br />- Machine name for your virtual machine <br />- User name and password of the local user which will be created on the virtual machine automatically<br />- Select size of your machine<br />- Important: Refer to Azure pricing page to learn the rates of different sizes: <a href="https://www.windowsazure.com/en-us/pricing/details/virtual-machines/">https://www.windowsazure.com/en-us/pricing/details/virtual-machines/</a></p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/70/8468.AzureIaaS-Step3.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-70/8468.AzureIaaS_2D00_Step3.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/70/8468.AzureIaaS-Step3.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-70/8468.AzureIaaS_2D00_Step3.jpg" alt="" border="0" /></a></p>
<p><strong>Step3:</strong> Select virtual machine mode<br />- Enter DNS name of the virtual machine, this is the address which you will use to access the virtual machine<br />- Virtual machine needs an storage account which is used to store the virtual machine image (VHD files)<br />- If you don't have an existing storage account you want to use, you can have the creation process to generate one for you <br />- It's also good to note that using the storage will generate costs even if you shut down the virtual machine<br />- Select region where you want the virtual machine to run (selecting nearest datacenter minimizes possible network latencies)</p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/70/6765.AzureIaaS-Step4.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-70/6765.AzureIaaS_2D00_Step4.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/70/6765.AzureIaaS-Step4.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-70/6765.AzureIaaS_2D00_Step4.jpg" alt="" border="0" /></a></p>
<p><strong>Step4:</strong> Select additional options<br />- You can select an availability set to ensure availability of your application in case of hardware failures<br />- In most evaluation cases you can leave this to "(None)" <br />- More info about availability sets can be found from here: <a href="https://www.windowsazure.com/en-us/manage/windows/common-tasks/manage-vm-availability/">https://www.windowsazure.com/en-us/manage/windows/common-tasks/manage-vm-availability/</a></p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/70/3582.AzureIaaS-StatusBar.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-70/3582.AzureIaaS_2D00_StatusBar.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/70/3582.AzureIaaS-StatusBar.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-70/3582.AzureIaaS_2D00_StatusBar.jpg" alt="" border="0" /></a></p>
<p>After completing the process, <strong>Azure starts provisioning of your virtual machine</strong>.<br />- You can see the status of the process by clicking the green bars in the right hand side of the bottom bar<br />- When the virtual machine is ready, you can start a Remote Desktop connection to the virtual machine by clicking the Connect icon in the bottom bar<br />- Use the credentials you provided in Step 2</p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/70/4370.AzureIaaS-Endpoints.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-70/4370.AzureIaaS_2D00_Endpoints.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/70/4370.AzureIaaS-Endpoints.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-70/4370.AzureIaaS_2D00_Endpoints.jpg" alt="" border="0" /></a></p>
<p>You can also <strong>connect to your virtual machine</strong> without having to go through the Azure management portal.<br />- Remote Desktop endpoint is automatically created for you, you can find more info about endpoints here: <a href="https://www.windowsazure.com/en-us/manage/windows/how-to-guides/setup-endpoints/">https://www.windowsazure.com/en-us/manage/windows/how-to-guides/setup-endpoints/</a><br />- Go to the properties of your virtual machine and check the Remote Desktop port number from endpoint list<br />- Start a new remote desktop connection (Win + R -&gt; mstsc)<br />- Enter the address you provided in Step 3 and public port defined in endpoint list<br />- Example: yourbiztalkserver.cloudapp.net:50144<br />- Use the credentials you provided in Step 2</p>
<p>&nbsp;</p>
<p><strong>When you have the Remote Desktop connection up and running..</strong><br />- BizTalk tools are not pinned on taskbar or start menu, but you will find them in the Apps list (Win + Q)<br />- BizTalk is not configured by default, so you have to start by running the BizTalk Configuration tool<br />- Configuration is done by the same tool that you use on-premise, so you can refer to same documentation: <a href="https://msdn.microsoft.com/en-us/library/aa561189(v=bts.80).aspx">https://msdn.microsoft.com/en-us/library/aa561189(v=bts.80).aspx</a><br /><span style="background-color: #ffff00;">(UPDATE: MSDN has also Azure specific documentation about BizTalk configuration: <a href="https://msdn.microsoft.com/en-us/library/jj248689%28v=bts.80%29.aspx"><span style="background-color: #ffff00;">https://msdn.microsoft.com/en-us/library/jj248689%28v=bts.80%29.aspx</span></a>)</span><br />- When you have BizTalk configured you can start deploying your applications the same way you would do it on-premise (for example by importing MSI packages)</p>]]></content:encoded>
    </item>
    <item>
      <title>String equality comparison in C#</title>
      <link>https://docs.microsoft.com/archive/blogs/mikkole/string-equality-comparison-in-c</link>
      <pubDate>Mon, 28 Jan 2013 04:52:00 GMT</pubDate>
      <dc:creator><![CDATA[MikkoLe]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mikkole/2013/01/28/string-equality-comparison-in-c/</guid>
      <description><![CDATA[Options for string equality comparison
Although the subject is pretty trivial, I thought I'd share...]]></description>
      <content:encoded><![CDATA[<h3>Options for string equality comparison</h3>
<p>Although the subject is pretty trivial, I thought I'd share my two cents on the topic because lately I've seen lots of different implementations, even within a single project. Some of them are:</p>
<p><strong>foo == "bar"</strong>&nbsp; <br /><span style="color: #ff0000;">You can't specify string comparison rules</span> <br /><span style="color: #008000;">(in my opinion, this does have the best readability)</span></p>
<p><strong>foo.Equals("bar")</strong>&nbsp; <br /><span style="color: #ff0000;">If foo is null, throws a NullReferenceException</span></p>
<p><strong>String.Compare(foo, "bar") == 0</strong>&nbsp; <br /><span style="color: #ff0000;">MSDN doesn't recommend this for checking equality</span></p>
<p><strong>String.Equals(foo, "bar")</strong>&nbsp; <br /><span style="color: #008000;">The most performant way, doesn't throw NullReferenceException and you can also specify comparison rules</span></p>
<p>&nbsp;</p>
<h3>StringComparison parameter&nbsp;</h3>
<p>There is a recommendation on MSDN to use overloads that explicitly specify the string comparison rules, so you should always call the static method with a StringComparison parameter:</p>
<pre class="scroll"><code class="csharp">String.Equals(foo, "bar", StringComparison.OrdinalIgnoreCase)<br /> </code></pre>
<p>Although string comparison logic rarely has a significant effect on the overall performance, you might consider using OrdinalIgnoreCase for case-insensitive comparison as it is faster than Ordinal (which is the default) and InvariantCultureIgnoreCase.</p>
<p>&nbsp;</p>
<h3>Extension method helper</h3>
<p>You could also write an extension method to make your life a bit easier:</p>
<pre class="scroll"><code class="csharp">public static bool Eq(this string strA, string strB)<br /> {<br /> &nbsp; return String.Equals(strA, strB, StringComparison.OrdinalIgnoreCase);<br /> }<br /> </code></pre>
<p>And call the extension method like this:</p>
<pre class="scroll"><code class="cplusplus">if (foo.Eq("bar"))<br /> {<br /> ...<br /> }<br /> </code></pre>
<p>&nbsp;</p>
<h3>Further reading</h3>
<p>Best Practices for Using Strings in the .NET Framework<br /><a href="https://msdn.microsoft.com/en-us/library/dd465121.aspx">https://msdn.microsoft.com/en-us/library/dd465121.aspx</a></p>
<p>Comparing Strings<br /><a href="https://msdn.microsoft.com/en-us/library/fbh501kz.aspx">https://msdn.microsoft.com/en-us/library/fbh501kz.aspx</a></p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
  </channel>
</rss>