<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Bhavesh Shastri's TechNet blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/bshastri/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/bshastri/feed.xml</link>
    <description />
    <lastBuildDate>Wed, 17 Apr 2019 03:28:45 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Hybrid IT: Microsoft Dynamics CRM Disaster Recovery (DR) in Azure IaaS – POC</title>
      <link>https://docs.microsoft.com/archive/blogs/bshastri/hybrid-it-microsoft-dynamics-crm-disaster-recovery-dr-in-azure-iaas-poc</link>
      <pubDate>Tue, 20 Oct 2015 19:21:46 GMT</pubDate>
      <dc:creator><![CDATA[Bhavesh Shastri]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/bshastri/2015/10/20/hybrid-it-microsoft-dynamics-crm-disaster-recovery-dr-in-azure-iaas-poc/</guid>
      <description><![CDATA[Microsoft Dynamics CRM announced support for CRM deployment on Azure IaaS Virtual Machines. Here is...]]></description>
      <content:encoded><![CDATA[<p style="text-align:justify;"><span style="font-family:Calibri;font-size:medium;">Microsoft Dynamics CRM announced support for CRM deployment on Azure IaaS Virtual Machines. Here is the post on Microsoft Dynamics blog </span><a href="https://community.dynamics.com/b/msftdynamicsblog/archive/2015/07/15/cloud-certification-now-available-for-microsoft-dynamics-crm"><span style="color:#0563c1;font-family:Calibri;font-size:medium;">Cloud Certification now available for Microsoft Dynamics CRM</span></a><span style="font-family:Calibri;"><span style="font-size:medium;"><span style="text-decoration:underline;"><span style="color:#0563c1;">. </span></span>Reading this, I got the idea of spanning an On-Premise CRM deployment to Azure IaaS VMs. </span></span></p>
<p style="text-align:justify;"><span style="font-family:Calibri;font-size:medium;">What sounds interesting to me is preparing a CRM DR (Disaster Recovery) environment in Azure IaaS. An extension of CRM On-Premise deployment by adding replica domain controller(s) (DC), additional CRM Server(s) in same deployment and SQL AlwaysOn Availability Group (AG) replica node. After a few days spent playing with lab environment and reusing some of the learnings from my previous&nbsp; POC attempt </span><a href="/b/bshastri/archive/2014/08/20/hybrid-it-sql-always-on-availability-group-replica-node-in-azure-iaas.aspx"><span style="color:#0563c1;font-family:Calibri;font-size:medium;">Hybrid IT: SQL Always on Availability Group Replica Node in Azure IaaS</span></a><span style="font-family:Calibri;font-size:medium;">, I could get a Hybrid CRM environment to usable state. Hybrid because out two CRM servers one is On-Premise Hyper-V VM and other is Azure IaaS VM, same way there is an additional domain controller and one of SQL AG replica node residing on Azure IaaS VMs. </span></p>
<p style="text-align:justify;"><span style="font-family:Calibri;font-size:medium;">Here is a diagram of the topology I planned and configured. The On-Premise environment running completely on Hyper-V, Azure VMs are under typical Azure subscription. RRAS server is configured as gateway for On-Premise systems and IPSec VPN tunnel connects On-Premise VPN device (RRAS Server) with the Azure gateway.</span></p>
<p><span style="font-family:Calibri;font-size:medium;">&nbsp;</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/45/Topology1.jpg" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-45/Topology1.jpg"><img style="width:958px;height:519px;" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/45/Topology1.jpg" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-45/Topology1.jpg" height="375" border="0" width="551" /></a></p>
<p><span style="font-family:Calibri;font-size:medium;">Figure 1 Hybrid Dynamics CRM Deployment</span></p>
<p><span style="font-family:Calibri;font-size:medium;">&nbsp;</span></p>
<h1><strong><span style="color:#0070c0;font-family:verdana,geneva;">Configuring On-Premise part of Deployment:</span></strong></h1>
<p style="text-align:justify;"><span style="font-family:Calibri;font-size:medium;">Primary milestone of the project is preparing and configuring On-Premise side of the deployment. Comprising of five (5) virtual machines. A domain controller, CRM server, RRAS server for sit-to-site VPN and two SQL Nodes. Here is an outline of the steps to get the On-Premise infrastructure working. </span></p>
<ul>
<li>
<p style="text-align:justify;">Setup Active Directory domain by creating first domain controller.</p>
</li>
<li style="text-align:justify;">
<p>Setup RRAS server- <a href="https://msdn.microsoft.com/library/dn636917.aspx"><span style="color:#0563c1;">Here</span></a> is the document describing Site-to-Site VPN configuration steps in detail.</p>
</li>
<li>
<p style="text-align:justify;">Setup SQL AlwaysOn Availability Group with 2 On-Premise replicas. There are multiple resources available with focus on different aspects of the process. <a href="/b/canitpro/archive/2013/08/20/step-by-step-creating-a-sql-server-2012-alwayson-availability-group.aspx"><span style="color:#0563c1;">This</span></a> is the document which closely resembles configuration approach I followed. Closely because, I skipped Availability Group Listener creation and I am using newer versions of OS, SQL then those referred in this document.</p>
</li>
</ul>
<h1><strong><span style="color:#0070c0;font-family:verdana,geneva;">Additional Domain Controller on Azure VM:</span></strong></h1>
<p style="text-align:justify;"><span style="font-family:Calibri;font-size:medium;">With Site-to-Site VPN in action, Azure IaaS is visible as an extension of Hyper-V virtual network. Depending on Windows Firewall configuration, one can verify/test connectivity by pinging VM on Azure from On-Premise VM. After this connectivity is established, its matter telling your AD Domain about this new site from Sites and Service. Post this step an Azure VM can be promoted as an additional domain controller. Detailed steps are outlined in </span><a href="http://azure.microsoft.com/en-us/documentation/articles/virtual-networks-install-replica-active-directory-domain-controller/"><span style="color:#0563c1;font-family:Calibri;font-size:medium;">this</span></a><span style="font-family:Calibri;font-size:medium;"> Azure documentation.</span></p>
<h1><strong><span style="color:#0070c0;font-family:verdana,geneva;">SQL AlwaysOn Replica in Azure:</span></strong></h1>
<p style="text-align:justify;"><span style="font-family:Calibri;font-size:medium;">SQL AlwaysOn offers a neat feature, Add Azure Replica Wizard. This nifty wizard takes away a lot of ground work required for preparing an Azure VM to be an AlwaysOn Replica. It takes care of creating a VM, adding it to domain, Failover Cluster and finally to AlwaysOn Availability Group. </span><a href="/b/francesco_diaz/archive/2014/02/06/sql-server-2014-alwayson-availability-groups-add-azure-replica-wizard-in-action.aspx"><span style="color:#0563c1;font-family:Calibri;font-size:medium;">Here</span></a><span style="font-family:Calibri;font-size:medium;"> is a blog post describing requirements and a good usage walkthrough of Add Azure Replica Wizard. This document doesn&rsquo;t talk about SQL Availability Group Listener but below is another good resource that well describes Listener configuration. Document below is using the Add Azure Replica Wizard for identical purpose as my configuration scenario including pointers to Listener configuration steps.</span></p>
<p style="text-align:justify;"><span style="font-family:Calibri;font-size:medium;color:#333399;">Extend on-premises AlwaysOn Availability Groups to Azure - </span><a href="https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-sql-server-extend-on-premises-alwayson-availability-groups/"><span style="color:#0563c1;font-family:Calibri;font-size:medium;">https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-sql-server-extend-on-premises-alwayson-availability-groups/</span></a><span style="font-family:Calibri;font-size:medium;">.</span></p>
<p style="text-align:justify;"><span style="font-family:Calibri;font-size:medium;">Add Azure Replica Wizard preforms multiple stages of the configuration. Depending on the environment, there are possibilities of exceptions at some stage. I would refer </span><a href="http://blogs.msdn.com/b/alwaysonpro/archive/2014/11/21/troubleshoot-add-azure-replica-wizard-in-sql-server-2014.aspx"><span style="color:#0563c1;font-family:Calibri;font-size:medium;">blog</span></a><span style="font-family:Calibri;font-size:medium;"> post to get an idea of known issues with the Add Azure Replica Wizard. </span></p>
<p><span style="font-family:Calibri;"><span style="font-size:medium;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/45/Tip.jpg" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-45/Tip.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/45/Tip.jpg" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-45/Tip.jpg" border="0" /></a>I suggest installing latest service pack and cumulative updates for SQL Server. Not just SQL Server this rule applies for any software you use. This takes out chances of running into issues those are already addressed by released fixes. </span></span></p>
<h1><strong><span style="color:#0070c0;font-family:verdana,geneva;">SQL AlwaysOn Listener:</span></strong></h1>
<p style="text-align:justify;"><span style="font-family:Calibri;font-size:medium;">Next is the AlwaysOn Listener configuration. I followed below document to create/configure AlwaysOn Listener for my Hybrid AlwaysOn Availability Group. </span></p>
<p style="text-align:justify;"><span style="font-family:Calibri;font-size:medium;color:#0000ff;"><span style="color:#333399;">Configure an ILB listener for AlwaysOn Availability Groups in Azure -</span> </span><a href="https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-sql-server-configure-ilb-alwayson-availability-group-listener/"><span style="color:#0563c1;font-family:Calibri;font-size:medium;">https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-sql-server-configure-ilb-alwayson-availability-group-listener/</span></a></p>
<p style="text-align:justify;"><span style="font-family:Calibri;font-size:medium;">This document covers good details for you to follow through. Alternatively, you can choose to use </span><a href="http://blogs.msdn.com/b/sqlalwayson/archive/2013/11/22/availability-group-listener-in-hybrid-it-end-to-end-powershell-script-published.aspx"><span style="color:#0563c1;font-family:Calibri;font-size:medium;">this</span></a><span style="font-family:Calibri;font-size:medium;"> ready script provided by SQL AlwaysOn team. I chose not use the ready script but walked through steps to create ILB Listener. How clients connect to the AlwaysOn Listener and how to control some of the behaviors is well described </span><a href="https://msdn.microsoft.com/en-us/library/hh213080(v=sql.120).aspx#MultiSubnetFailover"><span style="color:#0563c1;font-family:Calibri;font-size:medium;">here</span></a><span style="font-family:Calibri;font-size:medium;">. Refer to &ldquo;MultiSubnetFailover Keyword and Associated Features&rdquo; section for relevant information. </span></p>
<h1><strong><span style="color:#0070c0;font-family:verdana,geneva;">Dynamics CRM Servers:</span></strong></h1>
<p style="text-align:justify;"><span style="font-family:Calibri;font-size:medium;">Hybrid SQL Availability Group is functional and has replicas across sites, On-Premise and Azure IaaS. Last phase of the project is installing and configuring CRM servers. First step of this last phase is to bring up two web servers to host CRM application on both sites, one is Azure IaaS VM and other is On-Premise Hyper-V VM. CRM server setup remains same as a typical On-Premise environment. Install first CRM server creating a new CRM deployment pointing to standalone SQL Server. First I installed CRM On-Premise server pointing to On-Premise SQL node 1. Yes, at this stage we won&rsquo;t tell CRM about the SQL High Availability. For details on CRM full server installation one can refer </span><a href="https://technet.microsoft.com/en-us/library/hh699780.aspx"><span style="color:#0563c1;font-family:Calibri;font-size:medium;">this page</span></a><span style="font-family:Calibri;"><span style="font-size:medium;">. For 2</span><sup><span style="font-size:small;">nd</span></sup><span style="font-size:medium;"> server on Azure VM, I ran CRM server setup choosing option to connect to existing deployment pointing to On-Premise SQL Node 1. </span></span><a href="https://technet.microsoft.com/en-us/library/hh699803.aspx"><span style="color:#0563c1;font-family:Calibri;font-size:medium;">This document</span></a><span style="font-family:Calibri;font-size:medium;"> can be referred for detailed information on installing CRM server on additional servers in same CRM deployment. </span></p>
<p style="text-align:justify;"><span style="font-family:Calibri;font-size:medium;">On successful completion of CRM server setup on both servers, we have two CRM servers hosting Full Role. Browsing CRM website pointing to either of servers works normally. Being in same CRM deployment, either of the CRM server points to same back-end configuration and organization databases. </span></p>
<p style="text-align:justify;"><span style="font-family:Calibri;font-size:medium;">Dynamics CRM 2015 Implementation Guide provides good information on how to configure an existing CRM deployment to leverage SQL AlwaysOn high availability. Below is the CRM product documentation page describing the configuration process step by step.</span></p>
<p style="text-align:justify;"><span style="font-family:Calibri;font-size:medium;color:#0000ff;"><span style="color:#333399;">Set configuration and organization databases for SQL Server 2012 AlwaysOn failover - </span></span><a href="https://technet.microsoft.com/en-us/library/jj822357.aspx"><span style="color:#0563c1;font-family:Calibri;font-size:medium;">https://technet.microsoft.com/en-us/library/jj822357.aspx</span></a><span style="font-family:Calibri;font-size:medium;"> </span></p>
<p style="text-align:justify;"><span style="font-family:Calibri;"><span style="font-size:medium;">Out of above document, Cluster and SQL Availability Group creation step changes a little. Here we already have AlwaysOn Availability Group. We would add CRM databases to our existing Availability Group then resume following the document from step &ldquo;Create the SQL logins&hellip;&rdquo; up to the bottom. Making changes to connection string as described configures CRM Application to use the Availability Group Listener &ldquo;HYBRIDSQLAGL&rdquo; instead of AlwaysOn replica node name. This configuration allows CRM server to connect to SQL Databases in Availability Group irrespective of Replica node hosting the databases. CRM Application can continue to function and remain accessible even in situations when On-Premise or Azure IaaS servers are not accessible. </span></span></p>
<p style="text-align:justify;"><span style="font-family:Calibri;font-size:medium;">MultiSubnetFailover keyword is required as we have multi-subnet listener for an AlwaysOn Availability Group Listener. Refer to </span><a href="https://msdn.microsoft.com/en-us/library/hh213080(v=sql.120).aspx#MultiSubnetFailover"><span style="color:#0563c1;font-family:Calibri;font-size:medium;">this</span></a><span style="font-family:Calibri;"><span style="font-size:medium;"> article for more information on MultiSubnetFailover keyword of connection string. </span></span></p>
<p style="text-align:justify;"><span style="font-family:Calibri;font-size:medium;">What I described here is an example or can be called a POC (proof of concept). Disaster Recovery Strategy heavily relies on Recovery Point Objective (RPO) and Recovery Time Objective (RTO) directives from business. Depending on business and environmental requirements there could be need for additional resources and configuration steps to support multiple unique combinations. For Example: deploying a Hybrid AD FS deployment can be added to above topology and it would support your CRM Internet Facing Deployment (IFD) to be accessible over internet. <a href="/b/abizerh/archive/2013/11/19/adfs-on-azure-vms.aspx">ADFS on Azure VMs</a> blog post gives good overview of scenarios and general information about it.</span></p>
<p><span style="font-family:Calibri;">&nbsp;</span></p>
<h1><span style="font-family:verdana,geneva;"><strong><span style="color:#0070c0;">Additional Resources:</span></strong></span></h1>
<p></p>
<p><span style="font-family:verdana,geneva;"><span style="color:#333399;">SQL AlwaysOn Team Blog -</span> <a href="http://blogs.msdn.com/b/sqlalwayson/">http://blogs.msdn.com/b/sqlalwayson/</a></span></p>
<p></p>
<p><span style="font-family:verdana,geneva;"><span style="color:#333399;">Microsoft Server Software support for Microsoft Azure virtual machines -</span> <a href="https://support.microsoft.com/en-us/kb/2721672">https://support.microsoft.com/en-us/kb/2721672</a></span></p>
<p></p>
<p><span style="font-family:verdana,geneva;"><span style="color:#333399;">Performance Guidance for SQL Server in Windows Azure Virtual Machines -</span> <a href="http://blogs.msdn.com/b/sqlcat/archive/2013/06/17/performance-guidance-for-sql-server-in-windows-azure-virtual-machines.aspx">http://blogs.msdn.com/b/sqlcat/archive/2013/06/17/performance-guidance-for-sql-server-in-windows-azure-virtual-machines.aspx</a></span></p>
<p></p>
<p><span style="font-family:verdana,geneva;"><span style="color:#333399;">ADFS on Azure VMs -</span> <a href="/b/abizerh/archive/2013/11/19/adfs-on-azure-vms.aspx">http://blogs.technet.com/b/abizerh/archive/2013/11/19/adfs-on-azure-vms.aspx</a></span></p>
<p><span style="font-family:Calibri;font-size:medium;">&nbsp;</span></p>
<p>Hope this helps! Cheers!</p>
<p><a href="http://www.linkedin.com/pub/bhavesh-shastri/15/621/878"><span style="color:#0563c1;font-size:medium;">Bhavesh Shastri</span></a></p>
<p></p>]]></content:encoded>
    </item>
    <item>
      <title>Dynamics CRM Reports complaining Reporting extensions(SRS Data Connector) are not installed</title>
      <link>https://docs.microsoft.com/archive/blogs/bshastri/dynamics-crm-reports-complaining-reporting-extensionssrs-data-connector-are-not-installed</link>
      <pubDate>Sun, 16 Aug 2015 20:17:51 GMT</pubDate>
      <dc:creator><![CDATA[Bhavesh Shastri]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/bshastri/2015/08/16/dynamics-crm-reports-complaining-reporting-extensionssrs-data-connector-are-not-installed/</guid>
      <description><![CDATA[Here I am talking about an interesting issue while running Dynamics CRM Reports. When I faced this...]]></description>
      <content:encoded><![CDATA[<p></p>
<p style="text-align:justify;"><span style="font-family:verdana,geneva;">Here I am talking about an interesting issue while running Dynamics CRM Reports. When I faced this for first time it felt rare <span style="font-family:verdana,geneva;">corner </span>scenario but recently I worked with a couple of more customers who ran into same issue. <span style="font-family:verdana,geneva;">This type of strange issues can take good amount of time to investigate/troubleshoot so worth sharing. </span><br /></span></p>
<p style="text-align:justify;"><span style="font-family:verdana,geneva;">Running any CRM report fails with error stating Reporting Extensions (Data Connector) is not installed. Of course Reporting Extensions (Data Connector) is installed and in fact it&rsquo;s been removed and reinstalled in attempt to fix the issue, but no difference in error. Below is how error reads/looks like:</span></p>
<p style="text-align:justify;"></p>
<p><span style="color:#ff0000;"><i>Reporting Error </i></span></p>
<p><span style="color:#ff0000;"><i>Reports cannot be run because the Connector for Microsoft SQL Server Reporting Services, a required component for reporting is not installed on the server that is running Microsoft SQL Server Reporting Services.</i></span></p>
<p><i>&nbsp;</i></p>
<p><i><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/45/7178.1.jpg" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-45/7178.1.jpg"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/45/7178.1.jpg" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-45/7178.1.jpg" alt=" " border="0" /></a><br /></i></p>
<p><span style="font-family:verdana,geneva;">Looking deeper, SSRS Event logs reports failure loading CRM extension.</span></p>
<p><span style="color:#ff0000;">Log Name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Application</span><br /><span style="color:#ff0000;">Source:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Report Server (MSSQLSERVER)</span><br /><span style="color:#ff0000;">Date:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7/10/2015 3:11:55 PM</span><br /><span style="color:#ff0000;">Event ID:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 108</span><br /><span style="color:#ff0000;">Task Category: Extension</span><br /><span style="color:#ff0000;">Level:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Error</span><br /><span style="color:#ff0000;">Keywords:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Classic</span><br /><span style="color:#ff0000;">User:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; N/A</span><br /><span style="color:#ff0000;">Computer:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SSRSBox</span><br /><span style="color:#ff0000;">Description:</span><br /><span style="color:#ff0000;">Report Server (MSSQLSERVER) cannot load the MSCRM extension.</span></p>
<p style="text-align:justify;"><span style="font-family:verdana,geneva;">Same event log error is there for other Report Server extensions as well. MSCRMFETCH, SQLPDW, TERADATA are other exception those fail to load within SSRS.</span></p>
<p style="text-align:justify;"><span style="font-family:verdana,geneva;">Report Server Service log file also complains about not being able to load the file or missing files.</span></p>
<p><span style="color:#3366ff;">extensionfactory!ReportServer_0-1!9f8!07/08/2015-02:28:31:: e ERROR: Exception caught instantiating MSCRMFETCH report server extension: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---&gt; <span style="background-color:#ffff00;">System.DllNotFoundException: Unable to load DLL &#39;SRSDataConnectorBootstrapper.dll&#39;: The specified module could not be found</span>. (Exception from HRESULT: 0x8007007E)</span><br /><span style="color:#3366ff;">&nbsp;at Microsoft.Crm.Reporting.DataExtensionShim.Common.NativeMethods.CreateManagedObject(String fullAssemblyPath, String assemblyName, String typeName, Object&amp; obj)</span><br /><br /><span style="color:#3366ff;">extensionfactory!ReportServer_0-1!9f8!07/08/2015-02:28:31:: e ERROR: Exception caught instantiating TERADATA report server extension: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---&gt; <span style="background-color:#ffff00;">System.IO.FileNotFoundException: Could not load file or assembly &#39;Teradata.Client.Provider,</span> Version=12.0.0.0, Culture=neutral, PublicKeyToken=76b417ee2e04956c&#39; or one of its dependencies. The system cannot find the file specified.</span><br /><span style="color:#3366ff;">File name: &#39;Teradata.Client.Provider, Version=12.0.0.0, Culture=neutral, PublicKeyToken=76b417ee2e04956c&#39;</span></p>
<p style="text-align:justify;"><span style="font-size:small;font-family:verdana,geneva;">All the files being reported in above exceptions were present on expected path and Report Server service account was given adequate permissions. <a href="https://technet.microsoft.com/en-us/library/bb896645.aspx">ProcMon</a> comes to mind as handy tool for investigating file access issues. After good analysis of working and non-working logs could nail it down to VC++ runtime dlls missing or being wrong versions on non-working environment. VC++ runtime is a required component for SSRS extensions to load and function properly.</span></p>
<p style="text-align:justify;"><span style="font-size:small;font-family:verdana,geneva;">Once we knew its VC++ runtime fix was relatively easy and quick. Either replace the wrong file with appropriate <span style="font-size:small;font-family:verdana,geneva;">version </span>from working environment or remove and reinstall Visual C++ Redistributable Package from Microsoft download page. <span style="font-size:small;font-family:verdana,geneva;">The Visual C++ Redistributable Packages that ships <span style="font-size:small;font-family:verdana,geneva;">in Redist folder</span> of Dynamics CRM installation media can also be used.</span></span></p>
<p style="text-align:justify;"><span style="font-size:small;font-family:verdana,geneva;">The file msvcr100.dll in C:\Windows\System32 folder was missing in one of the environment, just placing this file from a working environment resolved the issue. After correcting missing/wrong file or reinstalling VC++ runtime, restarting SSRS, IIS on CRM server and clearing IE cache resolves the errors loading SSRS extensions and CRM Reports render w/o any issues.</span></p>
<p><span style="font-size:small;">&nbsp;</span></p>
<p style="text-align:left;"><span style="font-size:small;font-family:verdana,geneva;">Hope this helps! Cheers!</span></p>
<p><span style="font-size:small;"><a href="http://www.linkedin.com/pub/bhavesh-shastri/15/621/878"><b>Bhavesh Shastri</b></a></span><b></b></p>]]></content:encoded>
    </item>
    <item>
      <title>Dynamics CRM Knowledge Base Articles search shows unexpected results for specific keywords</title>
      <link>https://docs.microsoft.com/archive/blogs/bshastri/dynamics-crm-knowledge-base-articles-search-shows-unexpected-results-for-specific-keywords</link>
      <pubDate>Thu, 13 Aug 2015 21:22:32 GMT</pubDate>
      <dc:creator><![CDATA[Bhavesh Shastri]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/bshastri/2015/08/13/dynamics-crm-knowledge-base-articles-search-shows-unexpected-results-for-specific-keywords/</guid>
      <description><![CDATA[The Dynamics CRM Service module provides Articles entity that serves as very useful knowledge...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family:verdana,geneva;">The Dynamics CRM Service module provides Articles entity that serves as very useful knowledge repository for users and empowers them to guide customers in most efficient manner. For background, <a href="http://www.microsoft.com/en-us/dynamics/crm-customer-center/use-articles-in-the-knowledge-base.aspx">here</a> is the document which describes the Articles usage.</span></p>
<p><span style="font-family:verdana,geneva;">Search functionality of this Articles feature relies on SQL Server <a href="https://msdn.microsoft.com/en-us/library/ms142571.aspx">Full-Text Search</a> <span style="font-family:verdana,geneva;">feature </span>and leverages the contains() function as described in the <a href="https://msdn.microsoft.com/en-us/library/ms142571.aspx">Full-Text Search</a> feature page. We came across an interesting scenario through a customer report as well as internal testing. Searching for specific keywords does not show expected published articles.</span></p>
<p></p>
<p><span style="font-family:verdana,geneva;">Here is screenshot of such example for keyword &ldquo;use&rdquo;, there are published articles with keyword &quot;use&quot; in the grid:</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/45/7624.1.jpg" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-45/7624.1.jpg"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/45/7624.1.jpg" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-45/7624.1.jpg" alt=" " border="0" /></a></p>
<p></p>
<p><span style="font-family:verdana,geneva;">However, search results doesn&rsquo;t show any of those when search for &quot;use&quot; keyword:</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/45/2.jpg" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-45/2.jpg"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/45/2.jpg" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-45/2.jpg" alt=" " border="0" /></a></p>
<p><span style="font-family:verdana,geneva;">Figured SQL query formulated by CRM for above search and executed directly in SQL Management Studio, no records returned! Looking deeper, this turned out expected behavior from SQL standpoint. SQL Server uses Stopwords to prevent a full-text index from becoming bloated. SQL Server has a mechanism that discards commonly occurring strings (Stopwords) that do not help the search. The TechNet article below describes this feature and how to customize or disable usage of Stopwords.</span></p>
<p><span style="font-family:verdana,geneva;">Configure and Manage Stopwords and Stoplists for Full-Text Search -<a href="https://technet.microsoft.com/en-us/library/ms142551(v=sql.110).aspx">https://technet.microsoft.com/en-us/library/ms142551(v=sql.110).aspx</a></span></p>
<p><span style="font-family:verdana,geneva;">While there could be multiple options available for administering SQL Stopwords and Stoplists here is one approach that can help to tweak system Stoplist to meet the requirements. The following are step by step instructions along with screenshots for making it easy to follow.</span></p>
<p><span style="font-family:verdana,geneva;">1. Create a new Full-Text Stoplist from context menu shown in below screenshot</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/45/3.jpg" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-45/3.jpg"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/45/3.jpg" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-45/3.jpg" alt=" " border="0" /></a></p>
<p><span style="font-family:verdana,geneva;">2. Choose to create from System Stoplist (can be an empty one too but that&rsquo;s not recommended as it bloats Full-Text index size). If empty Stoplist is created then remaining steps to delete stopword should be skipped.</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/45/4.jpg" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-45/4.jpg"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/45/4.jpg" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-45/4.jpg" alt=" " border="0" /></a></p>
<p><span style="font-family:verdana,geneva;">3. Right click on new stop list and get to properties window below, delete Stopword you don&rsquo;t require. Here I removed &ldquo;use&rdquo;</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/45/5.jpg" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-45/5.jpg"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/45/5.jpg" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-45/5.jpg" alt=" " border="0" /></a></p>
<p><span style="font-family:verdana,geneva;font-size:small;">4. Attach this custom stop list to Article entity Full-Text index</span></p>
<p><span style="color:#0000ff;">ALTER FULLTEXT INDEX ON</span> dbo.documentindex <span style="color:#0000ff;">SET STOPLIST</span> = MyStopList;</p>
<p>Note: Above command attaches the custom Stoplist to dbo.documentindex that&rsquo;s tied to knowledge base Articles. Custom Stoplist should be attached to the Full-Text index tied to the entity for which default Stoplist is drawing unexpected results. For example, below is the command to attach custom Stoplist to Account entity Full-Text Index:</p>
<p><span style="color:#0000ff;">ALTER FULLTEXT INDEX ON</span> dbo.Accountbase <span style="color:#0000ff;">SET STOPLIST</span> = MyStopList;</p>
<p><span style="font-family:verdana,geneva;">5. Rebuild CRMFullTextCatalog from context menu option</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/45/6.jpg" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-45/6.jpg"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/45/6.jpg" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-45/6.jpg" alt=" " border="0" /></a></p>
<p><span style="font-family:verdana,geneva;">6. You can see the difference in output of below queries showing &lsquo;use&rsquo; keyword present in system Stoplist but not in our custom Stoplist.</span></p>
<p><span style="color:#0000ff;">select * from</span> <span style="color:#339966;">sys.fulltext_system_stopwords</span></p>
<p><span style="color:#0000ff;">where </span>language_id = 1033 and stopword=<span style="color:#ff0000;">&#39;use&#39;</span></p>
<p><span style="color:#0000ff;">select * from</span> <span style="color:#339966;">sys.fulltext_stopwords</span> <span style="color:#000000;">MyStopList</span></p>
<p><span style="color:#0000ff;">where</span><span style="color:#0000ff;"> </span>language_id = 1033 and stopword=<span style="color:#ff0000;">&#39;use&#39;</span></p>
<p></p>
<p><span style="font-family:verdana,geneva;">Now searching by &ldquo;use&rdquo; keyword in CRM should yield expected results.</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/45/4812.7.jpg" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-45/4812.7.jpg"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/45/4812.7.jpg" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-45/4812.7.jpg" alt=" " border="0" /></a></p>
<p></p>
<p><span style="font-family:verdana,geneva;">At the time of writing this custom Stoplist is possible only with CRM On-Premise environment but not with CRM Online.</span></p>
<p><span style="font-family:verdana,geneva;">&nbsp;</span></p>
<p><span style="font-family:verdana,geneva;">Hope this helps! Cheers!</span></p>
<p><a href="http://www.linkedin.com/pub/bhavesh-shastri/15/621/878"><b>Bhavesh Shastri</b></a><b></b></p>]]></content:encoded>
    </item>
    <item>
      <title>Hybrid IT: SQL Always on Availability Group Replica Node in Azure IaaS</title>
      <link>https://docs.microsoft.com/archive/blogs/bshastri/hybrid-it-sql-always-on-availability-group-replica-node-in-azure-iaas</link>
      <pubDate>Wed, 20 Aug 2014 07:48:55 GMT</pubDate>
      <dc:creator><![CDATA[Bhavesh Shastri]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/bshastri/2014/08/20/hybrid-it-sql-always-on-availability-group-replica-node-in-azure-iaas/</guid>
      <description><![CDATA[Hybrid IT: SQL Always on Availability Group Replica Node in Azure IaaS
&nbsp;
Greetings!
Lately,...]]></description>
      <content:encoded><![CDATA[<h2><b>Hybrid IT: SQL Always on Availability Group Replica Node in Azure IaaS</b></h2>
<p>&nbsp;</p>
<p><span style="font-family:verdana,geneva;font-size:small;">Greetings!</span></p>
<p style="text-align:justify;"><span style="font-family:verdana,geneva;font-size:small;">Lately, I came across to Azure IaaS offerings in a casual conversation with a cloud savvy acquaintance. Site-To-Site and Point-To-Site VPN offerings as part of IaaS triggered obvious thoughts of extending an on-premise environment for different purposes like DR (Disaster Recovery), Dev, Test etc. Azure <a href="http://azure.microsoft.com/en-us/services/expressroute/">Express Route</a> offering is likely option for enterprises but Site-To-Site and Point-To-Site VPN options are significant for smaller or lower environments and/or to facilitate remote sites, user(s) connections access to applications.&nbsp;</span></p>
<p style="text-align:justify;"><span style="font-family:verdana,geneva;font-size:small;">First thing that sounds interesting is to prepare a DR environment in Azure IaaS. An extension of on-premise deployment by adding replica domain controller (DC), and SQL Always On Availability Group (AG) replica node. After a couple of weeks spent consuming different documentations, videos, thoughts and importantly playing in Lab environment, I could get a Hybrid SQL Always Availability Group functional. Hybrid because two out of three SQL Nodes are on-premise Hyper-v VM and third one is Azure IaaS VM, same way there is an additional domain controller running on Azure VM. It&rsquo;s really lengthy configuration process to cover step by step (click by click) here but I am describing an overview of each configuration milestones with drill down links to materials/documentation for each milestone.</span></p>
<p style="text-align:justify;"><span style="font-family:verdana,geneva;font-size:small;">Here is a diagram of the topology as I planned and configured. My on-premise environment is running on Hyper-v whereas Azure VMs are under typical 30 day trial open for all. RRAS server is configured as a gateway for on-premise systems and a VPN device forming an IPSec VPN tunnel from on-premise to the Azure gateway.</span></p>
<p><span style="font-family:times new roman,times;"><strong>OS and Server Software versions:</strong></span><br /><span style="font-family:times new roman,times;">SQL 2012 Sp1 on Windows server 2008 R2 sp1</span><br /><span style="font-family:times new roman,times;">DC on Windows Server 2008 R2 sp1</span><br /><span style="font-family:times new roman,times;">RRAS on Windows Server 2012 R2</span></p>
<h4><span style="font-family:verdana,geneva;color:#3366ff;font-size:small;"><strong>Topology Diagram:</strong></span></h4>
<p><span style="font-family:verdana,geneva;"><span style="color:#3366ff;font-size:small;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/45/7851.Topology.jpg" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-45/7851.Topology.jpg"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/45/7851.Topology.jpg" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x550/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-45/7851.Topology.jpg" alt=" " border="0" /></a><br /></span></span></p>
<p><span style="font-family:verdana,geneva;font-size:small;">I am skipping the detailed steps for Windows OS, Domain Controller, WSFC Cluster, SQL Server, Always On installation/configuration as its well described in other resources available on internet. However, here is a listing for sequence reference:</span></p>
<ol>
<li><span style="font-family:verdana,geneva;font-size:small;">Three Hyper-v VMs running Windows Server 2008 R2 sp1 (DC, SQL Nodes)</span></li>
<li><span style="font-family:verdana,geneva;font-size:small;">A Hyper-v VM running Windows Server 2012 R2 (RRAS for Site-to-Site VPN to Azure Gateway)</span></li>
<li><span style="font-family:verdana,geneva;font-size:small;">Domain configuration by promoting first DC</span></li>
<li><span style="font-family:verdana,geneva;font-size:small;">Join member servers to Domain (RRAS, SQL Node 1, SQL Node 3)</span></li>
<li><span style="font-family:verdana,geneva;font-size:small;">Verify/Install hotfix mentioned in <a href="http://support.microsoft.com/kb/2854082"><b>this</b></a> support KB on all cluster nodes</span></li>
<li><span style="font-family:verdana,geneva;font-size:small;">Install Failover Clustering on both nodes, create a cluster by consuming an unused static IP from on-prem subnet</span></li>
<li><span style="font-family:verdana,geneva;font-size:small;">Install SQL Server on both nodes as standalone default instance, Enable Always On</span></li>
<li><span style="font-family:verdana,geneva;font-size:small;">Create Always On Availability Group, Add a test DB to Availability Databases, A Listener pointing to unused on-premise IP address for Availability Group. <a href="https://www.youtube.com/watch?v=QxvnyhJuwOw"><b>Here</b></a> is a screen capture video of end to end process.</span></li>
<li><span style="font-family:verdana,geneva;font-size:small;">Test connecting by AG Listener name from either nodes, or ODBC connection from DC</span></li>
</ol>
<p><span style="font-family:verdana,geneva;font-size:small;">Now let&rsquo;s start at this state when on-premise SQL Always On AG is configured and working fine.</span></p>
<p>&nbsp;</p>
<h4><strong><span style="font-family:verdana,geneva;color:#3366ff;"><span style="font-family:verdana,geneva;font-size:small;color:#3366ff;"><span style="font-family:verdana,geneva;color:#3366ff;"><strong><span style="color:#3366ff;"><strong><span style="font-family:verdana,geneva;">Site-To-Site VPN:</span></strong></span></strong></span></span></span></strong></h4>
<p style="text-align:justify;"><span style="font-family:verdana,geneva;font-size:small;">First step is to setup a VPN tunnel to connect on-premise network and Azure virtual network. Azure IaaS supports IPSec VPN tunneling and can be configured against various devices from Cisco, Juniper, and F5 etc. I used Windows Server 2012 Routing and Remote Access Service (RRAS) as VPN device in my test lab. <a href="http://msdn.microsoft.com/library/dn636917.aspx"><b>Here</b></a> is the link to document I followed, this well describes step-by-step method to configure VPN for RRAS and has reference to links talking about other devices.</span></p>
<p><span style="font-family:verdana,geneva;font-size:small;">&nbsp;</span></p>
<h4 style="text-align:left;"><span style="font-family:verdana,geneva;font-size:small;color:#3366ff;"><span style="font-family:verdana,geneva;color:#3366ff;"><strong>Additional DC on Azure VM<span style="color:#3366ff;"><strong><span style="font-family:verdana,geneva;">:</span></strong></span></strong></span></span></h4>
<p style="text-align:justify;"><span style="font-family:verdana,geneva;font-size:small;">With Site-to-Site VPN in action, Azure IaaS is visible as an extension of Hyper-v virtual network. Depending on Windows Firewall configuration, one can verify/test connectivity by pinging VM on Azure from on-premise VM. After this connectivity is established, its matter telling your AD Domain about this new site from Sites and Service. Post this step Azure VM can be promoted as an additional domain controller on Azure VM. Detailed steps are outlined in <a href="http://azure.microsoft.com/en-us/documentation/articles/virtual-networks-install-replica-active-directory-domain-controller/"><b>this</b></a> Azure documentation.</span></p>
<p>&nbsp;</p>
<h4><span style="font-family:verdana,geneva;color:#3366ff;font-size:small;"><strong>Add Azure VM as node to WSFC cluster and replica to SQL Always On Availability Group:</strong></span></h4>
<p style="text-align:justify;"><span style="font-family:verdana,geneva;font-size:small;">SQL 2014 introduces a pretty cool feature &ldquo;Add Azure Replica wizard&rdquo;, an extension to original &ldquo;Add Replica&rdquo; wizard of SQL Always On. This wizard can come in play once the site-to-site VPN is in place. This wizard takes care of creating VM in Azure, joining Domain, Adding as node to cluster and finally adding node as replica to Always On Availability Group. This &ldquo;Add Azure Replica wizard&rdquo; is SQL 2014 feature but can be used with SQL 2012 as well by installing management tools. <a href="/b/francesco_diaz/archive/2014/02/06/sql-server-2014-alwayson-availability-groups-add-azure-replica-wizard-in-action.aspx"><b>Here</b></a> is a post that walks through the wizard in detail.</span></p>
<p style="text-align:justify;"><span style="font-family:verdana,geneva;font-size:small;">However, I decided not use this wizard and took the approach to manually configure what wizard does. Below are the steps that worked smoothly to add my Azure SQL Node as a replica to existing Availability Group that I created on-premise.</span></p>
<ol>
<li><span style="font-family:verdana,geneva;font-size:small;">Create a VM in could from gallery image &quot;Windows Server 2008 R2 SP1&quot; under same cloud service and storage account where Azure DC is residing</span></li>
<li><span style="font-family:verdana,geneva;font-size:small;">Verify/Install hotfix mentioned in <a href="http://support.microsoft.com/kb/2854082"><b>this</b></a> support KB</span></li>
<li><span style="font-family:verdana,geneva;font-size:small;">Join to domain</span></li>
<li><span style="font-family:verdana,geneva;font-size:small;">Install Failover Clustering</span></li>
<li><span style="font-family:verdana,geneva;font-size:small;">Add the VM as a node to cluster, now AZSQL3(SQL AG Node 3) should be visible as 3rd node in on-premise Cluster</span></li>
<li><span style="font-family:verdana,geneva;font-size:small;">Install SQL 2012 as standalone default instance, enable SQL Always ON</span></li>
<li><span style="font-family:verdana,geneva;font-size:small;">Add an unused IP address &nbsp;from Azure VLAN subnet to existing AG listener</span></li>
<li><span style="font-family:verdana,geneva;font-size:small;">Add node as replica for existing Availability Group</span></li>
<li><span style="font-family:verdana,geneva;font-size:small;">Test connecting by listener name</span></li>
<li><span style="font-family:verdana,geneva;font-size:small;">Test Failover to and from SQL Node on Azure VM.</span></li>
</ol>
<p>&nbsp;</p>
<h4><span style="color:#3366ff;font-size:small;"><strong><span style="font-family:verdana,geneva;">Point-To-Site VPN:</span></strong></span></h4>
<p style="text-align:justify;"><span style="font-family:verdana,geneva;font-size:small;">Azure virtual network can also be configured to support Point-To-Site VPN so it allows connections from clients on open internet. <a href="http://msdn.microsoft.com/en-us/library/azure/dn133792.aspx"><b>Here</b></a> is a detailed document describing step by step process to configure it. However, if you want to use the same Virtual Network on which you have already configured Site-To-Site VPN then you can start with enabling Point-To-Site connection on Azure Virtual network page, add address range and resume above document from &ldquo;Create your certificates&rdquo; section.</span></p>
<p><span style="font-family:verdana,geneva;font-size:small;">&nbsp;</span></p>
<h4><span style="font-family:verdana,geneva;font-size:small;"><strong><span style="color:#3366ff;">Observations:</span></strong></span></h4>
<p style="text-align:justify;"><span style="font-family:verdana,geneva;font-size:small;">A DNS record is created for cluster name pointing to IP specified while creating cluster. Listener name has two DNS records, one tied to on-prem subnet IP and other pointing to Azure virtual network IP.</span></p>
<p style="text-align:justify;"><span style="font-family:verdana,geneva;font-size:small;">What I described here as a solution is just an example or can be called a POC. Depending on environmental and business requirements there could be additional resources and configurations to support multiple combinations and permutations.</span></p>
<p style="text-align:justify;"><span style="font-family:verdana,geneva;font-size:small;">&nbsp;</span></p>
<p style="text-align:justify;"><span style="font-family:verdana,geneva;font-size:small;">Important call out is the list of supported Microsoft Server Software, <a href="http://support.microsoft.com/kb/2721672"><b>here</b></a> is a support KB that announces supported MS products to run on Azure virtual machines. If your application is custom server application then it may require to pass through typical test cycle. <a href="http://azure.microsoft.com/en-us/status/">Azure Status Dashboard</a> is a handy utility that gives a niche service status view for each Azure services.</span></p>
<p style="text-align:justify;"><span style="font-family:verdana,geneva;font-size:small;">I am keen to uncover possibilities with IaaS and other MS Server products. Looking forward to spend some more time in near future and share the experience.</span></p>
<p style="text-align:justify;"><span style="font-family:verdana,geneva;font-size:small;">&nbsp;</span></p>
<p>Hope this helps! Cheers!</p>
<p><span style="font-family:verdana,geneva;"><strong><span style="font-size:medium;"><a href="http://www.linkedin.com/pub/bhavesh-shastri/15/621/878">Bhavesh Shastri</a></span></strong></span><b></b></p>]]></content:encoded>
    </item>
    <item>
      <title>Silently Remove (Un-configure) Organizations configured for CRM Outlook Client</title>
      <link>https://docs.microsoft.com/archive/blogs/bshastri/silently-remove-un-configure-organizations-configured-for-crm-outlook-client</link>
      <pubDate>Sun, 22 Jun 2014 02:57:46 GMT</pubDate>
      <dc:creator><![CDATA[Bhavesh Shastri]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/bshastri/2014/06/22/silently-remove-un-configure-organizations-configured-for-crm-outlook-client/</guid>
      <description><![CDATA[Greetings!
I faced this question from a friend and colleague pointing out my previous post on...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family:verdana,geneva;font-size:small;">Greetings!</span></p>
<p style="text-align:justify;"><span style="font-family:verdana,geneva;font-size:small;">I faced this question from a friend and colleague pointing out my previous post on <a href="/b/bshastri/archive/2014/01/05/silent-configuration-of-crm-for-outlook-client-in-crm-2011-claims-enabled-environment.aspx">silently configuring CRM Outlook Client</a>. Ask was coming from a need to remove all the configured organization for a bunch of CRM for Outlook clients. Not so uncommon, could be testing, upgrade or migration scenarios. Here is the script which does the job. It&rsquo;s a batch script, no frills and can be hooked to as logon script through Active Directory.</span></p>
<p><span style="font-family:verdana,geneva;font-size:small;">Snippet of the script:</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/45/RemoveCRMConfig.jpg" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-45/RemoveCRMConfig.jpg"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/45/RemoveCRMConfig.jpg" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-45/RemoveCRMConfig.jpg" alt=" " border="0" /></a></p>
<p>The script file is available on <a href="http://gallery.technet.microsoft.com/Silently-Remove-Un-ef795bb4">TechNet Gallery</a>.</p>
<p style="text-align:justify;"><span style="font-family:verdana,geneva;font-size:small;">In Above script, configuration log file is written to C: drive in crmclientinstall.log file. Logging can be disabled by removing /l switch and log file path-filename from ConfigWizard.exe parameters. This path can be changed as per the requirement and log file contains useful information for troubleshooting.</span></p>
<p style="text-align:justify;"><span style="font-family:verdana,geneva;font-size:small;">Ideally, this script should be attached as <b>User logon script</b> through Active Directory Group Policy Object and advisable to enable group policy &ldquo;Run Logon Script Visible&rdquo;. TechNet <a href="http://technet.microsoft.com/en-us/library/cc781361(v=ws.10).aspx">page</a> describes how to attach User logon script and other TechNet <a href="http://technet.microsoft.com/en-us/library/cc776678(v=ws.10).aspx">page</a> describes how to create a GPO.</span></p>
<p><span style="font-family:verdana,geneva;font-size:small;">Hope this helps! Cheers!</span></p>
<p><a href="http://www.linkedin.com/pub/bhavesh-shastri/15/621/878">Bhavesh Shastri</a></p>]]></content:encoded>
    </item>
    <item>
      <title>How to Create MS CRM organizations from file (list) using PowerShell</title>
      <link>https://docs.microsoft.com/archive/blogs/bshastri/how-to-create-ms-crm-organizations-from-file-list-using-powershell</link>
      <pubDate>Wed, 21 May 2014 07:59:30 GMT</pubDate>
      <dc:creator><![CDATA[Bhavesh Shastri]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/bshastri/2014/05/21/how-to-create-ms-crm-organizations-from-file-list-using-powershell/</guid>
      <description><![CDATA[Create CRM organizations from file (list) using PowerShell
Hello Everyone!
Sometime back I came...]]></description>
      <content:encoded><![CDATA[<p><b>Create CRM organizations from file (list) using PowerShell</b></p>
<p>Hello Everyone!</p>
<p>Sometime back I came across need for provisioning a bunch of CRM organizations for users/participants in Test/Lab environment. I had the CRM 2013 deployment and the list of participants but wasn&rsquo;t really interested in clicking through the new organization wizard for 45+ times. So thought of using CRM 2013 PowerShell cmdlets to get those orgs provisioned. After bit of digging on cmdlets and couple of trial runs I could get a PowerShell Script that takes csv file as parameter and create CRM organization for each name in the parameter file.</p>
<p>Here is an extract of the script that I used for the purpose, full script file is available for download on same post.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/45/script%20screenshot.jpg" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-45/script-screenshot.jpg"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/45/script%20screenshot.jpg" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-45/script-screenshot.jpg" alt=" " border="0" /></a></p>
<p>&nbsp;</p>
<p>In above script organization name is same as username and an AD account was created by another PowerShell Script, i.e. - John Doe user&rsquo;s AD account name is JDoe, Orgname is JDoe and same username is passed as &ndash;Sysadmin so user would be added with CRM System Administrator role to his/her organization. TechNet community galleries carries a good document and also samples of scripts that can be used to create AD users from a CSV file. One may also be able to find some good ones with a quick internet search&hellip;</p>
<p>Here is how the .csv file looks like that should be passed as parameter for above script. Additional fields can be provided in .csv file as per requirement given the script above is modified to parse/use those fields.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/45/csv%20file.jpg" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-45/csv-file.jpg"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/45/csv%20file.jpg" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-45/csv-file.jpg" alt=" " border="0" /></a></p>
<p>Icing would be to have an IFD enabled CRM deployment. In such case, it becomes necessary to create DNS records for each organization URL. For that, I employed another script which used DNSCMD command to add records consuming same .csv file that was parameter for org creation PowerShell Script. Here is <a href="http://technet.microsoft.com/en-us/library/cc756116(v=WS.10).aspx">TechNet link</a> that describes DNSCMD and options.</p>
<p></p>
<p>Hope this helps!</p>
<p>Thank you!</p>
<p><a href="http://www.linkedin.com/pub/bhavesh-shastri/15/621/878">Bhavesh Shastri</a></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/telligent.evolution.components.attachments/01/9645/00/00/03/63/11/84/script.txt" original-url="http://blogs.technet.com/cfs-filesystemfile.ashx/__key/telligent-evolution-components-attachments/01-9645-00-00-03-63-11-84/script.txt">script.txt</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Dynamics CRM IFD on Windows server 2012 R2 ADFS - CRM Addin for Outlook</title>
      <link>https://docs.microsoft.com/archive/blogs/bshastri/dynamics-crm-ifd-on-windows-server-2012-r2-adfs-crm-addin-for-outlook</link>
      <pubDate>Thu, 20 Mar 2014 09:39:22 GMT</pubDate>
      <dc:creator><![CDATA[Bhavesh Shastri]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/bshastri/2014/03/20/dynamics-crm-ifd-on-windows-server-2012-r2-adfs-crm-addin-for-outlook/</guid>
      <description><![CDATA[Dynamics CRM IFD on Windows server 2012 R2 ADFS (aka ADFS 3.0) &ndash; CRM Addin for...]]></description>
      <content:encoded><![CDATA[<h1><b><span style="color:#2e74b5;font-family:Calibri Light;">Dynamics CRM IFD on Windows server 2012 R2 ADFS (aka ADFS 3.0) &ndash; CRM Addin for Outlook</span></b></h1>
<p><span style="font-family:Calibri;font-size:medium;">Hearing questions on previous </span><a href="/b/bshastri/archive/2014/03/07/configuring-dynamics-crm-ifd-with-windows-server-2012-r2-ad-fs-i-e-ad-fs-3-0.aspx"><span style="color:#0000ff;font-family:Calibri;font-size:medium;">post</span></a><span style="font-family:Calibri;font-size:medium;"> I thought of checking CRM Outlook on the same VM. Luckily I didn&rsquo;t nuke it right after the purpose so could get the CRM for Outlook Configuration Wizard spinning by starting Windows 7 VM, installing Office and CRM for Outlook.</span></p>
<p><span style="font-family:Calibri;font-size:medium;">Configuration wizard prompted for credentials, thrown an error after I entered credentials. Looking at config log it seemed like authentication failure. Here is snippet from configuration log:</span></p>
<p><span style="font-family:Times New Roman;">07:50:38| Error| Error connecting to URL: https://crm.contoso.com:444/XRMServices/2011/Discovery.svc Exception: Microsoft.Crm.CrmException: Authentication failed<br />&nbsp;&nbsp; at Microsoft.Crm.Outlook.ClientAuth.ClaimsBasedAuthProvider`1.AuthenticateClaims()<br />&nbsp;&nbsp; at Microsoft.Crm.Outlook.ClientAuth.ClaimsBasedAuthProvider`1.SignIn()<br />&nbsp;&nbsp; at Microsoft.Crm.Outlook.ClientAuth.ClientAuthProvidersFactory`1.SignIn(Uri endPoint, Credential credentials, AuthUIMode uiMode, IClientOrganizationContext context, Form parentWindow, Boolean retryOnError)<br />&nbsp;&nbsp; at Microsoft.Crm.Application.Outlook.Config.DeploymentsInfo.DeploymentInfo.LoadOrganizations(AuthUIMode uiMode, Form parentWindow, Credential credentials)<br />&nbsp;&nbsp; at Microsoft.Crm.Application.Outlook.Config.DeploymentsInfo.InternalLoadOrganizations(OrganizationDetailCollection orgs, AuthUIMode uiMode, Form parentWindow)</span></p>
<p><span style="font-family:Calibri;"><span style="font-size:medium;">Above stack and exception from CRM doesn&rsquo;t tell me the cause of failure, looking the ADFS event logs and debug tracing also left me clueless. Learnt from Fiddler trace that it&rsquo;s a 503 Service Unavailable for the mex endpoint of ADFS, i.e. - <a href="https://sts.contoso.com/adfs/services/trust/mex"><span style="color:#0000ff;">https://sts.contoso.com/adfs/services/trust/mex</span></a>. Browsed mex end point URL in IE to see 503 and again looked at ADFS event logs and debug trace but nothing relevant. Restarted ADFS service to see if there is something and I see it&rsquo;s an error telling it couldn&rsquo;t enable FS endpoints. </span></span></p>
<p><span style="font-family:Times New Roman;">Event ID:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 102<br />Description:<br />There was an error in enabling endpoints of Federation Service. Fix configuration errors using PowerShell cmdlets and restart the Federation Service. <br />&nbsp;<br />Additional Data <br />Exception details: <br />System.ServiceModel.AddressAlreadyInUseException: There is already a listener on IP endpoint 0.0.0.0:808. This could happen if there is another application already listening on this endpoint or if you have multiple service endpoints in your service host with the same IP endpoint but with incompatible binding configurations. ---&gt; System.Net.Sockets.SocketException: Only one usage of each socket address (protocol/network address/port) is normally permitted</span><span style="font-family:Calibri;font-size:medium;">&nbsp;</span></p>
<p><span style="font-family:Calibri;font-size:medium;">Reason is clear and this VM being CRM server I know its CRM Sandbox service listening on 808 port, TechNet </span><a href="http://technet.microsoft.com/en-us/library/hh699823.aspx"><span style="color:#0000ff;font-family:Calibri;font-size:medium;">reference</span></a><span style="font-family:Calibri;font-size:medium;">. This is where an ADFS configuration option comes handy. NetTcpPort is a setting available with ADFS tells ADFS to use a port other than 808, </span><a href="http://social.technet.microsoft.com/wiki/contents/articles/2009.ad-fs-2-0-how-to-change-the-net-tcp-ports-for-services-and-administration.aspx"><span style="color:#0000ff;font-family:Calibri;font-size:medium;">here</span></a><span style="font-family:Calibri;font-size:medium;"> is an article referring this setting. After setting my ADFS service to use port 809 using below PowerShell command and restarting ADFS service, mex endpoint could be browsed normally and so my CRM for Outlook configuration worked like a song.</span></p>
<p><span style="font-family:Calibri;font-size:medium;">Set-ADFSProperties &ndash;nettcpport 809</span></p>
<p><span style="font-family:Calibri;font-size:medium;">&nbsp;</span></p>
<p><span style="font-family:Calibri;font-size:medium;">Hope this helps and Thank you!</span></p>
<p><a href="http://www.linkedin.com/pub/bhavesh-shastri/15/621/878"><span style="color:#0000ff;font-family:Calibri;font-size:medium;">Bhavesh Shastri</span></a></p>
<p><span style="font-family:Calibri;font-size:medium;">&nbsp;</span></p>
<p></p>]]></content:encoded>
    </item>
    <item>
      <title>Silent configuration of CRM for Outlook client in CRM 2011 claims enabled environment</title>
      <link>https://docs.microsoft.com/archive/blogs/bshastri/silent-configuration-of-crm-for-outlook-client-in-crm-2011-claims-enabled-environment</link>
      <pubDate>Thu, 06 Mar 2014 17:47:07 GMT</pubDate>
      <dc:creator><![CDATA[Bhavesh Shastri]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/bshastri/2014/03/06/silent-configuration-of-crm-for-outlook-client-in-crm-2011-claims-enabled-environment/</guid>
      <description><![CDATA[Hi Folks, Today I&rsquo;m going to talk about CRM Outlook Silent configuration.
CRM 2011 Outlook...]]></description>
      <content:encoded><![CDATA[<p>Hi Folks,<br /><br /> Today I&rsquo;m going to talk about CRM Outlook Silent configuration.</p>
<p align="left">CRM 2011 Outlook client provides silent configuration option to help administrators to deal with situations where users are remote, travelling and/or non-savvy to run Configuration Wizard with correct inputs. Configuring CRM 2011 Outlook client using silent method in a claims enabled environment can pose a challenge. The client Configuration Wizard when run in claims enabled environment and silent (/Q switch); the wizard expects the user&rsquo;s CRM credentials in Credential Manager (a.k.a. Windows Vault) found in Control Panel-&gt;User Account-&gt;Manage your Credentials. In case of non-silent configuration when it doesn&rsquo;t find CRM credential in Windows Vault it prompts user to enter CRM credentials and saves it to Vault based on user input for remembering credentials.</p>
<p><img alt=" " src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/25/bhavesh/7838.logon-claims.png" original-url="http://blogs.msdn.com/cfs-filesystemfile.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-25-bhavesh/7838.logon_2D00_claims.png" border="0" /></p>
<p align="left">In case of silent configuration (i.e. /Q switch with Microsoft.Crm.Application.Outlook.ConfigWizard.exe) user&rsquo;s credentials are expected in the Windows Vault. If configuration wizard doesn&rsquo;t find the credentials or it&rsquo;s not in required format, the wizard fails to configure the client and error like below is reported in configuration log file:</p>
<h1 class="topicHead">Stack Trace</h1>
<p class="codesnippet">13:43:35| Error| Error connecting to URL: https://orgname.domain.com/XRMServices/2011/Discovery.svc Exception: Microsoft.Crm.CrmException: Credentials required <br /> at Microsoft.Crm.Outlook.ClientAuth.ClaimsBasedAuthProvider`1.AuthenticateClaims() <br /> at Microsoft.Crm.Outlook.ClientAuth.ClaimsBasedAuthProvider`1.SignIn() <br /> at Microsoft.Crm.Outlook.ClientAuth.ClientAuthProvidersFactory`1.SignIn(Uri endPoint, Credential credentials, AuthUIMode uiMode, IClientOrganizationContext context, Form parentWindow, Boolean retryOnError) <br /> at Microsoft.Crm.Application.Outlook.Config.DeploymentsInfo.DeploymentInfo.LoadOrganizations(AuthUIMode uiMode, Form parentWindow, Credential credentials) <br /> at Microsoft.Crm.Application.Outlook.Config.DeploymentsInfo.InternalLoadOrganizations(OrganizationDetailCollection orgs, AuthUIMode uiMode, Form parentWindow) <br /> 13:43:35| Error| Exception : Credentials required at Microsoft.Crm.Application.Outlook.Config.DeploymentsInfo.LoadOrganizations(AuthUIMode uiMode, Form parentWindow) <br /> at Microsoft.Crm.Application.Outlook.Config.ClientConfig.AddDeployment(DeploymentsDeployment[] deployments, AuthUIMode uiMode) <br /> at Microsoft.Crm.Application.Outlook.Config.ClientConfig.Run(Boolean runInsideOutlook) <br /> at Microsoft.Crm.Application.Outlook.Config.ClientConfig.Start(String[] args, Boolean runInsideOutlook) <br /> 13:43:35|Verbose| Method entry: Microsoft.Crm.Application.Outlook.Config.ClientConfig.Terminate <br /> 13:43:35| Info| Exit code: Failure <br /> 13:43:35|Verbose| Method exit: Microsoft.Crm.Application.Outlook.Config.ClientConfig.Terminate <br /> 13:43:35| Info| === Microsoft Dynamics CRM for Outlook Configuration Wizard logging stopped: 10/30/2012 1:43:35 PM ===</p>
<h1 class="topicHead">Possible Solution/Recommendations</h1>
<p>Simple solution is to add the credentials to Windows Vault before running configuration wizard; same is described in this <a href="http://blogs.msdn.com/b/crminthefield/archive/2011/02/23/configuring-the-crm-online-2011-outlook-client-silently.aspx"> blog</a> post by field engineering team. In case silent configuration and/or non-savvy user this could be a challenge for system administrators.</p>
<p>Cmdkey command can be great help in this situation. Here is TechNet document describing cmdkey command <a href="http://technet.microsoft.com/en-us/library/cc754243(v=WS.10).aspx" target="_blank">http://technet.microsoft.com/en-us/library/cc754243(v=WS.10).aspx</a>. <br /> This command can be used in logon batch script like below example to add the credentials before running the Configuration Wizard and then calling the Microsoft.Crm.Application.Outlook.ConfigWizard.exe with required switches and parameters.</p>
<h1 class="topicHead">Here is the sample logon script:</h1>
<p><span class="codesnippet">@echo off <br /> ECHO Logon Script to configure CRM Outlook client <br /> @echo on <br /> @echo off <br /> reg query HKCU\Software\Microsoft\MSCRMClient /v OrgId <br /> IF errorlevel=1 ( GOTO Configure) ELSE ( GOTO End) <br /> :Configure <br /> cmdkey /generic:Microsoft_CRM_https://<strong>orgname</strong>.<strong>domain</strong>.com/ /user:%username%@%userdnsdomain% /pass <br /> ECHO Configuring CRM Outlook client <br /> cd C:\Program Files (x86)\Microsoft Dynamics CRM\Client\ConfigWizard <br /> Microsoft.Crm.Application.Outlook.ConfigWizard.exe /Q /i c:\config.xml /l c:\crmclientinstall.log <br /> :End <br /> ECHO CRM Outlook client is configured. <br /> PAUSE <br /> EXIT </span></p>
<h1 class="topicHead">Basic requirements</h1>
<p>There are few basic requirements for the entry made to Windows Vault;</p>
<ul>
<li>It must be added as generic credential</li>
<li>Internet or Network Address must specified as Microsoft_CRM_https://<strong>orgname</strong>.<strong>domain</strong>.com/ (don&rsquo;t miss the slash (/) at the end of URL)</li>
<li>The Username must be in UPN format, i.e.@. E.g. &ndash; Jdoe@contoso.com.</li>
</ul>
<p><br /> When using CMDKEY command with /pass switch and w/o password supplied as parameter CMDKEY prompts for password. To get this command to work as part of logon script it&rsquo;s mandatory that you have Run Logon Script Visible Group policy enabled. Run logon scripts visible can be found under User Configuration\Administrative Templates\System\Script and here is TechNet document describing this policy. http://technet.microsoft.com/en-us/library/cc975927.aspx</p>
<p>Thanks &amp; Regards<br />Bhavesh Shastri</p>]]></content:encoded>
    </item>
    <item>
      <title>Configuring Dynamics CRM IFD with Windows Server 2012 R2 AD FS (ADFS 3.0)</title>
      <link>https://docs.microsoft.com/archive/blogs/bshastri/configuring-dynamics-crm-ifd-with-windows-server-2012-r2-ad-fs-adfs-3-0</link>
      <pubDate>Thu, 06 Mar 2014 09:27:00 GMT</pubDate>
      <dc:creator><![CDATA[Bhavesh Shastri]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/bshastri/2014/03/06/configuring-dynamics-crm-ifd-with-windows-server-2012-r2-ad-fs-adfs-3-0/</guid>
      <description><![CDATA[Configuring Dynamics CRM IFD with Windows Server 2012 R2 AD FS (ADFS 3.0)
Hello Everyone!
I was...]]></description>
      <content:encoded><![CDATA[<p><span style="color:#0000ff;font-family:verdana,geneva;font-size:medium;"><b><span>Configuring Dynamics CRM IFD with Windows Server 2012 R2 AD FS (ADFS 3.0)</span></b></span></p>
<p><span style="font-family:Calibri;font-size:medium;">Hello Everyone!</span></p>
<p><span style="font-family:Calibri;font-size:medium;">I was checking how Dynamics CRM IFD goes with new version of AD FS that comes along with Windows Server 2012 R2 (i.e. - ADFS 3.0) and internet search yielded hazy or misleading information. Somewhere it said WAP (Web Application Proxy) is a must which perplexed me more. So thought of setting it up in lab to see what it looks like. Now I have it working in my one VM lab environment and writing this post to share some key experiences.</span></p>
<p><span style="font-family:Calibri;font-size:medium;">I had all the CRM pre-requisites in place and got CRM 2013 website working normally. Curious enough I installed, configured AD FS and configured Claims URL for CRM which worked as expected, woo! My first milestone. Obviously, next was to get IFD URL working. Got configuration in place on both AD FS and CRM side and testing IFD URL was not too big of a surprise, I got an error from my STS before I got the sign-in page prompting for username and password. This is what the error reads like in UI:</span></p>
<p>An error occurred. Contact your administrator for more information. <br />Error details<br />&bull;Activity ID: 00000000-0000-0000-0d00-0080000000fd<br />&bull;Relying party: crmauth.namma.com<br />&bull;Error time: Thu, 06 Mar 2014 14:58:06 GMT<br />&bull;Cookie: enabled<br />&bull;User agent string: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.3; WOW64; Trident/7.0; Touch; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729; InfoPath.3)</p>
<p><span style="font-family:Calibri;font-size:medium;">Here is the report in Event Viewer:</span></p>
<p style="margin:0in 0in 8pt;">Log Name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AD FS/Admin<br />Source:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AD FS<br />Date:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3/6/2014 6:58:06 AM<br />Event ID:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 364<br />Task Category: None<br />Level:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Error<br />Keywords:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AD FS<br />User:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BSHASTRIDOMAIN\bshastri<br />Computer:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bshastriw2012.bshastridomain.local<br />Description:<br />Encountered error during federation passive request.</p>
<p style="margin:0in 0in 8pt;">Additional Data <br />Protocol Name: <br />wsfed <br />Relying Party: <br /><a href="https://crm.namma.com:444/">https://crm.namma.com:444/</a></p>
<p style="margin:0in 0in 8pt;">Exception details: <br />Microsoft.IdentityServer.Service.Policy.PolicyServer.Engine.InvalidAuthenticationTypePolicyException: <span style="background-color:#ffff00;">MSIS7102: Requested Authentication Method is not supported on the STS.</span><br />&nbsp;&nbsp; at Microsoft.IdentityServer.Web.Authentication.GlobalAuthenticationPolicyEvaluator.EvaluatePolicy(IList`1 mappedRequestedAuthMethods, AccessLocation location, ProtocolContext context, HashSet`1 authMethodsInToken, Boolean&amp; validAuthMethodsInToken)<br />&nbsp;&nbsp; at Microsoft.IdentityServer.Web.Authentication.AuthenticationPolicyEvaluator.RetrieveFirstStageAuthenticationDomain(Boolean&amp; validAuthMethodsInToken)<br />&nbsp;&nbsp; at Microsoft.IdentityServer.Web.Authentication.AuthenticationPolicyEvaluator.EvaluatePolicy(Boolean&amp; isLastStage, AuthenticationStage&amp; currentStage, Boolean&amp; strongAuthRequried)<br />&nbsp;&nbsp; at Microsoft.IdentityServer.Web.PassiveProtocolListener.GetAuthMethodsFromAuthPolicyRules(PassiveProtocolHandler protocolHandler, ProtocolContext protocolContext)<br />&nbsp;&nbsp; at Microsoft.IdentityServer.Web.PassiveProtocolListener.GetAuthenticationMethods(PassiveProtocolHandler protocolHandler, ProtocolContext protocolContext)<br />&nbsp;&nbsp; at Microsoft.IdentityServer.Web.PassiveProtocolListener.OnGetContext(WrappedHttpListenerContext context)</p>
<p style="margin:0in 0in 8pt;"></p>
<p><span style="font-family:Calibri;font-size:medium;">After good digging around on above exception telling &ldquo;Requested Authentication Method is not supported&hellip;.&rdquo; I found the configuration setting which dictates allowed Authentication Methods. This is under AD FS Management Console-&gt;Authentication Policies-&gt;Global Settings-&gt;Edit-&gt;. Here is a screenshot:</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/45/6320.ADFS3.0.jpg" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-45/6320.ADFS3.0.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/45/6320.ADFS3.0.jpg" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x772/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-45/6320.ADFS3.0.jpg" border="0" /></a></p>
<p><span style="font-family:Calibri;font-size:medium;">&nbsp;</span></p>
<p><span style="font-size:medium;"><span style="font-family:Calibri;">I am on one box setup and browsing IFD URL locally so my request is surely being considered from Intranet by whatever logic is used to decide source of request. I am not sure on what basis a request is labeled Intranet or Extranet by AD FS 3.0, that&rsquo;s different investigation I am keen on:)</span><span style="font-family:Calibri;">. &nbsp;Back to the exception, checking Form Authentication method for Intranet allowed to get IFD URL working. This guess was based on the fact that CRM does ask for Form Based Authentication when we browse IFD URL. Below are redirection URLs given by CRM with different wauth parameters:</span></span></p>
<p><span style="font-family:Calibri;font-size:medium;">Browsing internal CRM URL asks for Integrated Authentication:</span></p>
<p>https://sts.namma.com/adfs/ls/?wa=wsignin1.0&amp;amp;wtrealm=https%3a%2f%2fcrmint.namma.com%3a444%2f&amp;amp;wctx=rm%3d1%26id%3ded7bd6f6-ca7a-4cf1-ab8d-6a07fc3c3773%26ru%3d%252fdefault.aspx&amp;amp;wct=2014-03-06T16%3a25%3a38Z&amp;amp;<span style="background-color:#ffff00;">wauth=urn%3afederation%3aauthentication%3awindows</span></p>
<p><span style="font-family:Calibri;font-size:medium;">Browsing external CRM URL asks for Integrated Authentication:</span></p>
<p>https://sts.namma.com/adfs/ls/?wa=wsignin1.0&amp;amp;wtrealm=https%3a%2f%2fcrm.namma.com%3a444%2f&amp;amp;wctx=rm%3d1%26id%3ddf0e3ef6-ddd0-4d13-ad61-086239cf5ffc%26ru%3dhttps%253a%252f%252fcrm.namma.com%253a444%252fdefault.aspx&amp;amp;wct=2014-03-06T16%3a22%3a27Z&amp;amp;<span style="background-color:#ffff00;">wauth=urn%3aoasis%3anames%3atc%3aSAML%3a1.0%3aam%3apassword</span></p>
<p><span style="font-family:Calibri;font-size:medium;">Wauth parameter reference can be found </span><a href="http://msdn.microsoft.com/en-us/library/77c337e9-e11c-4747-a3cd-ea8faebc9496.aspx#id14"><span style="color:#0000ff;font-family:Calibri;font-size:medium;">here</span></a><span style="font-family:Calibri;font-size:medium;"> on TechNet. </span></p>
<p></p>
<p><span style="font-family:Calibri;font-size:medium;">Hope this helps!</span></p>
<p><span style="font-family:Calibri;font-size:medium;">Thank you!</span></p>
<p><a href="http://www.linkedin.com/pub/bhavesh-shastri/15/621/878"><span style="color:#0000ff;font-family:Calibri;font-size:medium;">Bhavesh Shastri</span></a></p>]]></content:encoded>
    </item>
    <item>
      <title>Unexpected/Inaccurate federation metadata XML generated by CRM federation metadata URLs</title>
      <link>https://docs.microsoft.com/archive/blogs/bshastri/unexpectedinaccurate-federation-metadata-xml-generated-by-crm-federation-metadata-urls</link>
      <pubDate>Sun, 05 Jan 2014 01:44:00 GMT</pubDate>
      <dc:creator><![CDATA[Bhavesh Shastri]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/bshastri/2014/01/05/unexpectedinaccurate-federation-metadata-xml-generated-by-crm-federation-metadata-urls/</guid>
      <description><![CDATA[Hi All,
Today we&rsquo;re are going to talk about the unexpected/Inaccurate federation metadata XML...]]></description>
      <content:encoded><![CDATA[<p>Hi All,</p>
<p>Today we&rsquo;re are going to talk about the unexpected/Inaccurate federation metadata XML generated by CRM federation metadata URLs. I have seen many people getting into this. Let&rsquo;s take a deep dive into usage of federation into CRM.</p>
<p>We all know that CRM 2011 uses AD FS 2.0 to provide claims based authentication. For AD FS STS (Security Token Service) to provide a Security Token (SAML Token) for CRM application to consume AD FS has to know some basic information like format, content (basically claims) etc. so that the Token issued by AD FS STS is consumable by CRM application.</p>
<p>Being application&rsquo;s requirement CRM 2011 has to tell AD FS on what format, information it should have SAML token. CRM 2011 achieved this by providing Federation Metadata URL from which AD FS can retrieve the Federation Metadata for CRM application.</p>
<p>CRM maintains separate external and internal endpoints so it can tell AD FS to authenticate the internal users (users on the company network/VPN) to be authenticated using Kerberos authentication and the external users using AD FS form based authentication. Here is a sample of what external and internal URL may look like:</p>
<h3 class="topicHead">External Federation metadata URL:</h3>
<p>https://crmauth.namma.com/FederationMetadata/2007-06/FederationMetadata.xml</p>
<h3 class="topicHead">Internal Federation metadata URL:</h3>
<p>https://crmint.namma.com/FederationMetadata/2007-06/FederationMetadata.xml</p>
<p>Further to clarify internal Federation metadata URL is the one which you specify on Web Address tab of Deployment Properties in Deployment Manager tab. External Federation metadata URL is the one specified in text box &ldquo;Enter the external domain where your Internet-lacing servers are located:&rdquo; on 3rd page on Configure Internet Facing Deployment wizard in Deployment manager.</p>
<p>Ideally, both internal and external Federation Metadata XML has different CRM endpoints specified to tell AD FS to differentiate the authentication behavior.</p>
<p>In odd situations you may see both internal and external CRM federation metadata URLs returning external end points in XML. When such wrong end points are given by internal federation metadata URL, browsing internal URL shown AD FS sign-in page, 404 on providing credentials on the AD FS sign-in page.</p>
<h3 class="topicHead">Here are screenshots for pictorial representation of this behavior:</h3>
<p><img alt=" " src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/25/bhavesh/0285.1.png" original-url="http://blogs.msdn.com/cfs-filesystemfile.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-25-bhavesh/0285.1.png" border="0" /></p>
<p><img alt=" " src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/25/bhavesh/8132.2.png" original-url="http://blogs.msdn.com/cfs-filesystemfile.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-25-bhavesh/8132.2.png" border="0" /></p>
<p><img alt=" " src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/25/bhavesh/8780.3.png" original-url="http://blogs.msdn.com/cfs-filesystemfile.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-25-bhavesh/8780.3.png" border="0" /></p>
<p><img alt=" " src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/25/bhavesh/2425.4.png" original-url="http://blogs.msdn.com/cfs-filesystemfile.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-25-bhavesh/2425.4.png" border="0" /></p>
<p>You can see in above example that both internal and external URL exhibits external endpoints which is unexpected.</p>
<p>This behavior happens when there is default port number specified with Internal URL under deployment properties. Port 443 is not required when HTTPS (SSL) is specified as its default port for HTTPS communication. However, there could be a situation in which CRM website HTTPS bindings has a custom port specified e.g. 444. In such scenarios one have to specify port 444 explicitly as its not known to be HTTPS communications port. Removing the port number 443 gives expected Federation Metadata XML. In other words, specifying internal URL like internalcrm.crm.namma.com instead of internalcrm.crm.namma.com:443 followed by IIS reset returns expected behavior.</p>
<h3 class="topicHead">Here is a sample screenshot:</h3>
<p><img alt=" " src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/25/bhavesh/6560.CRM%20Properties%20-%20Claims.png" original-url="http://blogs.msdn.com/cfs-filesystemfile.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-25-bhavesh/6560.CRM-Properties-_2D00_-Claims.png" border="0" /></p>
<p>Thanks-<br /> Bhavesh Shastri</p>]]></content:encoded>
    </item>
  </channel>
</rss>