<?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>jtarquino</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/jtarquino/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/jtarquino/feed.xml</link>
    <description />
    <lastBuildDate>Thu, 17 Aug 2017 23:59:20 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Testing Power BI Report Server Setup using Azure DevTestLabs and Visual Studio Team Services (VSTS)</title>
      <link>https://docs.microsoft.com/archive/blogs/jtarquino/testing-power-bi-report-server-setup-using-devtestlabs</link>
      <pubDate>Wed, 09 Aug 2017 20:11:08 GMT</pubDate>
      <dc:creator><![CDATA[Jaime Tarquino]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jtarquino/?p=825</guid>
      <description><![CDATA[&nbsp; One of the cool things about working in Microsoft is that we have plenty&nbsp; of resources...]]></description>
      <content:encoded><![CDATA[<p>&nbsp;</p> <p>One of the cool things about working in Microsoft is that we have plenty&nbsp; of resources as internal as externals to solve the engineering problem. With the new setup for the Power BI Report Server we have the option to use our traditional test system or try something new, <a href="https://azure.microsoft.com/en-us/services/devtest-lab/">Azure DevTest Labs</a> offer some of the features that are attractive for this type of end to end testing</p> <ul> <li>Quick provision of fresh new machines to install the product  <li>Automatic expiration of lab machines  <li>Integration with Visual Studio Team Services (VSTS) <li>Secret management (integration with KeyVault)</li></ul> <p>DevTestLabs offer more features that we might use in the future.</p> <p>The workflow is:</p> <ol> <li>A download path for the to the latest build of PowerBIReportServer.exe is commited to the Git repo where the setup tests code is.  <li>The build process starts (as part of the VSTS continuous&nbsp; integration configuration), builds the test bits and download the setup file  <li>A new machine is created in DevTestLabs (with SQL Server Engine and configured with access from VSTS)  <li>The tests bits are copied to the machine and tests are executed</li></ol> <p>The workflow is simple but requires some components that aren’t available natively in VSTS</p> <p>&nbsp;</p> <h2>Setup the machine in DevTestLabs with artifacts</h2> <p>A new DevTestLab environment is created in the Azure Portal the detailed instructions are available in <a href="https://docs.microsoft.com/en-us/azure/devtest-lab/devtest-lab-create-lab">Create a lab in Azure DevTest Labs</a> </p> <p>The machine image is a simple Windows 2016 Server without anything configured on it, for the additional components <a href="https://docs.microsoft.com/en-us/azure/devtest-lab/devtest-lab-artifact-author">DevTestLabs</a> artifacts are used, the artifacts are reusable component to deploy and configure the machine in DevTestLabs.</p> <p>The artifact for installing SQL Server is available in my Git repo <a href="https://github.com/jtarquino/DevTestLabArtifacts/tree/master/artifacts/windows-install-sql">here</a> , you will need to update the placeholder <em>ReplaceWithSQLServerDownloadPath</em> in the InstallSQLServer2016Dev.ps1 with a url where you host your SQL Server 2016 setup bits, the artifact automates the installation of the SQL Server Engine.</p> <p>The second artifact is the configuration of WinRM which is required to be able to execute commands remotely from VSTS, the artifact called InstallWinRM is available <a href="https://github.com/jtarquino/DevTestLabArtifacts/tree/master/artifacts/windows-install-winrm">here</a> , it is based in the instructions to Manage a virtual Machine in Azure DevTest Labs from the visualstudio.com documentation (<a title="https://www.visualstudio.com/en-us/docs/build/apps/cd/azure/deploy-provision-devtest-lab" href="https://www.visualstudio.com/en-us/docs/build/apps/cd/azure/deploy-provision-devtest-lab">https://www.visualstudio.com/en-us/docs/build/apps/cd/azure/deploy-provision-devtest-lab</a>) and the great blog post from Tarun Aurora <a title="https://www.visualstudiogeeks.com/blog/DevOps/Configure-winrm-with-ARM-template-in-AzureDevTestLab-VM-deployment-using-PowerShell-artifact" href="https://www.visualstudiogeeks.com/blog/DevOps/Configure-winrm-with-ARM-template-in-AzureDevTestLab-VM-deployment-using-PowerShell-artifact">https://www.visualstudiogeeks.com/blog/DevOps/Configure-winrm-with-ARM-template-in-AzureDevTestLab-VM-deployment-using-PowerShell-artifact</a>.</p> <p>Those artifacts are hosted in the team’s internal VSTS repo dedicated to artifacts, to configure the repo follow the instructions to <a href="https://docs.microsoft.com/en-us/azure/devtest-lab/devtest-lab-add-artifact-repo">Add a Git repository to store custom artifacts and Azure Resource Manager templates for use in Azure DevTest Labs</a>.</p> <p>You can test the provision of the new machine creating a new VM in the DevTestLabs, the two new artifacts should show up in the artifacts section</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/08/image129.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/08/image_thumb107.png" width="442" height="441"></a></p> <h2>Arm template</h2> <p>For the automation of the process capture the ARM Template for detailed instructions check <a href="https://docs.microsoft.com/en-us/azure/devtest-lab/devtest-lab-use-resource-manager-template">View and save a virtual machine's Resource Manager template</a>&nbsp; (the sample with the artifacts configured is available <a href="https://github.com/jtarquino/DevTestLabArtifacts/blob/master/ArmTemplate/Windows2016WithSQL.json">here</a>)</p> <p>There are few elements that are modified from the template provided from the Azure Portal </p> <p><em>A new expiration date parameter, </em>it will be used to specify when the machine should be deleted automatically</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/08/image130.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/08/image_thumb108.png" width="521" height="294"></a></p> <p>&nbsp;</p> <p><em>A new variable of the hostDns </em>with the resource group location and the domain of the machine</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/08/image131.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/08/image_thumb109.png" width="492" height="120"></a></p> <p><em>Modified parameter in the InstallWinRm </em>artifact<em> </em>to pass the hostDns variable</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/08/image132.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/08/image_thumb110.png" width="409" height="215"></a></p> <p><em>And finally set the property "disallowPublicIpAddress": false</em> in order to allow every VM to have a public IP address so VSTS can communicate with them using the WinRM port 5986 (if this property is not set the VMs will share the public IP address and will use NAT rules to allow access to the internal ports)</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/08/image133.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/08/image_thumb111.png" width="354" height="134"></a></p> <p>The ARM template should be committed to the same repo where the tests are.</p> <h2>Additional DevTestLab configuration</h2> <p>Use the My Secrets tab in the DevTestLabs to create a password for your VMs, it will create under the covers a KeyVault , check in your list of KeyVault the one with a Secret with the name you just provided, you will need the KeyVault name later for the automation</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/08/image134.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/08/image_thumb112.png" width="448" height="206"></a></p> <p>&nbsp;</p> <h2>Visual Studio Team Services (VSTS)</h2> <p>The Variables look like this</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/08/image135.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;margin: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/08/image_thumb113.png" width="490" height="199"></a></p> <p>There are two new variables added to it the RSSetupCredentials and the VMExpirationDate, those will be used to create the DevTestLab VM, the RSSetupCredentials&nbsp; is marked as secret so it doesn’t show up in the logs, this variables will be set during the Get Password and Expiration Date script in the build tasks</p> <p>&nbsp;</p> <p>The build tasks look like this</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/08/image136.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/08/image_thumb114.png" width="373" height="481"></a></p> <p>The following task have interesting configuration</p> <p><strong>Get Password and Expiration Date</strong> is a call to an Azure PowerShell Task with the the following content</p> <blockquote> <p><font size="2">$expirationDate=(Get-Date).AddDays(2).ToString("yyyy-MM-ddThh:mm:ssZ")<br>Write-Host "##vso[task.setvariable variable=VmExpirationDate]$expirationDate"<br>$RsSetupCredentials=(Get-AzureKeyVaultSecret -VaultName '<strong>testlabc1043838</strong>' -Name 'rsSetupCredentials').SecretValueText<br>Write-Host "##vso[task.setvariable variable=RsSetupCredentials]$setupCredentials"</font></p> <p><font size="2">It sets the expiration date and the credentials for the VM and make it available for all the other tasks in the build, it gets the password from KeyVault, replace it with the name of the KeyVault from your DevTestLab environment</font></p></blockquote> <p><strong>Create Azure DevTest Labs VM</strong></p> <blockquote> <p><font size="2">It uses the parameters just created</font></p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/08/image387.png"><font size="2"><a href="https://msdnshared.blob.core.windows.net/media/2017/08/image388.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/08/image_thumb115.png" width="493" height="322"></a></font></a></p> <p><font size="2"></font></p> <p><font size="2"></font></p> <p><font size="2"></font></p> <p><font size="2"></font></p> <p><font size="2">Important to notice it uses the Build.BuildNumber as the name of the VM so every VM have a unique name, in order to make this work the build name is modified from the default using a dot to a dash $(date:yyyyMMdd)$(rev<font style="background-color: #ffff00">:.r</font>) to $(date:yyyyMMdd)$(rev<font style="background-color: #ffff00">:-r</font>) (it is available in the options tab in the build)</font></p></blockquote> <p><strong>Get Lab Machine Parameters</strong> is a call to an Azure PowerShell Task with the the following content (the script is taken from <a href="https://www.visualstudio.com/en-us/docs/build/apps/cd/azure/deploy-provision-devtest-lab">Create an Azure RM template</a>)</p> <blockquote> <p><font size="2">Param( [string] $labVmId)</font></p> <p><font size="2">$labVmComputeId = (Get-AzureRmResource -Id $labVmId).Properties.ComputeId</font></p> <p><font size="2"># Get lab VM resource group name<br>$labVmRgName = (Get-AzureRmResource -Id $labVmComputeId).ResourceGroupName</font></p> <p><font size="2"># Get the lab VM Name<br>$labVmName = (Get-AzureRmResource –Id</font></p> <p><font size="2">$labVmId).Name</font></p> <p><font size="2"># Get lab VM public IP address<br>$labVMIpAddress = (Get-AzureRmPublicIpAddress -ResourceGroupName $labVmRgName -Name $labVmName).IpAddress</font></p> <p><font size="2"># Get lab VM FQDN<br>$labVMFqdn = (Get-AzureRmPublicIpAddress -ResourceGroupName $labVmRgName -Name $labVmName).DnsSettings.Fqdn</font></p> <p><font size="2"># Set a variable labVmRgName to store the lab VM resource group name<br>Write-Host "##vso[task.setvariable variable=labVmRgName;]$labVmRgName"</font></p> <p><font size="2"># Set a variable labVMIpAddress to store the lab VM Ip address<br>Write-Host "##vso[task.setvariable variable=labVMIpAddress;]$labVMIpAddress"</font></p> <p><font size="2"># Set a variable labVMFqdn to store the lab VM FQDN name<br>Write-Host "##vso[task.setvariable variable=labVMFqdn;]$labVMFqdn"<br></font></p> <p><font size="2">The most important thing about that script ins the FQDN of the VM that will be used later to deploy the test agent</p></font></blockquote> <p>&nbsp;</p> <p><strong>Deploy Test Agent </strong>using the variables created, https and enabling UI tests</p> <blockquote> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/08/image139.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/08/image_thumb116.png" width="451" height="321"></a></p></blockquote> <p><strong>Copy Files , </strong>it is copying the entire content of the repo from the agent to the VM, it can be changed to copy only the test bits or only the resources needed for your test</p> <blockquote> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/08/image140.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/08/image_thumb117.png" width="445" height="287"></a></p></blockquote> <p><strong>Run Tests, </strong>executes the test in the remote machine</p> <blockquote> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/08/image141.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/08/image_thumb118.png" width="448" height="309"></a></p></blockquote> <p>&nbsp;</p> <p>The final task deletes the machine , it will not be executed in case that any of the test fails so the machine is available for 2 days for investigation.</p>]]></content:encoded>
    </item>
    <item>
      <title>Reporting Services Load Testing</title>
      <link>https://docs.microsoft.com/archive/blogs/jtarquino/reporting-services-load-testing</link>
      <pubDate>Sat, 05 Nov 2016 18:54:20 GMT</pubDate>
      <dc:creator><![CDATA[Jaime Tarquino]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jtarquino/?p=605</guid>
      <description><![CDATA[&nbsp; A common ask from consultants and architects working with SQL Server Reporting Services is...]]></description>
      <content:encoded><![CDATA[<p>&nbsp;</p> <p>A common ask from consultants and architects working with SQL Server Reporting Services is about capacity planning and how to validate that the environment proposed will meet the estimated workload, it is a simple question with a very complex answer because there are plenty of variables in an enterprise SQL Server Reporting Services deployment.</p> <p>One of the tools we use in the development team is synthetic load generation using <a href="https://www.visualstudio.com/en-us/docs/test/performance-testing/getting-started/getting-started-with-performance-testing">Visual Studio Load Tests</a>. Simulating every detail of an interaction with the server is a daunting task, so we use synthetic workloads where we favor the flexibility of define different settings in the workload instead of an accurate 1:1 simulation of what will happen in the browser and in the native clients, the load generation is an abstraction that allows us to create workloads in the server in an agile way.</p> <p>Nothing stops you of create your own set of load tests using the different tools that Visual Studio and other tools offers. However<strong>,</strong> you might find it challenging due the complexity of the different APIs and security features you will need to use in order to drive the workload.</p> <p>Ladies and Gentlemen don’t hold your breath and let me introduce you to the <a href="https://github.com/Microsoft/Reporting-Services-LoadTest">Reporting Services Load Test</a> project hosted in GitHub, we welcome you to try it out and contribute to it, this project take care of many or the challenges, although is not for the faint of heart as it have it’s own set of complexities, we have done our best effort in order to document how to use it and all that is written with the world acclaimed style of engineer prose in the <a href="https://github.com/Microsoft/Reporting-Services-LoadTest/blob/master/Readme.md">project readme</a>.</p> <p>The project contains two sample workloads that we use in our development cycle, one called PaginatedLoad<strong>, </strong>it has a mix of paginated reports only, and MixedLoad has a combination of paginated, mobile and portal tests, you can also use the tutorials <a title="How to onboard a new Paginated Reports Scenario" href="https://github.com/Microsoft/Reporting-Services-LoadTest/blob/master/docs/OnboardPaginated.md">How to onboard a new Paginated Reports Scenario</a> and <a href="https://github.com/Microsoft/Reporting-Services-LoadTest/blob/master/docs/OnboardMobile.md">How to onboard a new Mobile Reports Scenario</a> to create your own workloads with your own reports.</p> <p>In case you need to validate your topology but you don’t have any hardware<strong>,</strong> it contains an Azure ARM template that we use in our development cycle to bootstrap a minimal enterprise environment in Azure with the following machines</p> <ul> <li>Domain Controller</li> <li>SQL Server Engine to host the Reporting Services Catalog</li> <li>SQL Server Engine and AS Tabular to host Data Sources</li> <li>SQL Server installation with public DNS to configure Reporting Services</li></ul> <p>This project is very close to my heart as is something that we have had in the team for a long time but never had the chance to share it with the community, also was a challenging project as the code required a “<em>little bit</em>” of cleanup and changes to make it simpler (it’s still complex and it has it’s own personality and quirks as any good old seasoned project).</p> <p>You might be thinking, well all that is good and fancy but what can I do with it besides overwhelming with requests my dear Reporting Services environment?</p> <p>One of the scenarios is to validate that the environment that you are setting up will be able to support your estimated demand, remember that the workload <font style="background-color: #ffffff">is synthetic so is not at 1:1</font> mapping between user and test cases but is an approximation, basically you can take your existing reports, the usage pattern that you expect (from exports and rendering) and create a Load Test with them (see the tutorials and the existing load test samples in the solution).</p> <p>Then you can take the Load Test and run it in your environment and monitor your CPU, memory and windows performance counters to figure out what are your bottlenecks. You can combine that with the metrics that Visual Studio <font style="background-color: #ffffff">Load Test</font> will collect for every report and every scenario like:</p> <ul> <li>Passed Tests / Sec</li> <li>Failed Test / Sec</li> <li>Avg. Response Time</li></ul> <p>Among many others, and use them to figure out when your environment is not able to support the load consistently, for example the image below shows a view of the of the suite reports. <font style="background-color: #ffffff">The</font> test/sec and the passed tests <font style="background-color: #ffffff">increased nicely</font> along with the user load until a bottleneck is reached and then the avg. response time increases and the number of tests/sec drops dramatically.</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2016/11/image189.png"><img title="image" style="border-top: 0px;border-right: 0px;border-bottom: 0px;padding-top: 0px;padding-left: 0px;border-left: 0px;padding-right: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/11/image_thumb172.png" width="1150" height="544"></a></p> <p>This is just one example of the validation you can do with the suite. You can experiment with different work loads, step patterns, combination of tests (actions in the portal) and after you setup one, you only have to change the config file to point it to a different server and run the same workload again (either from Visual Studio Load Test on premises or in the cloud with <a href="https://www.visualstudio.com/en-us/docs/test/performance-testing/getting-started/getting-started-with-performance-testing">Visual Studio Team Services</a> on the cloud)</p> <p>&nbsp;</p> <p>This posting is provided "AS IS" with no warranties, and confers no rights</p>]]></content:encoded>
    </item>
    <item>
      <title>PowerShell module with continuous integration, static analysis and automatic publish to gallery</title>
      <link>https://docs.microsoft.com/archive/blogs/jtarquino/powershell-module-with-continuous-integration-static-analysis-and-automatic-publish-to-gallery</link>
      <pubDate>Sat, 15 Oct 2016 21:59:05 GMT</pubDate>
      <dc:creator><![CDATA[Jaime Tarquino]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jtarquino/?p=505</guid>
      <description><![CDATA[&nbsp; Recently our team released the Reporting Services PowerShell Tools as a project to...]]></description>
      <content:encoded><![CDATA[<p>&nbsp;</p> <p>Recently our team released the <a href="https://github.com/Microsoft/ReportingServicesTools">Reporting Services PowerShell Tools</a> as a project to collaborate with the community, we had a lot more feedback and participation that we ever thought so we decided to push it a little further and publish it to the <a href="https://www.powershellgallery.com/">PowerShell Gallery</a>.</p> <p>We aren't by any means PowerShell experts and when we published the module we found that we should have run the <a href="https://www.powershellgallery.com/packages/PSScriptAnalyzer/">PSSScriptAnalyzer</a> , so we run it and fixed the issues but that will not scale as a manual task also I would like to automate the publishing to the gallery so is always in sync with the code in the repo.</p> <p>Investigating around I found this great starting point in the <a href="https://ramblingcookiemonster.github.io/GitHub-Pester-AppVeyor/">https://ramblingcookiemonster.github.io/GitHub-Pester-AppVeyor/</a> blog post, it describes how to use <a href="https://www.appveyor.com/">AppVeyor</a> for running unit tests with <a href="https://github.com/pester/Pester">Pester</a>, however I wanted something slightly different, my main goals are:</p> <ol> <li>Provide static analysis using PSSScriptAnalyzer and show the results to the users submitting the pull request  <li>After the PR is merged into main publish automatically to the PowerShell gallery </li></ol> <p>So I started by onboarding the GitHub repo to AppVeyor and created a New Project based on our repo, the procedure is pretty straightforward and AppVeyor has plenty of documentation so I'm not including any detailed instructions.</p> <h2>Onboarding the ScriptAnalyzer</h2> <p>First thing is to add the <a href="https://github.com/Microsoft/ReportingServicesTools/blob/master/appveyor.yml">appveyor.ym</a>l file in our GitHub repo, my initials attempts failed , basically I wanted to install the PSScriptAnalyzer module but it failed with</p> <p style="margin: 0in;line-height: normal"><span><span style="font-family: consolas"><span style="font-size: 9.6pt;color: #ffffff;background-color: #ff0000">Exception calling "ShouldContinue" with "2" argument(s): "The method or operation is not implemented."</span></span></span></p> <p style="margin: 0in;line-height: normal"><span><span style="font-family: consolas"><span style="font-size: 9.6pt;color: #ffffff;background-color: #ff0000">At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:5908 char:8</span></span></span></p> <p style="margin: 0in;line-height: normal"><span><span style="font-family: consolas"><span style="font-size: 9.6pt;color: #ffffff;background-color: #ff0000">+ if($Force -or $PSCmdlet.ShouldContinue($shouldContinueQueryMessag ...</span></span></span></p> <p style="margin: 0in;line-height: normal"><span><span style="font-family: consolas"><span style="font-size: 9.6pt;color: #ffffff;background-color: #ff0000">+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</span></span></span></p> <p style="margin: 0in;line-height: normal"><span><span style="font-family: consolas"><span style="font-size: 9.6pt;color: #ffffff;background-color: #ff0000">+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException</span></span></span></p> <p style="margin: 0in;line-height: normal"><span><span style="font-family: consolas"><span style="font-size: 9.6pt;color: #ffffff;background-color: #ff0000">+ FullyQualifiedErrorId : NotImplementedException</span></span></span></p> <p style="margin: 0in;line-height: normal"><span><span style="font-family: consolas"><span style="font-size: 9.6pt;color: #ffffff;background-color: #ff0000">Install-Module : NuGet provider is required to interact with NuGet-based repositories. Please ensure that '2.8.5.201' or newer version of NuGet provider is installed.</span></span></span></p> <p style="margin: 0in;line-height: normal"><span><span style="font-family: consolas"><span style="font-size: 9.6pt;color: #ffffff;background-color: #ff0000">At line:1 char:1</span></span></span></p> <p style="margin: 0in;line-height: normal"><span><span style="font-family: consolas"><span style="font-size: 9.6pt;color: #ffffff;background-color: #ff0000">+ Install-Module -Name PSScriptAnalyzer</span></span></span></p> <p style="margin: 0in;line-height: normal"><span><span style="font-family: consolas"><span style="font-size: 9.6pt;color: #ffffff;background-color: #ff0000">+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</span></span></span></p> <p style="margin: 0in;line-height: normal"><span><span style="font-family: consolas"><span style="font-size: 9.6pt;color: #ffffff;background-color: #ff0000">+ CategoryInfo : InvalidOperation: (:) [Install-Module], InvalidOperationException</span></span></span></p> <p style="margin: 0in;line-height: normal"><span><span style="font-family: consolas"><span style="font-size: 9.6pt;color: #ffffff;background-color: #ff0000">+ FullyQualifiedErrorId : CouldNotInstallNuGetProvider,Install-Module</span></span></span></p> <p style="margin: 0in;line-height: normal"><span><span style="font-family: consolas"><span style="font-size: 9.6pt;color: #ffffff;background-color: #ff0000">Command executed with exception: NuGet provider is required to interact with NuGet-based repositories. Please ensure that '2.8.5.201' or newer version of NuGet provider is installed.</span></span></span></p> <p>&nbsp;</p> <p>The solution is to install first the nuget package provider, the install section end up being</p> <table class="highlight tab-size js-file-line-container"> <tbody> <tr> <td id="LC13" class="blob-code blob-code-inner js-file-line" style="overflow: visible;vertical-align: top;padding-bottom: 0px;padding-top: 0px;padding-left: 10px;line-height: 20px;padding-right: 10px"><span class="pl-ent"><span style="font-family: consolas"><span style="font-size: 9pt;color: #63a35c">install:</span></span></span></td></tr> <tr> <td id="L14" class="blob-num js-line-number" width="50" align="right"></td> <td id="LC14" class="blob-code blob-code-inner js-file-line" style="overflow: visible;vertical-align: top;padding-bottom: 0px;padding-top: 0px;padding-left: 10px;line-height: 20px;padding-right: 10px"><span style="font-family: consolas"><span style="font-size: 9pt">- <span class="pl-ent"><span style="color: #63a35c">ps:</span></span> </span><span class="pl-s"><span style="font-size: 9pt;color: #183691">Install-PackageProvider -Name NuGet -Force</span></span></span></td></tr> <tr> <td id="L15" class="blob-num js-line-number" width="50" align="right"></td> <td id="LC15" class="blob-code blob-code-inner js-file-line" style="overflow: visible;vertical-align: top;padding-bottom: 0px;padding-top: 0px;padding-left: 10px;line-height: 20px;padding-right: 10px"><span style="font-family: consolas"><span style="font-size: 9pt">- <span class="pl-ent"><span style="color: #63a35c">ps:</span></span> </span><span class="pl-s"><span style="font-size: 9pt;color: #183691">Install-Module -Name PSScriptAnalyzer -Force</span></span></span></td></tr></tbody></table> <p>&nbsp;</p> <p>The next step is to produce a XML results file, I spend some time figuring out what would be the simplest schema and selected <a href="https://github.com/windyroad/JUnit-Schema/blob/master/JUnit.xsd">junit</a> and then I used some magic string manipulation to get the results of the script analyzer into the testresults file</p> <p style="margin: 0in;line-height: normal"><span style="font-family: consolas"><span style="font-size: 9pt;color: #959795"># Execute the script analyzer</span></span></p> <p style="margin: 0in;line-height: normal"><span style="font-family: consolas"><span><span style="color: #a71d5d"><span style="font-size: 9pt">$</span></span></span><span style="font-size: 9pt"><span>results </span><span><span style="color: #a71d5d">= </span></span><span><span style="color: #0086b3">Invoke-ScriptAnalyzer </span></span><span><span style="color: #a71d5d">-</span></span><span>Path .\functions </span><span><span style="color: #a71d5d">-</span></span><span>Recurse </span><span><span style="color: #a71d5d">| where</span></span><span> severity </span><span><span style="color: #a71d5d">-eq </span></span></span><span><span style="font-size: 9pt;color: #183691">"Error"</span></span></span></p> <p style="margin: 0in;line-height: normal"><span style="font-family: consolas"><span style="font-size: 9pt;color: #959795"># Format the results</span></span></p> <p style="margin: 0in;line-height: normal"><span style="font-family: consolas"><span><span style="color: #a71d5d"><span style="font-size: 9pt">$</span></span></span><span style="font-size: 9pt"><span>header </span><span><span style="color: #a71d5d">= </span></span><span><span style="color: #183691">"&lt;testsuite tests=`"</span></span><span><span style="color: #a71d5d">$($</span></span><span>results</span><span><span style="color: #795da3">.Count</span></span><span><span style="color: #a71d5d">)</span></span></span><span><span style="font-size: 9pt;color: #183691">`"&gt;" </span></span></span></p> <p style="margin: 0in;line-height: normal"><span style="font-family: consolas"><span><span style="color: #a71d5d"><span style="font-size: 9pt">$</span></span></span><span style="font-size: 9pt"><span>body </span><span><span style="color: #a71d5d">= $</span></span><span>results </span><span><span style="color: #a71d5d">| </span></span><span><span style="color: #0086b3">ForEach-Object</span></span><span> {</span><span><span style="color: #183691">"&lt;testcase classname=`"analyzer`" name=`"</span></span><span><span style="color: #a71d5d">$($</span></span><span><span style="color: #0086b3">_</span></span><span><span style="color: #795da3">.RuleName</span></span><span><span style="color: #a71d5d">)</span></span><span><span style="color: #183691">`"&gt;&lt;failure type=`"</span></span><span><span style="color: #a71d5d">$($</span></span><span><span style="color: #0086b3">_</span></span><span><span style="color: #795da3">.ScriptName</span></span><span><span style="color: #a71d5d">)</span></span><span><span style="color: #183691">`"&gt;</span></span><span><span style="color: #a71d5d">$($</span></span><span><span style="color: #0086b3">_</span></span><span><span style="color: #795da3">.Message</span></span><span><span style="color: #a71d5d">)</span></span><span><span style="color: #183691">&lt;/failure&gt;&lt;/testcase&gt;"</span></span></span><span><span style="font-size: 9pt">}</span></span></span></p> <p style="margin: 0in;line-height: normal"><span style="font-family: consolas"><span><span style="color: #a71d5d"><span style="font-size: 9pt">$</span></span></span><span style="font-size: 9pt"><span>footer </span><span><span style="color: #a71d5d">= </span></span></span><span><span style="font-size: 9pt;color: #183691">"&lt;/testsuite&gt;"</span></span></span></p> <p style="margin: 0in;line-height: normal"><span style="font-family: consolas"><span><span style="color: #a71d5d"><span style="font-size: 9pt">$</span></span></span><span style="font-size: 9pt"><span>header </span><span><span style="color: #a71d5d">+ $</span></span><span>body </span><span><span style="color: #a71d5d">+$</span></span><span>footer </span><span><span style="color: #a71d5d">| </span></span><span><span style="color: #0086b3">out-file</span></span></span><span><span style="font-size: 9pt"> .\TestsResults.xml</span></span></span></p> <p style="margin: 0in;line-height: normal"><span style="font-family: consolas"><span style="font-size: 9pt;color: #959795"># Upload results</span></span></p> <p style="margin: 0in;line-height: normal"><span style="font-family: consolas"><span><span style="color: #a71d5d"><span style="font-size: 9pt">$</span></span></span><span style="font-size: 9pt"><span>wc </span><span><span style="color: #a71d5d">= </span></span><span><span style="color: #0086b3">New-Object </span></span></span><span><span style="font-size: 9pt;color: #183691">'System.Net.WebClient'</span></span></span></p> <p style="margin: 0in;line-height: normal"><span style="font-family: consolas"><span><span style="color: #a71d5d"><span style="font-size: 9pt">$</span></span></span><span style="font-size: 9pt"><span>wc</span><span><span style="color: #795da3">.UploadFile</span></span><span><span style="color: #a71d5d">(</span></span><span><span style="color: #183691">"https://ci.appveyor.com/api/testresults/junit/</span></span><span><span style="color: #a71d5d">$($</span></span><span><span style="color: #0086b3">env:</span></span><span>APPVEYOR_JOB_ID</span><span><span style="color: #a71d5d">)</span></span><span><span style="color: #183691">"</span></span><span><span style="color: #a71d5d">, (</span></span><span><span style="color: #0086b3">Resolve-Path</span></span><span> .\TestsResults.xml</span></span><span><span style="font-size: 9pt;color: #a71d5d">))</span></span></span></p> <p style="margin: 0in;line-height: normal"><span style="font-family: consolas"><span style="font-size: 9pt;color: #959795"># Fail if there are issues</span></span></p> <p style="margin: 0in;line-height: normal"><span style="font-family: consolas"><span><span style="color: #a71d5d"><span style="font-size: 9pt">if($</span></span></span><span style="font-size: 9pt"><span>results</span><span><span style="color: #795da3">.Count </span></span><span><span style="color: #a71d5d">-gt </span></span><span><span style="color: #0086b3">0</span></span><span><span style="color: #a71d5d">)</span></span><span>{</span><span><span style="color: #a71d5d">throw </span></span><span><span style="color: #183691">"ScriptAnalyzer found </span></span><span><span style="color: #a71d5d">$($</span></span><span>results</span><span><span style="color: #795da3">.Count</span></span><span><span style="color: #a71d5d">)</span></span><span><span style="color: #183691"> issues"</span></span></span><span><span style="font-size: 9pt">}</span></span></span></p> <p>&nbsp;</p> <p>That gives me this nice UI when the script analyzer finds any issue (in order to test the pipeline I removed the filter and allowed the warnings to show as test failures)</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2016/10/clip_image00111.png"><img title="clip_image001" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="clip_image001" src="https://msdnshared.blob.core.windows.net/media/2016/10/clip_image001_thumb6.png" width="708" height="444"></a></p> <p>You can check the entire script in our repo <a href="https://github.com/Microsoft/ReportingServicesTools/blob/master/appveyor.yml">appveyor.yml</a></p> <h2>Publishing to the PowerShell Gallery</h2> <p>I want to control the publishing process, I don't want every single commit to master to publish a new version of the module to the PowerShell Gallery, so I decided to use git tags in order to request a publish, basically when a new tag is added the continuous integration process will run the tests and if they pass it will use the tag label as the version to publish in the gallery, the general workflow is</p> <ol> <li>Update the module manifest (.psd1) with the tag version  <li>Publish to the PowerShell Gallery  <li>If the publish is successful commit back to the repo the new module manifest (.psd1) </li></ol> <p>Interacting with the PowerShell gallery is based on a secret key they provide to use it in the Publish-Module cmdlet, in order to be used in your AppVeyor script you should encrypt it, the detailed instructions are available here <a href="https://www.appveyor.com/docs/build-configuration/#secure-variables">https://www.appveyor.com/docs/build-configuration/#secure-variables</a></p> <p>Also here are the instructions on how to interact with git from the AppVeyor script <a href="https://www.appveyor.com/docs/how-to/git-push/">https://www.appveyor.com/docs/how-to/git-push/</a></p> <p>One issue that I hit was that my git commands from powershell were treating the git console messages as errors, searching around found <a href="https://stackoverflow.com/questions/26872205/powershell-ise-throws-an-error-on-git-checkout">this workaround</a> and implemented in the AppVeyor script, the deploy section looks like this.</p> <p>&nbsp;</p> <p style="margin: 0in;line-height: normal"><span style="font-family: consolas"><span style="font-size: 9pt;color: #959795"># Deploy to Powershell Gallery only where there is a tag which will have the version number</span></span></p> <p style="margin: 0in;line-height: normal"><span style="font-family: consolas"><span><span style="color: #a71d5d"><span style="font-size: 9pt">$</span></span></span><span style="font-size: 9pt"><span>deploy </span><span><span style="color: #a71d5d">= ($</span></span><span><span style="color: #0086b3">env:</span></span><span>APPVEYOR_REPO_TAG </span><span><span style="color: #a71d5d">-eq $</span></span><span><span style="color: #0086b3">true</span></span></span><span><span style="font-size: 9pt;color: #a71d5d">)</span></span></span></p> <p style="margin: 0in;line-height: normal"><span style="font-family: consolas"><span><span style="color: #a71d5d"><span style="font-size: 9pt">if ($</span></span></span><span style="font-size: 9pt"><span>deploy</span></span><span><span style="font-size: 9pt;color: #a71d5d">)</span></span></span></p> <p style="margin: 0in;line-height: normal"><span style="font-family: consolas"><span style="font-size: 9pt">{</span></span></p> <p style="margin: 0in;line-height: 15pt"><span style="font-family: consolas"><span><span><span style="font-size: 9pt">&nbsp;&nbsp; </span></span><span style="font-size: 9pt">git checkout master</span></span></span></p> <p style="margin: 0in;line-height: 15pt"><span style="font-family: consolas"><span><span style="color: #0086b3"><span><span style="font-size: 9pt">&nbsp;&nbsp; </span></span><span style="font-size: 9pt">Write-Host </span></span></span><span style="font-size: 9pt"><span><span style="color: #183691">"Starting Deployment tag </span></span><span><span style="color: #a71d5d">$</span></span><span><span style="color: #0086b3">env:</span></span><span>APPVEYOR_REPO_TAG_NAME</span></span><span><span style="font-size: 9pt;color: #183691">" </span></span></span></p> <p style="margin: 0in;line-height: 15pt"><span style="font-family: consolas"><span><span style="color: #a71d5d"><span><span style="font-size: 9pt">&nbsp;&nbsp; </span></span><span style="font-size: 9pt">$</span></span></span><span style="font-size: 9pt"><span>moduleName </span><span><span style="color: #a71d5d">= </span></span></span><span><span style="font-size: 9pt;color: #183691">"ReportingServicesTools"</span></span></span></p> <p style="margin: 0in;line-height: 15pt"><span style="font-family: consolas"><span><span style="color: #a71d5d"><span><span style="font-size: 9pt">&nbsp;&nbsp; </span></span><span style="font-size: 9pt">$</span></span></span><span style="font-size: 9pt"><span>currentVersion </span><span><span style="color: #a71d5d">= (</span></span><span><span style="color: #0086b3">Import-PowerShellDataFile</span></span><span> .\</span><span><span style="color: #a71d5d">$</span></span><span>moduleName</span><span><span style="color: #795da3">.psd1</span></span><span><span style="color: #a71d5d">)</span></span></span><span><span style="font-size: 9pt">.ModuleVersion</span></span></span></p> <p style="margin: 0in;line-height: 15pt"><span style="font-family: consolas"><span><span style="color: #a71d5d"><span><span style="font-size: 9pt">&nbsp;&nbsp; </span></span><span style="font-size: 9pt">((</span></span></span><span style="font-size: 9pt"><span><span style="color: #0086b3">Get-Content</span></span><span> .\ReportingServicesTools.psd1</span><span><span style="color: #a71d5d">)</span></span><span>.replace</span><span><span style="color: #a71d5d">(</span></span><span><span style="color: #183691">"ModuleVersion = '</span></span><span><span style="color: #a71d5d">$($</span></span><span>currentVersion</span><span><span style="color: #a71d5d">)</span></span><span><span style="color: #183691">'"</span></span><span><span style="color: #a71d5d">, </span></span><span><span style="color: #183691">"ModuleVersion = '</span></span><span><span style="color: #a71d5d">$($</span></span><span><span style="color: #0086b3">env:</span></span><span>APPVEYOR_REPO_TAG_NAME</span><span><span style="color: #a71d5d">)</span></span><span><span style="color: #183691">'"</span></span><span><span style="color: #a71d5d">)) | </span></span><span><span style="color: #0086b3">Set-Content</span></span><span> .\</span><span><span style="color: #a71d5d">$</span></span><span>moduleName</span></span><span><span style="font-size: 9pt;color: #795da3">.psd1</span></span></span></p> <p style="margin: 0in;line-height: 15pt"><span style="font-family: consolas"><span><span style="color: #0086b3"><span><span style="font-size: 9pt">&nbsp;&nbsp; </span></span><span style="font-size: 9pt">Publish-Module </span></span></span><span style="font-size: 9pt"><span><span style="color: #a71d5d">-</span></span><span>Path .\ </span><span><span style="color: #a71d5d">-</span></span><span>NuGetApiKey </span><span><span style="color: #a71d5d">$</span></span><span><span style="color: #0086b3">env:</span></span></span><span><span style="font-size: 9pt">galleryPublishingKey</span></span></span></p> <p style="margin: 0in;line-height: 15pt"><span style="font-family: consolas"><span><span><span style="font-size: 9pt">&nbsp;&nbsp; </span></span><span style="font-size: 9pt">git config </span></span><span style="font-size: 9pt"><span><span style="color: #a71d5d">--</span></span></span><span><span style="font-size: 9pt">global core.safecrlf false</span></span></span></p> <p style="margin: 0in;line-height: 15pt"><span style="font-family: consolas"><span><span><span style="font-size: 9pt">&nbsp;&nbsp; </span></span><span style="font-size: 9pt">git config </span></span><span style="font-size: 9pt"><span><span style="color: #a71d5d">--</span></span></span><span><span style="font-size: 9pt">global credential.helper store</span></span></span></p> <p style="margin: 0in;line-height: normal"><span style="font-family: consolas"><span><span style="color: #0086b3"><span><span style="font-size: 9pt">&nbsp;&nbsp; </span></span><span style="font-size: 9pt">Add-Content </span></span></span><span style="font-size: 9pt"><span><span style="color: #183691">"</span></span><span><span style="color: #a71d5d">$</span></span><span><span style="color: #0086b3">env:</span></span><span>USERPROFILE</span><span><span style="color: #183691">\.git-credentials" "</span></span></span></span><span style="font-size: 9pt"><a><u><span style="font-family: consolas"><span><span style="color: #183691">https://</span></span><span><span style="color: #a71d5d">$($</span></span><span><span style="color: #0086b3">env:</span></span><span><span style="color: #333333">access_token</span></span><span><span style="color: #a71d5d">)</span></span><span><span style="color: #183691">:x-oauth-basic@github.com`n</span></span></span></u></a></span><span><span style="font-family: consolas"><span style="font-size: 9pt;color: #183691">"</span></span></span></p> <p style="margin: 0in;line-height: normal"><span style="font-family: consolas"><span><span><span style="font-size: 9pt">&nbsp;&nbsp; </span></span><span style="font-size: 9pt">git config </span></span><span style="font-size: 9pt"><span><span style="color: #a71d5d">--</span></span><span>global user.email </span></span><span><span style="font-size: 9pt;color: #183691">"yourEmail@outlook.com"</span></span></span></p> <p style="margin: 0in;line-height: normal"><span style="font-family: consolas"><span><span><span style="font-size: 9pt">&nbsp;&nbsp; </span></span><span style="font-size: 9pt">git config </span></span><span style="font-size: 9pt"><span><span style="color: #a71d5d">--</span></span><span>global user.name </span></span><span><span style="font-size: 9pt;color: #183691">"Your Name"</span></span></span></p> <p style="margin: 0in;line-height: normal"><span style="font-family: consolas"><span><span style="font-size: 9pt">&nbsp;&nbsp; </span></span><span style="font-size: 9pt">git add ReportingServicesTools.psd1 </span></span></p> <p style="margin: 0in;line-height: normal"><span style="font-family: consolas"><span><span><span style="font-size: 9pt">&nbsp;&nbsp; </span></span><span style="font-size: 9pt">git commit </span></span><span style="font-size: 9pt"><span><span style="color: #a71d5d">-</span></span><span>m </span></span><span><span style="font-size: 9pt;color: #183691">"Automatic Version Update from CI"</span></span></span></p> <p style="margin: 0in;line-height: normal"><span style="font-family: consolas"><span><span style="font-size: 9pt">&nbsp;&nbsp; </span></span><span style="font-size: 9pt">git push</span></span></p> <p style="margin: 0in;line-height: normal"><span style="font-family: consolas"><span style="font-size: 9pt">}</span></span></p> <p>&nbsp;</p> <p>For some unexplainable reason I wasn’t able to use the Update-ModuleManifest cmdlet so I did the manual replacing of the module version.</p> <p>If you are interested in the entire deployment file it is available here in our repo <a href="https://github.com/Microsoft/ReportingServicesTools/blob/master/appveyor.yml">appveyor.yml</a></p> <p>Something I realized after I finished is that GitHub handle the tags as releases, which is perfect for my intentions, because now when we need to publish a new version we just create a release in GitHub and it will show up automatically as a release in the PowerShell gallery</p> <p><strong>Release in GitHub and in the PowerShell gallery</strong></p> <p><a href="https://msdnshared.blob.core.windows.net/media/2016/10/image628.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/10/image_thumb548.png" width="450" height="277"></a><a href="https://msdnshared.blob.core.windows.net/media/2016/10/image629.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/10/image_thumb549.png" width="450" height="281"></a></p> <p>Finally many thanks to a fellow Microsoft engineer Sergei Vorobev who provided various tips around the entire process.</p>]]></content:encoded>
    </item>
    <item>
      <title>Accessing SQL Server Reporting Services Mobile Reports with the Power BI app from the Internet using Active Directory Application Proxy</title>
      <link>https://docs.microsoft.com/archive/blogs/jtarquino/accessing-sql-server-reporting-services-mobile-reports-with-the-power-bi-app-from-the-internet-using-active-directory-application-proxy</link>
      <pubDate>Mon, 04 Jul 2016 19:16:07 GMT</pubDate>
      <dc:creator><![CDATA[Jaime Tarquino]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jtarquino/?p=475</guid>
      <description><![CDATA[&nbsp; &nbsp; In SQL Server 2016 the team introduced Reporting Services mobile reports to SQL Server...]]></description>
      <content:encoded><![CDATA[<p>&nbsp;</p> <p>&nbsp;</p> <p>In SQL Server 2016 the team introduced <a href="https://msdn.microsoft.com/en-US/library/mt652547.aspx">Reporting Services mobile reports</a> to SQL Server Reporting Services optimized for mobile devices and connected to on-premises data, with an assortment of data visualizations. </p> <p>The mobile reports can be consumed using any mobile device (IPhone, IPad, Android, Windows 10) in the <a href="https://powerbi.microsoft.com/en-us/documentation/powerbi-mobile-iphone-kpis-mobile-reports/">Power BI mobile app</a> while you are connected to the corporate network where Reporting Services is hosted, however some of the users also want to consume the mobile reports outside of the corporate network just using the internet, in the past such scenario required the careful configuration of different firewalls , demilitarized zones (DMZ) and opening specific tcp ports , for instance this <a href="https://technet.microsoft.com/en-us/library/ms159272(v=sql.105).aspx">article</a> cover the basics but usually you work with your IT specialists to deploy such configuration.</p> <p>Recently one of my friends in the Active Directory team mentioned <a href="https://azure.microsoft.com/en-us/documentation/articles/active-directory-application-proxy-publish/">Active Directory Application Proxy</a> , which show promise as an option to open the mobile reports to those users outside of the corporate network with a simpler solution, so I decided to give it a try during the weekend and see how it would work with Reporting Services (warning: every single step is very well documented for people that does a better job than me writing so mostly I’m just providing the links to the documentation that I used and providing specific details of my configuration)</p> <p>The first thing that you need is an Azure Active Directory (AAD) configured and syncing with your Active Directory (AD) on premises, in my test environment I just followed the instructions from <a href="https://azure.microsoft.com/en-us/documentation/articles/active-directory-aadconnect/">Integrating your on-premises identities with Azure Active Directory</a> and voila I have my AAD with the users from my on premises AD.</p> <p>The next step is to <a href="https://azure.microsoft.com/en-us/documentation/articles/active-directory-application-proxy-enable/">Enable Active Directory Application Proxy</a> , just following the detailed instructions.</p> <p>Now is time to <a href="https://azure.microsoft.com/en-us/documentation/articles/active-directory-application-proxy-publish/">Publish applications using Azure AD Application Proxy</a> , you can provide any name and the internal URL that is used to access SSRS is your corporate network, you also should use the Passthrough preauthentication method.</p> <p>You might be wondering why Passthrough and not Azure Active Directory as the documented instructions, well it as long story about how the different authentication methods have evolved from basic with your password traveling as clear text over the network, NTLM , Kerberos and the “modern” authentications protocols like OAuth for applications over the Internet, Reporting Services being primary an On Premises services supports Basic, NTLM and Kerberos out of the box, and the Power BI app for Reporting Services expects those authentication protocols so if you add something in the middle like Azure Active Directory authentication the application doesn’t know what to do, so for this configuration you need to use Passthrough to allow the mobile app to authenticate</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2016/07/image163.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/07/image_thumb135.png" width="462" height="349"></a></p> <p>After publishing the app you need to <a href="https://azure.microsoft.com/en-us/documentation/articles/active-directory-application-proxy-publish/">Assign users and groups to the application</a> , previously I created in the on premises Active Directory a group called SSRSAccess so I can just add to it the users I would like to grant access to the service, I assigned this group to the newly created Jaime SQL Server Reporting Services Application.</p> <p>Now in the Azure Portal if you click in the Application and in the option Configure you will see a section with the public URL of the endpoint, is your opportunity to customize it a little bit, in my case I just rename from what the portal automatically provided to mobile</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2016/07/image164.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/07/image_thumb136.png" width="852" height="141"></a></p> <p>&nbsp;</p> <p>Its time for the test, as is something I never tried I didn’t expect full functionality but the url should be a good start to see if the publishing worked, so I took the URL and pasted on my browser, that’s when you realize and a newbie in the AAD matters as I got the following error </p> <p><a href="https://msdnshared.blob.core.windows.net/media/2016/07/image165.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/07/image_thumb137.png" width="568" height="441"></a></p> <p>Lucky for me the AAD documentation has a very detailed <a href="https://azure.microsoft.com/en-us/documentation/articles/active-directory-application-proxy-troubleshoot/">troubleshooting guide</a> where I found “Go to the subscriber’s Active Directory Licenses tab and make sure that this user or user group is assigned a Premium or Basic license.” , that fixed my issue</p> <p>You know is ready to work when you type your URL in the browser <a href="https://mobile-jaimetars.msappproxy.net/reports/">https://mobile-jaimetars.msappproxy.net/reports/</a> and you are able to see the new Reporting Services Portal</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2016/07/image166.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/07/image_thumb138.png" width="454" height="351"></a></p> <p>&nbsp;</p> <p>The next step is to configure the Power BI Mobile app with the URL and the credentials </p> <p><a href="https://msdnshared.blob.core.windows.net/media/2016/07/clip_image001.jpg"><img title="clip_image001" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="clip_image001" src="https://msdnshared.blob.core.windows.net/media/2016/07/clip_image001_thumb.jpg" width="364" height="484"></a><a href="https://msdnshared.blob.core.windows.net/media/2016/07/clip_image0016.jpg"><img title="clip_image001[6]" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="clip_image001[6]" src="https://msdnshared.blob.core.windows.net/media/2016/07/clip_image0016_thumb.jpg" width="361" height="480"></a><a href="https://msdnshared.blob.core.windows.net/media/2016/07/clip_image0018.jpg"><img title="clip_image001[8]" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="clip_image001[8]" src="https://msdnshared.blob.core.windows.net/media/2016/07/clip_image0018_thumb.jpg" width="360" height="479"></a></p> <p>Yes!!! Average Joe (ajoe) can now access his mobile reports from the Internet.</p> <p>&nbsp;</p> <h2>Limitations and Considerations</h2> <p>My main goal during the experiment was to try out Active Directory Application Proxy to provide access to the mobile reports, this is not an official recommendation is provided "AS IS" with no warranties and before you try this in your environment you should consult with your IT department about your policies to enable external access to corporate information.</p> <p>You can also provide full Reporting Services Portal access exposing the URL of the server (<a href="https://ssrs-rs/">https://ssrs-rs/</a>) instead of just the portal (<a href="https://ssrs-rs/reports/">https://ssrs-rs/reports/</a>) as I did, for that scenario you can even enable Active Active Directory as an PreAuthentication method and use two factor authentication and any other policy you have configured in your AAD, however there are few limitations to keep in mind:</p> <ul> <li>You need to type your credentials again after the Azure PreAuthentication  <li>Simple paginated reports and KPIs just works !!!  <li>The future is here , we have fixed this issue. <strike>I have found the Mobile Reports doesn’t render in the browser in this configuration <img class="wlEmoticon wlEmoticon-sadsmile" style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none" alt="Sad smile" src="https://msdnshared.blob.core.windows.net/media/2016/07/wlEmoticon-sadsmile.png">, it’s something I will look in our code to fix it in the future.</strike>  <li>Check <a title="https://powerbi.microsoft.com/en-us/documentation/powerbi-mobile-oauth-ssrs/" href="https://powerbi.microsoft.com/en-us/documentation/powerbi-mobile-oauth-ssrs/">https://powerbi.microsoft.com/en-us/documentation/powerbi-mobile-oauth-ssrs/</a>&nbsp;<strike> The Mobile App would not work as it doesn’t know how to authenticate </strike> <li>Subscriptions and other features that relies in the URL configured in Reporting Services might be affected as SSRS doesn’t know anything about the URL that you get from AAD which is totally different from the one configured in Reporting Services</li></ul> <p>There are plenty of other things you I haven’t tried like Publish applications using your own domain name, Single sign-on and conditional access </p>]]></content:encoded>
    </item>
    <item>
      <title>The strange case of Data source can’t be created with Reporting Services 2016 in Azure VM</title>
      <link>https://docs.microsoft.com/archive/blogs/jtarquino/the-strange-case-of-data-source-cant-be-created-with-reporting-services-2016-in-azure-vm</link>
      <pubDate>Sun, 19 Jun 2016 19:02:00 GMT</pubDate>
      <dc:creator><![CDATA[Jaime Tarquino]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jtarquino/?p=325</guid>
      <description><![CDATA[&nbsp; Recently we were investigating a case reported by one of the Reporting Services customers...]]></description>
      <content:encoded><![CDATA[<p>&nbsp;</p> <p>Recently we were investigating a case reported by one of the Reporting Services customers where he was able to render reports, but every time he tried to create a datasource he got the following error.</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2016/06/image752.png"><img title="image" style="border-top: 0px;border-right: 0px;border-bottom: 0px;padding-top: 0px;padding-left: 0px;border-left: 0px;padding-right: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/06/image_thumb579.png" width="682" height="193"></a></p> <p>This is a very common scenario where the team has plenty of coverage during coding , testing and dogfooding, I was very surprised that it wasn’t working but you still could render reports and navigate the portal.</p> <p>The next step is to check the logs (in a default installation would be in C:\Program Files\Microsoft SQL Server\MSRS13.MSSQLSERVER\Reporting Services\LogFiles), something to be aware is that Reporting Services 2016 has introduced a new log file for the new portal , those logs start with Microsoft.ReportingServices.Portal for example Microsoft.ReportingServices.Portal.WebHost_06_19_2016_15_59_43.log, we still have the old logs for any operation that interact with the ReportServer , including calls to the SOAP endpoint, report execution and background operations.</p> <p>The log was showing a 401 unauthorized error.</p><pre class="brush: js; auto-links: true; collapse: false; first-line: 1; gutter: true; html-script: false; light: false; ruler: true; smart-tabs: true; tab-size: 4; toolbar: true;">Microsoft.ReportingServices.Portal.WebHost!reportserverwebapp!11!06/19/2016-16:00:48:: e ERROR: [56x1bucj]: 
OData exception occurred: System.Net.WebException: The request failed with HTTP status 401: Unauthorized.
   at Microsoft.SqlServer.ReportingServices2010.RSConnection2010.SetConnectionProtocol()
   at Microsoft.SqlServer.ReportingServices2010.RSConnection2010.SoapMethodWrapper`1.ExecuteMethod(Boolean setConnectionProtocol)
   at Microsoft.SqlServer.ReportingServices2010.RSConnection2010.SoapMethodWrapper`1.ExecuteMethod()
   at Microsoft.SqlServer.ReportingServices2010.RSConnection2010.ListExtensions(String extensionType)
   at Microsoft.ReportingServices.Portal.Services.SoapProxy.SoapRS2010Proxy.&lt;&gt;c__DisplayClass41.&lt;ListExtensions&gt;b__40()</pre>
<p>&nbsp;</p>
<p>From the error is easy to identify that the Portal is calling the Report Server in order to retrieve the list of extensions available to create the datasource, but the mystery still remains, if possible to connect to the portal <a href="https://myazurevm.westus.cloudapp.azure.com/reports">https://myazurevm.westus.cloudapp.azure.com/reports</a> and is also possible to connect to the reportserver <a href="https://myazurevm.westus.cloudapp.azure.com/reportserver">https://myazurevm.westus.cloudapp.azure.com/reportserver</a>, so clearly the permissions are ok.</p>
<p>Next step is either to attach the debugger or to use a network monitor like wireshark or Microsoft Netmon and figure out what is going on the machine, lets try the network monitor</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/2016/06/image747.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/06/image_thumb574.png" width="839" height="84"></a></p>
<p>There is something fishy here, wireshark by default isn’t able to capture local traffic so seeing the call between the portal and the reportserver is interesting, also the source and the destination of the calls are from different IP addresses and the portal process and reportserver are in the same machine </p>
<p>Now lets check the authentication challenge / response for that 401 and looks like is trying to use NTLM (for a good reference on how does it work , check my favorite <a href="https://blogs.msdn.microsoft.com/chiranth/2013/09/20/ntlm-want-to-know-how-it-works/">https://blogs.msdn.microsoft.com/chiranth/2013/09/20/ntlm-want-to-know-how-it-works/</a>)</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/2016/06/image748.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/06/image_thumb575.png" width="833" height="325"></a></p>
<p>Reporting services setup configures different default authentication based on your selections on the setup (all of them detailed here <a title="https://msdn.microsoft.com/en-us/library/cc281253.aspx" href="https://msdn.microsoft.com/en-us/library/cc281253.aspx">https://msdn.microsoft.com/en-us/library/cc281253.aspx</a>), I checked mine and was configured &lt;RSWindowsNTLM /&gt; which maps the response I observed in the network monitor and well you can’t impersonate when you are using NTLM, to rule out wasn’t another issue I tried the NOT RECOMMENDED option of enabling basic and everything started to work (also the credentials were traveling as clear text in the network so at least SSL is configured it is a configuration to avoid), other option for credentials delegation is to configure Kerberos properly but that is a beast that I’m not ashamed to confess I haven’t tamed (once in a while and after a lot of reading and experimenting works for me).</p>
<p>The real clue here is why the portal is trying to contact the report server in a different IP address, so lets check the Reporting Services Configuration Tool for the Report Server Web Service URL and the Web Portal URL</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/2016/06/image749.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/06/image_thumb576.png" width="821" height="449"></a></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/2016/06/image750.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/06/image_thumb577.png" width="822" height="307"></a></p>
<p>Here is the clue, the only available url for the Portal to talk with the Report Server Web Service is the azure public DNS name</p>
<p>There are two solutions for this issue</p>
<h3>Easy Solution</h3>
<p>Add all the assigned IP addresses to the Report Server HTTP URL</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/2016/06/image751.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/06/image_thumb578.png" width="476" height="451"></a></p>
<p>&nbsp;</p>
<h3>Advanced Solution</h3>
<p>Use the same procedure documented for <a title="https://msdn.microsoft.com/en-us/library/cc281307.aspx" href="https://msdn.microsoft.com/en-us/library/cc281307.aspx">https://msdn.microsoft.com/en-us/library/cc281307.aspx</a>, check for the step “Add the NetBIOS and Fully Qualified Domain Name (FQDN) for the host header to the list of <strong>BackConnectionHostNames</strong> stored in the Windows Registry”</p>
<p>The summary of instructions are</p>
<p>1. Add a new DWORD value in the registry path HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanServer\Parameters</p>
<blockquote>
<p>Value name: DisableStrictNameChecking <br>Data type: REG_DWORD <br>Base: Decimal <br>Value: 1</p></blockquote>
<p>2. Add a new Multi-String value in the registry path HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0</p>
<blockquote>
<p>Value name: BackConnectionHostNames <br>Data type: Multi-String <br>Value: ssrs20163.westus.cloudapp.azure.com</p></blockquote>]]></content:encoded>
    </item>
    <item>
      <title>ARM Templates and SQL Server Reporting Services</title>
      <link>https://docs.microsoft.com/archive/blogs/jtarquino/arm-templates-and-sql-server-reporting-services</link>
      <pubDate>Sun, 28 Feb 2016 17:13:18 GMT</pubDate>
      <dc:creator><![CDATA[Jaime Tarquino]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jtarquino/2016/02/28/arm-templates-and-sql-server-reporting-services/</guid>
      <description><![CDATA[&#160;  One of the Azure features I have in my list to try is the ARM templates and what better...]]></description>
      <content:encoded><![CDATA[<p>&#160;</p>  <p>One of the Azure features I have in my list to try is the ARM templates and what better example than configuring SQL Server Reporting Services in a two machines configuration, one machine with Reporting Services and the second machine with SQL Server for the Reporting Services databases.</p>  <p>(Disclaimer: I work in the SQL Server Reporting Services Team , but this is a personal side project)</p>  <p>I tried to use as much of the existing infrastructure as possible so I took the existing SQL Server images in the azure gallery, I found that you can query those with the following Powershell commands </p>  <blockquote>   <p>Get-AzureRmVMImageOffer -Location &quot;westus&quot; -Publisher &quot;MicrosoftSQLServer&quot; | Select Offer</p> </blockquote>  <blockquote>   <p>Get-AzureRmVMImageSku -Location &quot;westus&quot;-Publisher &quot;MicrosoftSQLServer&quot; -Offer &quot;SQL2014SP1-WS2012R2&quot; | Select Skus</p> </blockquote>  <p>The first command return the list of available images and the second the skus available for those images.</p>  <p>Then I started authoring my ARM template using <a href="https://azure.microsoft.com/en-us/documentation/articles/vs-azure-tools-resource-groups-deployment-projects-create-deploy/">Creating and deploying Azure resource groups through Visual Studio</a> article and the guidelines from <a href="https://azure.microsoft.com/en-us/documentation/articles/resource-group-authoring-templates/">Authoring Azure Resource Manager templates</a>.</p>  <p>It uses extensively <a href="https://blogs.technet.microsoft.com/privatecloud/2013/08/30/introducing-powershell-desired-state-configuration-dsc/">Desired State Configuration</a> and the <a href="https://www.powershellgallery.com/packages/xSQLServer">xSQLServer</a> module.</p>  <p>All this end up in my git repo for <a href="https://github.com/jtarquino/RsArm">Reporting Services ARM Templates</a> , click on it to explore it, one of the templates documentation is below.</p>  <p>When it is done you will have SSRS available in the dns you specified in dnsNameForPublicIP , it will become something like</p>  <p>YourDNS.westus.cloudapp.azure.com/reports</p>  <p>You can either deploy it using the UI (see the big Deploy to Azure button below) or using <a href="https://github.com/jtarquino/RsArm/blob/master/RSARM/Scripts/Deploy-AzureResourceGroup.ps1">powershell script</a> provided in the git repo ,&#160; you will need the <a href="https://github.com/jtarquino/RsArm/blob/master/RSARM/Templates/SSRS-Catalog/AzureDeploy.json">template file</a> locally and the <a href="https://github.com/jtarquino/RsArm/blob/master/RSARM/Parameters/ParametersSample.param.dev.json">parameters file</a> to run that command the syntax is</p>  <blockquote>   <p>.\Deploy-AzureResourceGroup.ps1 -ResourceGroupName 'YourResourceGroup' -ResourceGroupLocation 'westus' -TemplateFile '\Templates\SSRS-Catalog\AzureDeploy.json' -TemplateParametersFile 'ParametersSample.param.dev.json' </p>    <p>&#160;</p> </blockquote>  <h1 class="readme blob instapaper_body"><a aria-hidden="true" id="user-content-create-a-new-ssrs-server-with-a-sql-catalog-2-machines" class="anchor" href="#create-a-new-ssrs-server-with-a-sql-catalog-2-machines"><svg role="img" aria-hidden="true" class="octicon octicon-link" xmlns="https://www.w3.org/2000/svg" version="1.1" height="16" width="16" viewbox="0 0 16 16"><path d="M 4 9 h 1 v 1 h -1 c -1.5 0 -3 -1.69 -3 -3.5 s 1.55 -3.5 3 -3.5 h 4 c 1.45 0 3 1.69 3 3.5 c 0 1.41 -0.91 2.72 -2 3.25 v -1.16 c 0.58 -0.45 1 -1.27 1 -2.09 c 0 -1.28 -1.02 -2.5 -2 -2.5 H 4 c -0.98 0 -2 1.22 -2 2.5 s 1 2.5 2 2.5 Z m 9 -3 h -1 v 1 h 1 c 1 0 2 1.22 2 2.5 s -1.02 2.5 -2 2.5 H 9 c -0.98 0 -2 -1.22 -2 -2.5 c 0 -0.83 0.42 -1.64 1 -2.09 v -1.16 c -1.09 0.53 -2 1.84 -2 3.25 c 0 1.81 1.55 3.5 3 3.5 h 4 c 1.45 0 3 -1.69 3 -3.5 s -1.5 -3.5 -3 -3.5 Z"></path></svg></a>Create a new SSRS Server with a SQL catalog (2 Machines)</h1>  <p class="readme blob instapaper_body">This template creates two new Azure VMs, each with a public IP address, it configures one VM to be an SSRS Server, one with SQL Server mixed auth for the SSRS Catalog with the SQL Agent Started. All VMs have public facing RDP and diagnostics enabled , the diagnostics is stored in a consolidated diagnostics storage account different than the vm disk</p>  <p class="readme blob instapaper_body">Click the button below to deploy</p>  <p class="readme blob instapaper_body"><a href="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fjtarquino%2FRsArm%2Fmaster%2FRSARM%2FTemplates%2FSSRS-Catalog%2FAzureDeploy.json" target="_blank"><img style="max-width: 100%" src="https://camo.githubusercontent.com/9285dd3998997a0835869065bb15e5d500475034/687474703a2f2f617a7572656465706c6f792e6e65742f6465706c6f79627574746f6e2e706e67" data-canonical-src="https://azuredeploy.net/deploybutton.png" /> </a><a href="https://armviz.io/#/?load=https%3A%2F%2Fraw.githubusercontent.com%2Fjtarquino%2FRsArm%2Fmaster%2FRSARM%2FTemplates%2FSSRS-Catalog%2FAzureDeploy.json" target="_blank"><img style="max-width: 100%" src="https://camo.githubusercontent.com/536ab4f9bc823c2e0ce72fb610aafda57d8c6c12/687474703a2f2f61726d76697a2e696f2f76697375616c697a65627574746f6e2e706e67" data-canonical-src="https://armviz.io/visualizebutton.png" /> </a></p>  <p class="readme blob instapaper_body">By Default it will create the SQL machines using the image <strong><em>SQL2014SP1-WS2012R2</em></strong> and the <strong><em>Enterprise</em></strong> sku, the full list of available images and their SKUs can be obtained running</p>  <div class="readme blob instapaper_body">   <pre><code>Get-AzureRmVMImageOffer -Location &quot;westus&quot; -Publisher &quot;MicrosoftSQLServer&quot; | Select Offer
Get-AzureRmVMImageSku -Location &quot;westus&quot;-Publisher &quot;MicrosoftSQLServer&quot; -Offer &quot;SQL2014SP1-WS2012R2&quot; | Select Skus
</code></pre>
</div>

<p class="readme blob instapaper_body">For example</p>

<div class="readme blob instapaper_body">
  <ul>
    <li><strong>sqlImageVersion:</strong> SQL2014SP1-WS2012R2 <strong>sku:</strong> Enterprise </li>

    <li><strong>sqlImageVersion:</strong> SQL2016CTP3.3-WS2012R2 <strong>sku:</strong> Evaluation </li>
  </ul>
</div>

<p><strong><em>For CTP Versions of SQL the only SKU available is Evaluation</em></strong> </p>

<hr />

<p>It contains a modified version of xSQLServerRSConfig that supports machines that are non domain join and uses SQL authentication for connection SSRS with the database based on the DSC package <a href="https://www.powershellgallery.com/packages/xSQLServer/1.4.0.0">https://www.powershellgallery.com/packages/xSQLServer/1.4.0.0</a>.</p>

<p>It contains the DSC scripts from <a href="https://sqlvmgroup.blob.core.windows.net/singlevm/PrepareSqlServer.ps1.zip">https://sqlvmgroup.blob.core.windows.net/singlevm/PrepareSqlServer.ps1.zip</a> used by the Azure marketplace to create SQL Machines</p>

<p>&#160;</p>

<p>This posting is provided &quot;AS IS&quot; with no warranties, and confers no rights</p>]]></content:encoded>
    </item>
    <item>
      <title>Debugging Typescript in Visual Studio Code and Chrome</title>
      <link>https://docs.microsoft.com/archive/blogs/jtarquino/debugging-typescript-in-visual-studio-code-and-chrome</link>
      <pubDate>Sun, 24 Jan 2016 14:18:29 GMT</pubDate>
      <dc:creator><![CDATA[Jaime Tarquino]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jtarquino/2016/01/24/debugging-typescript-in-visual-studio-code-and-chrome/</guid>
      <description><![CDATA[&#160;  After a small adventure in a big data team I'm back in the Reporting Services team....]]></description>
      <content:encoded><![CDATA[<p>&#160;</p>  <p>After a small adventure in a big data team I'm back in the Reporting Services team.</p>  <p>Everything is new and at the same times some things never change, but I found very quickly that SSRS is building the new portal with recent web technologies such as Angular and Typescript, check out the announcement <a href="https://blogs.msdn.com/b/sqlrsteamblog/archive/2015/12/17/introducing-mobile-reports-and-a-brand-new-web-portal.aspx">here</a> </p>  <p>I decided that I want to try to use Visual Studio code for modifying and debugging some of the new great portal features and I wasn't able to find any step by step guide to do it (I found how to debug node.js apps but not just browser apps), so I give it a shot and here are my results</p>  <h3>Programs and basic setup</h3>  <p>1. Install Node.js <a title="https://nodejs.org/en/" href="https://nodejs.org/en/">https://nodejs.org/en/</a> </p>  <p>2. Install typescript <a title="https://www.typescriptlang.org/#Download" href="https://www.typescriptlang.org/#Download">https://www.typescriptlang.org/#Download</a> </p>  <p>3. Install Visual Studio Code <a title="https://code.visualstudio.com/" href="https://code.visualstudio.com/">https://code.visualstudio.com/</a> </p>  <p>4. Install TypeScript definitions manager <a href="https://definitelytyped.org/tsd/">https://definitelytyped.org/tsd/</a> </p>  <p>5. Install the chrome debugging extension <a href="https://marketplace.visualstudio.com/items/msjsdiag.debugger-for-chrome">https://marketplace.visualstudio.com/items/msjsdiag.debugger-for-chrome</a> </p>  <blockquote>   <p>The easiest way to do it is to open the command palette (Ctrl+Shift+P) and type install extensions </p> </blockquote>  <p>6. Install typescript definitions for angular </p>  <blockquote>   <p>Move to your application directory and execute </p>    <pre style="overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; width: 450px; border-bottom: #cecece 1px solid; padding-bottom: 5px; padding-top: 5px; padding-left: 5px; min-height: 40px; border-left: #cecece 1px solid; padding-right: 5px; background-color: #fbfbfb"><pre style="font-size: 12px; font-family: consolas,&#39;Courier New&#39;,courier,monospace; width: 100%; margin: 0em; background-color: #fbfbfb"><span style="color: #800000">C</span>:\<span style="color: #800000">Repos</span>\<span style="color: #800000">VSCodeDebug</span>&gt;<span style="color: #800000">tsd</span> <span style="color: #800000">install</span> <span style="color: #800000">angular</span> <span style="color: #800000">--resolve</span> <span style="color: #800000">--save</span></pre></pre>
</blockquote>

<p>7. Install the nodejs web server </p>

<blockquote>
  <pre style="overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; width: 450px; border-bottom: #cecece 1px solid; padding-bottom: 5px; padding-top: 5px; padding-left: 5px; min-height: 40px; border-left: #cecece 1px solid; padding-right: 5px; background-color: #fbfbfb"><pre style="font-size: 12px; font-family: consolas,&#39;Courier New&#39;,courier,monospace; width: 100%; margin: 0em; background-color: #fbfbfb"><span style="color: #800000">C</span>:\<span style="color: #800000">Repos</span>\<span style="color: #800000">VSCodeDebug&gt;</span><span style="color: #800000">npm</span> <span style="color: #800000">install</span> <span style="color: #800000">-g</span> <span style="color: #800000">http-server</span></pre></pre>
</blockquote>

<p>8. Start the nodejs web server and take note of the http port </p>

<blockquote>
  <pre style="overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; width: 450px; border-bottom: #cecece 1px solid; padding-bottom: 5px; padding-top: 5px; padding-left: 5px; min-height: 40px; border-left: #cecece 1px solid; padding-right: 5px; background-color: #fbfbfb"><pre style="font-size: 12px; font-family: consolas,&#39;Courier New&#39;,courier,monospace; width: 100%; margin: 0em; background-color: #fbfbfb"><span style="color: #800000">C</span>:\<span style="color: #800000">Repos</span>\<span style="color: #800000">VSCodeDebug</span>&gt;<span style="color: #800000">http-server</span></pre></pre>

  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/45/98/metablogapi/1682.clip_image001_710E3CE4.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-45-98-metablogapi/1682.clip_5F00_image001_5F00_710E3CE4.png"><img title="clip_image001" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="clip_image001" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/45/98/metablogapi/5734.clip_image001_thumb_48062E99.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-45-98-metablogapi/5734.clip_5F00_image001_5F00_thumb_5F00_48062E99.png" width="397" height="119" /></a></p>
</blockquote>

<pre class="brush: shell; auto-links: true; collapse: false; first-line: 1; gutter: true; html-script: false; light: false; ruler: false; smart-tabs: true; tab-size: 4; toolbar: true;">  </pre>

<h3>Running and debugging</h3>

<p>You can use your own app or clone my super simple demo app from here <a href="https://github.com/jtarquino/VSCodeDebug">https://github.com/jtarquino/VSCodeDebug</a> where I &quot;typescripted&quot; the demo in <a href="https://angularjs.org/">https://angularjs.org/</a> for databinding </p>

<p>1. Configure the task runner to compile typescript </p>

<blockquote>
  <p>Try to build (Ctrl+Shift+B ) </p>

  <p>it will show that no task runner is configure</p>

  <p>&#160;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/45/98/metablogapi/7713.clip_image002_39E79C9C.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-45-98-metablogapi/7713.clip_5F00_image002_5F00_39E79C9C.png"><img title="clip_image002" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="clip_image002" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/45/98/metablogapi/7587.clip_image002_thumb_6E1BC5E2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-45-98-metablogapi/7587.clip_5F00_image002_5F00_thumb_5F00_6E1BC5E2.png" width="656" height="99" /></a></p>
</blockquote>

<p>&#160;</p>

<blockquote>
  <p>Click in configure and it will take you to the task.json file </p>

  <p>Comment out the Compiles HelloWorld.ts program task runner</p>

  <p>Uncomment the second section , so you can use tsconfig.json for the parameters for the compiler</p>

  <pre style="overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; width: 450px; border-bottom: #cecece 1px solid; padding-bottom: 5px; padding-top: 5px; padding-left: 5px; min-height: 40px; border-left: #cecece 1px solid; padding-right: 5px; background-color: #fbfbfb"><pre style="font-size: 12px; font-family: consolas,&#39;Courier New&#39;,courier,monospace; width: 100%; margin: 0em; background-color: #fbfbfb"><span style="color: #008000">// A task runner that calls the Typescript compiler (tsc) and</span>
</pre><pre style="font-size: 12px; font-family: consolas,&#39;Courier New&#39;,courier,monospace; width: 100%; margin: 0em; background-color: #ffffff"><span style="color: #008000">// compiles based on a tsconfig.json file that is present in</span>
</pre><pre style="font-size: 12px; font-family: consolas,&#39;Courier New&#39;,courier,monospace; width: 100%; margin: 0em; background-color: #fbfbfb"><span style="color: #008000">// the root of the folder open in VSCode</span></pre></pre>
</blockquote>

<blockquote>
  <p>Open tsconfig.json and ensure the sourceMap property is set to true, this will generate the sourceMap files which allows the degugger to map the javascript files with the typescript files </p>

  <pre style="overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; width: 450px; border-bottom: #cecece 1px solid; padding-bottom: 5px; padding-top: 5px; padding-left: 5px; min-height: 40px; border-left: #cecece 1px solid; padding-right: 5px; background-color: #fbfbfb"><pre style="font-size: 12px; font-family: consolas,&#39;Courier New&#39;,courier,monospace; width: 100%; margin: 0em; background-color: #fbfbfb">{
</pre><pre style="font-size: 12px; font-family: consolas,&#39;Courier New&#39;,courier,monospace; width: 100%; margin: 0em; background-color: #ffffff">    &quot;<span style="color: #8b0000">compilerOptions</span>&quot;: {
</pre><pre style="font-size: 12px; font-family: consolas,&#39;Courier New&#39;,courier,monospace; width: 100%; margin: 0em; background-color: #fbfbfb">        &quot;<span style="color: #8b0000">sourceMap</span>&quot;: <span style="color: #0000ff">true</span>
</pre><pre style="font-size: 12px; font-family: consolas,&#39;Courier New&#39;,courier,monospace; width: 100%; margin: 0em; background-color: #ffffff">    }
</pre><pre style="font-size: 12px; font-family: consolas,&#39;Courier New&#39;,courier,monospace; width: 100%; margin: 0em; background-color: #fbfbfb">}</pre></pre>
</blockquote>

<p>&#160;</p>

<p>2. Setup the debug, press f5 to start the debugging, </p>

<blockquote>
  <p>First time will ask for the environment pick Chrome </p>

  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/45/98/metablogapi/0247.clip_image003_0DCA9FAB.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-45-98-metablogapi/0247.clip_5F00_image003_5F00_0DCA9FAB.png"><img title="clip_image003" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="clip_image003" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/45/98/metablogapi/0647.clip_image003_thumb_426AFBE6.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-45-98-metablogapi/0647.clip_5F00_image003_5F00_thumb_5F00_426AFBE6.png" width="584" height="193" /></a></p>
</blockquote>

<blockquote><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/45/98/metablogapi/3480.clip_image004_10072867.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-45-98-metablogapi/3480.clip_5F00_image004_5F00_10072867.png"><img title="clip_image004" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="clip_image004" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/45/98/metablogapi/5140.clip_image004_thumb_2BABB45D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-45-98-metablogapi/5140.clip_5F00_image004_5F00_thumb_5F00_2BABB45D.png" width="590" height="151" /></a> </blockquote>

<blockquote>
  <p>It will open the file launch.json, there are two important elements here the url and the webroot</p>
</blockquote>

<blockquote>
  <p>url should be updated to your start page in my case is index.html</p>

  <p>Update the port to use the one that the nodejs http server show when started ,in my case 8080</p>

  <p>webroot should be the root of your application, it could be wwwroot or just the current directory, for my case is the current directory which is .&#160; (yes just a dot)</p>

  <pre style="overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; width: 450px; border-bottom: #cecece 1px solid; padding-bottom: 5px; padding-top: 5px; padding-left: 5px; min-height: 40px; border-left: #cecece 1px solid; padding-right: 5px; background-color: #fbfbfb"><pre style="font-size: 12px; font-family: consolas,&#39;Courier New&#39;,courier,monospace; width: 100%; margin: 0em; background-color: #fbfbfb">{
</pre><pre style="font-size: 12px; font-family: consolas,&#39;Courier New&#39;,courier,monospace; width: 100%; margin: 0em; background-color: #ffffff">    &quot;<span style="color: #8b0000">version</span>&quot;: &quot;<span style="color: #8b0000">0.2.0</span>&quot;,
</pre><pre style="font-size: 12px; font-family: consolas,&#39;Courier New&#39;,courier,monospace; width: 100%; margin: 0em; background-color: #fbfbfb">    &quot;<span style="color: #8b0000">configurations</span>&quot;: [
</pre><pre style="font-size: 12px; font-family: consolas,&#39;Courier New&#39;,courier,monospace; width: 100%; margin: 0em; background-color: #ffffff">        {
</pre><pre style="font-size: 12px; font-family: consolas,&#39;Courier New&#39;,courier,monospace; width: 100%; margin: 0em; background-color: #fbfbfb">            &quot;<span style="color: #8b0000">name</span>&quot;: &quot;<span style="color: #8b0000">Launch index.html</span>&quot;,
</pre><pre style="font-size: 12px; font-family: consolas,&#39;Courier New&#39;,courier,monospace; width: 100%; margin: 0em; background-color: #ffffff">            &quot;<span style="color: #8b0000">type</span>&quot;: &quot;<span style="color: #8b0000">chrome</span>&quot;,
</pre><pre style="font-size: 12px; font-family: consolas,&#39;Courier New&#39;,courier,monospace; width: 100%; margin: 0em; background-color: #fbfbfb">            &quot;<span style="color: #8b0000">request</span>&quot;: &quot;<span style="color: #8b0000">launch</span>&quot;,
</pre><pre style="font-size: 12px; font-family: consolas,&#39;Courier New&#39;,courier,monospace; width: 100%; margin: 0em; background-color: #ffffff">            &quot;<span style="color: #8b0000">file</span>&quot;: &quot;<span style="color: #8b0000">index.html</span>&quot;
</pre><pre style="font-size: 12px; font-family: consolas,&#39;Courier New&#39;,courier,monospace; width: 100%; margin: 0em; background-color: #fbfbfb">        },
</pre><pre style="font-size: 12px; font-family: consolas,&#39;Courier New&#39;,courier,monospace; width: 100%; margin: 0em; background-color: #ffffff">        {
</pre><pre style="font-size: 12px; font-family: consolas,&#39;Courier New&#39;,courier,monospace; width: 100%; margin: 0em; background-color: #fbfbfb">            &quot;<span style="color: #8b0000">name</span>&quot;: &quot;<span style="color: #8b0000">Launch localhost with sourcemaps</span>&quot;,
</pre><pre style="font-size: 12px; font-family: consolas,&#39;Courier New&#39;,courier,monospace; width: 100%; margin: 0em; background-color: #ffffff">            &quot;<span style="color: #8b0000">type</span>&quot;: &quot;<span style="color: #8b0000">chrome</span>&quot;,
</pre><pre style="font-size: 12px; font-family: consolas,&#39;Courier New&#39;,courier,monospace; width: 100%; margin: 0em; background-color: #fbfbfb">            &quot;<span style="color: #8b0000">request</span>&quot;: &quot;<span style="color: #8b0000">launch</span>&quot;,
</pre><pre style="font-size: 12px; font-family: consolas,&#39;Courier New&#39;,courier,monospace; width: 100%; margin: 0em; background-color: #ffffff">            &quot;<span style="color: #8b0000">url</span>&quot;: &quot;<span style="color: #8b0000">https://localhost:8080/index.html</span>&quot;,
</pre><pre style="font-size: 12px; font-family: consolas,&#39;Courier New&#39;,courier,monospace; width: 100%; margin: 0em; background-color: #fbfbfb">            &quot;<span style="color: #8b0000">sourceMaps</span>&quot;: <span style="color: #0000ff">true</span>,
</pre><pre style="font-size: 12px; font-family: consolas,&#39;Courier New&#39;,courier,monospace; width: 100%; margin: 0em; background-color: #ffffff">            &quot;<span style="color: #8b0000">webRoot</span>&quot;: &quot;<span style="color: #8b0000">.</span>&quot;
</pre><pre style="font-size: 12px; font-family: consolas,&#39;Courier New&#39;,courier,monospace; width: 100%; margin: 0em; background-color: #fbfbfb">        },
</pre><pre style="font-size: 12px; font-family: consolas,&#39;Courier New&#39;,courier,monospace; width: 100%; margin: 0em; background-color: #ffffff">        {
</pre><pre style="font-size: 12px; font-family: consolas,&#39;Courier New&#39;,courier,monospace; width: 100%; margin: 0em; background-color: #fbfbfb">            &quot;<span style="color: #8b0000">name</span>&quot;: &quot;<span style="color: #8b0000">Attach</span>&quot;,
</pre><pre style="font-size: 12px; font-family: consolas,&#39;Courier New&#39;,courier,monospace; width: 100%; margin: 0em; background-color: #ffffff">            &quot;<span style="color: #8b0000">type</span>&quot;: &quot;<span style="color: #8b0000">chrome</span>&quot;,
</pre><pre style="font-size: 12px; font-family: consolas,&#39;Courier New&#39;,courier,monospace; width: 100%; margin: 0em; background-color: #fbfbfb">            &quot;<span style="color: #8b0000">request</span>&quot;: &quot;<span style="color: #8b0000">attach</span>&quot;,
</pre><pre style="font-size: 12px; font-family: consolas,&#39;Courier New&#39;,courier,monospace; width: 100%; margin: 0em; background-color: #ffffff">            &quot;<span style="color: #8b0000">port</span>&quot;: 9222
</pre><pre style="font-size: 12px; font-family: consolas,&#39;Courier New&#39;,courier,monospace; width: 100%; margin: 0em; background-color: #fbfbfb">        }
</pre><pre style="font-size: 12px; font-family: consolas,&#39;Courier New&#39;,courier,monospace; width: 100%; margin: 0em; background-color: #ffffff">    ]
</pre><pre style="font-size: 12px; font-family: consolas,&#39;Courier New&#39;,courier,monospace; width: 100%; margin: 0em; background-color: #fbfbfb">}</pre></pre>
</blockquote>

<p>&#160;</p>

<blockquote>
  <p>Go to the debug button in VScode and select &quot;Launch Localhost with source maps&quot;</p>

  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/45/98/metablogapi/4064.clip_image005_7947E0DD.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-45-98-metablogapi/4064.clip_5F00_image005_5F00_7947E0DD.png"><img title="clip_image005" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="clip_image005" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/45/98/metablogapi/6740.clip_image005_thumb_1FA9C429.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-45-98-metablogapi/6740.clip_5F00_image005_5F00_thumb_5F00_1FA9C429.png" width="637" height="369" /></a></p>
</blockquote>

<p>&#160;</p>

<p>3. Set breakpoints and run</p>

<blockquote>
  <p>Press f5, it will open Chrome and it will stop at any breakpoint defined by you (for some weird reason you have to click on refresh at least one time before Chrome stops in the breakpoint)</p>

  <p>Also important to notice that is debugging in the .ts as expected (instead of the .js that you get out of the box)</p>

  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/45/98/metablogapi/4578.clip_image006_621C665F.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-45-98-metablogapi/4578.clip_5F00_image006_5F00_621C665F.png"><img title="clip_image006" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="clip_image006" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/45/98/metablogapi/3225.clip_image006_thumb_1AC7106D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-45-98-metablogapi/3225.clip_5F00_image006_5F00_thumb_5F00_1AC7106D.png" width="712" height="434" /></a></p>
</blockquote>

<blockquote><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/45/98/metablogapi/0218.clip_image007_68633CED.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-45-98-metablogapi/0218.clip_5F00_image007_5F00_68633CED.png"><img title="clip_image007" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="clip_image007" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/45/98/metablogapi/7266.clip_image007_thumb_6A9FC5A9.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-45-98-metablogapi/7266.clip_5F00_image007_5F00_thumb_5F00_6A9FC5A9.png" width="720" height="477" /></a></blockquote>]]></content:encoded>
    </item>
    <item>
      <title>Identifying Slow queries in Excel PowerPivot</title>
      <link>https://docs.microsoft.com/archive/blogs/jtarquino/identifying-slow-queries-in-excel-powerpivot</link>
      <pubDate>Fri, 27 Dec 2013 13:06:44 GMT</pubDate>
      <dc:creator><![CDATA[Jaime Tarquino]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jtarquino/2013/12/27/identifying-slow-queries-in-excel-powerpivot/</guid>
      <description><![CDATA[Technorati Tags: PowerPivot,SQL BI,Excel  I had a very slow power pivot report and wanted to...]]></description>
      <content:encoded><![CDATA[<div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:da248c97-4aaa-44f3-9a0d-a448b162cded" class="wlWriterEditableSmartContent" style="margin: 0px; padding: 0px; float: none; display: inline;">Technorati Tags: <a href="https://technorati.com/tags/PowerPivot" rel="tag">PowerPivot</a>,<a href="https://technorati.com/tags/SQL+BI" rel="tag">SQL BI</a>,<a href="https://technorati.com/tags/Excel" rel="tag">Excel</a></div>  <p>I had a very slow power pivot report and wanted to identify which query was taking the time so I enabled the tracing</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/45/98/metablogapi/3005.clip_image0015_2270DED5.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-45-98-metablogapi/3005.clip_5F00_image0015_5F00_2270DED5.jpg"><img title="clip_image001[5]" style="display: inline;" border="0" alt="clip_image001[5]" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/45/98/metablogapi/1351.clip_image0015_thumb_5E307788.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-45-98-metablogapi/1351.clip_5F00_image0015_5F00_thumb_5F00_5E307788.jpg" width="883" height="469" /></a></p>  <p>The trace is generated by default in your desktop, the trace is a SQL Profiler trace so you will need to use SQL Profiler to open it.</p>  <p>When is open, organize the columns by eventclass</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/45/98/metablogapi/6153.clip_image0024_16DB2196.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-45-98-metablogapi/6153.clip_5F00_image0024_5F00_16DB2196.png"><img title="clip_image002[4]" style="display: inline;" border="0" alt="clip_image002[4]" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/45/98/metablogapi/1856.clip_image0024_thumb_3DA937D6.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-45-98-metablogapi/1856.clip_5F00_image0024_5F00_thumb_5F00_3DA937D6.png" width="894" height="583" /></a></p>  <p>Now filter the eventSubclass to 25 which is execute SQL</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/45/98/metablogapi/8306.clip_image0034_7D731E5B.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-45-98-metablogapi/8306.clip_5F00_image0034_5F00_7D731E5B.png"><img title="clip_image003[4]" style="display: inline;" border="0" alt="clip_image003[4]" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/45/98/metablogapi/4118.clip_image0034_thumb_3FE5C092.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-45-98-metablogapi/4118.clip_5F00_image0034_5F00_thumb_5F00_3FE5C092.png" width="885" height="573" /></a></p>  <p>Now you can focus in Progress Report End event and check what TSQL is taking longer</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/45/98/metablogapi/8540.clip_image0044_66B3D6D2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-45-98-metablogapi/8540.clip_5F00_image0044_5F00_66B3D6D2.png"><img title="clip_image004[4]" style="display: inline;" border="0" alt="clip_image004[4]" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/45/98/metablogapi/4846.clip_image0044_thumb_1B54330E.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-45-98-metablogapi/4846.clip_5F00_image0044_5F00_thumb_5F00_1B54330E.png" width="885" height="313" /></a></p>]]></content:encoded>
    </item>
    <item>
      <title>Copying PowerPivot tables between Excel workbooks to consolidate Power View Reports</title>
      <link>https://docs.microsoft.com/archive/blogs/jtarquino/copying-powerpivot-tables-between-excel-workbooks-to-consolidate-power-view-reports</link>
      <pubDate>Sat, 02 Nov 2013 11:09:32 GMT</pubDate>
      <dc:creator><![CDATA[Jaime Tarquino]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jtarquino/2013/11/02/copying-powerpivot-tables-between-excel-workbooks-to-consolidate-power-view-reports/</guid>
      <description><![CDATA[I use multiple Excel PowerPivot models created in different workbooks by multiple people,...]]></description>
      <content:encoded><![CDATA[<p></p>  <p>I use multiple Excel PowerPivot models created in different workbooks by multiple people, sometimes I need to mash up them or simply create a single workbook with all the models so I can share it easily in my Office 365 site</p>  <p>I tried opening the PowerPivot add in and realized that there is not option to copy the tables of the PowerPivot model</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/45/98/metablogapi/6232.image_151A84C1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-45-98-metablogapi/6232.image_5F00_151A84C1.png"><img title="image" style="display: inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/45/98/metablogapi/1057.image_thumb_506DEA7F.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-45-98-metablogapi/1057.image_5F00_thumb_5F00_506DEA7F.png" width="384" height="218" /></a> </p>  <p>I also looked around and didn’t find any evident way to do it.</p>  <p>After some experiments I realized there is a way although is not that evident.</p>  <p>1.&#160; Open your workbooks (the source and the destination)</p>  <p>2. Create a Pivot table from the PowerPivot table you want to copy</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/45/98/metablogapi/2068.image_1E0A1700.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-45-98-metablogapi/2068.image_5F00_1E0A1700.png"><img title="image" style="display: inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/45/98/metablogapi/4048.image_thumb_6BA64380.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-45-98-metablogapi/4048.image_5F00_thumb_5F00_6BA64380.png" width="244" height="157" /></a> </p>  <p>3. Right click in the new sheet created and click copy (You need to add at leas one field from your table)</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/45/98/metablogapi/4544.image_523E4046.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-45-98-metablogapi/4544.image_5F00_523E4046.png"><img title="image" style="display: inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/45/98/metablogapi/2061.image_thumb_66C38FC4.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-45-98-metablogapi/2061.image_5F00_thumb_5F00_66C38FC4.png" width="244" height="170" /></a> </p>  <p></p>  <p>4. As you have open the two workbooks you can select from the Dropdown list your destination workbook</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/45/98/metablogapi/0336.image_268D764A.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-45-98-metablogapi/0336.image_5F00_268D764A.png"><img title="image" style="display: inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/45/98/metablogapi/3173.image_thumb_345FBC45.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-45-98-metablogapi/3173.image_5F00_thumb_5F00_345FBC45.png" width="244" height="233" /></a> </p>  <p>5. Excel will copy not only the sheet but also the model, you can go to your destination workbook and check that the new PowerPivot table is there along with the connections. You can delete the sheet from the destination workbook and you will keep only your model</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/45/98/metablogapi/3857.image_0EEB74CF.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-45-98-metablogapi/3857.image_5F00_0EEB74CF.png"><img title="image" style="display: inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/45/98/metablogapi/7651.image_thumb_5C87A14F.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-45-98-metablogapi/7651.image_5F00_thumb_5F00_5C87A14F.png" width="244" height="155" /></a> </p>  <p></p>  <p></p>  <p>This posting is provided &quot;AS IS&quot; with no warranties, and confers no rights</p>]]></content:encoded>
    </item>
    <item>
      <title>Updating a WCF Azure Service to SSL and Client Certificate authentication</title>
      <link>https://docs.microsoft.com/archive/blogs/jtarquino/updating-a-wcf-azure-service-to-ssl-and-client-certificate-authentication</link>
      <pubDate>Tue, 03 Sep 2013 10:18:38 GMT</pubDate>
      <dc:creator><![CDATA[Jaime Tarquino]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jtarquino/2013/09/03/updating-a-wcf-azure-service-to-ssl-and-client-certificate-authentication/</guid>
      <description><![CDATA[&#160;  I created a WCF Service in Azure and started to use it, it started very simple but we added...]]></description>
      <content:encoded><![CDATA[<p>&#160;</p>  <p>I created a WCF Service in Azure and started to use it, it started very simple but we added new features that need to be protected, so I started the journey of taking my simple WCF Service and configure it to use SSL and client authentication, one of the requirements was minimal downtime, so I need a transition period where both endpoints were available (Secure and Non-Secure) until I was sure that all the clients were configured properly.</p>  <p>I used as base this article “<a href="https://msdn.microsoft.com/en-us/evalcenter/spazuretrainingcourse_identityspazure#_Toc292366600">Using Certificate Based Authentication to Consume a Windows Azure WCF Service from SharePoint 2010</a>” from MSDN and did a set of needed adjustments to make it work in my environment.</p>  <h1>Configure the Server</h1>  <p>1. Add the new certificate to the Web Role</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/45/98/metablogapi/5710.image_5F566A97.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-45-98-metablogapi/5710.image_5F00_5F566A97.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/45/98/metablogapi/6708.image_thumb_6609741A.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-45-98-metablogapi/6708.image_5F00_thumb_5F00_6609741A.png" width="555" height="181" /></a></p>  <p>2. Add the new SSL endpoint</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/45/98/metablogapi/7360.image_3AC4DD13.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-45-98-metablogapi/7360.image_5F00_3AC4DD13.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/45/98/metablogapi/3162.image_thumb_1AA9D056.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-45-98-metablogapi/3162.image_5F00_thumb_5F00_1AA9D056.png" width="563" height="176" /></a></p>  <p>With this we have a new SSL secured endpoint, but any client can use it</p>  <p>Now lets configure the service , to do so you need to modify the web.config, in my case I was using httpBinding, I added two bindings under <span class="kwrd">&lt;</span><span class="html">system.serviceModel</span><span class="kwrd">&gt; </span>the NormalBinding to make explicitly the non secure endpoint and the new SecureBinding </p>  <p><span class="kwrd"></span></p>   <pre class="csharpcode"><span class="kwrd">&lt;</span><span class="html">system.serviceModel</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">bindings</span><span class="kwrd">&gt;</span>
      <span class="kwrd">&lt;</span><span class="html">basicHttpBinding</span><span class="kwrd">&gt;</span>
        <span class="kwrd">&lt;</span><span class="html">binding</span> <span class="attr">name</span><span class="kwrd">=&quot;NormalBinding&quot;</span> <span class="kwrd">/&gt;</span>
        <span class="kwrd">&lt;</span><span class="html">binding</span> <span class="attr">name</span><span class="kwrd">=&quot;SecureBinding&quot;</span><span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span><span class="html">security</span> <span class="attr">mode</span><span class="kwrd">=&quot;Transport&quot;</span><span class="kwrd">&gt;</span>
            <span class="kwrd">&lt;</span><span class="html">transport</span> <span class="attr">clientCredentialType</span><span class="kwrd">=&quot;Certificate&quot;</span> <span class="kwrd">/&gt;</span>
          <span class="kwrd">&lt;/</span><span class="html">security</span><span class="kwrd">&gt;</span>
        <span class="kwrd">&lt;/</span><span class="html">binding</span><span class="kwrd">&gt;</span>
      <span class="kwrd">&lt;/</span><span class="html">basicHttpBinding</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;/</span><span class="html">bindings</span><span class="kwrd">&gt;</span></pre>

<pre class="csharpcode"><span class="kwrd"></span></pre>

<p>And now set the binding configuration to my service, both of them the Secure and the Normal to ensure both are available </p>

<pre class="csharpcode">    <span class="kwrd">&lt;</span><span class="html">services</span><span class="kwrd">&gt;</span>
      <span class="kwrd">&lt;</span><span class="html">service</span> <span class="attr">name</span><span class="kwrd">=&quot;MyWebRole.MyService&quot;</span><span class="kwrd">&gt;</span>
        <span class="kwrd">&lt;</span><span class="html">endpoint</span> <span class="attr">binding</span><span class="kwrd">=&quot;basicHttpBinding&quot;</span> <span class="attr">bindingConfiguration</span><span class="kwrd">=&quot;NormalBinding&quot;</span> <span class="attr">contract</span><span class="kwrd">=&quot;IService&quot;</span> <span class="kwrd">/&gt;</span>
        <span class="kwrd">&lt;</span><span class="html">endpoint</span> <span class="attr">binding</span><span class="kwrd">=&quot;basicHttpBinding&quot;</span> <span class="attr">bindingConfiguration</span><span class="kwrd">=&quot;SecureBinding&quot;</span> <span class="attr">contract</span><span class="kwrd">=&quot;IService&quot;</span> <span class="kwrd">/&gt;</span>
      <span class="kwrd">&lt;/</span><span class="html">service</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;/</span><span class="html">services</span><span class="kwrd">&gt;</span>
</pre>


<pre class="csharpcode">Under &lt;Configuration&gt; configure the SSL negotiation </pre>

<pre class="csharpcode">  <span class="kwrd">&lt;</span><span class="html">system.webServer</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">security</span><span class="kwrd">&gt;</span>
      <span class="kwrd">&lt;</span><span class="html">access</span> <span class="attr">sslFlags</span><span class="kwrd">=&quot;SslNegotiateCert&quot;</span> <span class="kwrd">/&gt;</span>
    <span class="kwrd">&lt;/</span><span class="html">security</span><span class="kwrd">&gt;</span>
  <span class="kwrd">&lt;/</span><span class="html">system.webServer</span><span class="kwrd">&gt;</span></pre>

<p></p>

<p><font color="#000000" size="2" face="Consolas">You can try to debug or deploy the Service and is very likely you will hit my major issue</font></p>

<p>“The SSL settings for the service 'SslRequireCert' does not match those of the IIS 'None'”</p>

<p>To fix that you need to unlock the web.config, to do it modify the ServiceDefinition.csdef and add a task </p>

<pre class="csharpcode">  <span class="kwrd">&lt;</span><span class="html">WebRole</span> <span class="attr">name</span><span class="kwrd">=&quot;BeaconServiceWebRole&quot;</span> <span class="attr">vmsize</span><span class="kwrd">=&quot;Small&quot;</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">Startup</span><span class="kwrd">&gt;</span>
      <span class="kwrd">&lt;</span><span class="html">Task</span> <span class="attr">commandLine</span><span class="kwrd">=&quot;Startup.cmd&quot;</span> <span class="attr">executionContext</span><span class="kwrd">=&quot;elevated&quot;</span> <span class="attr">taskType</span><span class="kwrd">=&quot;simple&quot;</span><span class="kwrd">&gt;</span>
      <span class="kwrd">&lt;/</span><span class="html">Task</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;/</span><span class="html">Startup</span><span class="kwrd">&gt;</span>
</pre>


<p>&#160;</p>

<p>Create a Startup,cmd file in your web role and add this</p>

<pre>%APPCMD% unlock config /section:system.webServer/security/access</pre>

<p>Try to debug and deploy and should work</p>

<p>You will notice that those instructions are already in the article that I mention at the beginning, I guess the Azure SDK has changed since then and now you need to use the environment variable %APPCMD% to call the configuration, to be able to debug that I did a couple of things</p>

<ul>
  <li>Add this to the Startup.cmd </li>
</ul>

<blockquote>
  <pre>%APPCMD% set config -section:system.webServer/httpErrors -errorMode:Detailed </pre>
</blockquote>

<blockquote>
  <pre>It will allow you to see the detail of the errors, which will help you to understand the underlying issue</pre>
</blockquote>

<ul>
  <li>Debugging locally you can add logging to your startup.cmd commands so you can see if they are successful, the quick way is to send it to a file like </li>
</ul>

<blockquote>
  <pre>%APPCMD% unlock config /section:system.webServer/security/access &gt;&gt; C:\logging\unlock.log</pre>
</blockquote>

<p>With that information I was able to figure out that the unlock wasn’t being executed and found the new way to do it with the %APPCMD% variable</p>

<p>&#160;</p>

<h1>Configure the client</h1>

<p>Modify the app.config or web.config of the client to add the new configuration, you will need a new behavior, binding configuration and update the endpoint to use https my config looks like this</p>

<p>&#160;</p>

<pre class="csharpcode">  <span class="kwrd">&lt;</span><span class="html">system.serviceModel</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">behaviors</span><span class="kwrd">&gt;</span>
        <span class="kwrd">&lt;</span><span class="html">endpointBehaviors</span><span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span><span class="html">behavior</span> <span class="attr">name</span><span class="kwrd">=&quot;CertBehavior&quot;</span><span class="kwrd">&gt;</span>
            <span class="kwrd">&lt;</span><span class="html">clientCredentials</span><span class="kwrd">&gt;</span>
              <span class="kwrd">&lt;</span><span class="html">clientCertificate</span> <span class="attr">findValue</span><span class="kwrd">=&quot;REplacewihtyourownthumbprintXXXXXXXXXXXX&quot;</span>
                <span class="attr">storeLocation</span><span class="kwrd">=&quot;LocalMachine&quot;</span> <span class="attr">x509FindType</span><span class="kwrd">=&quot;FindByThumbprint&quot;</span> <span class="kwrd">/&gt;</span>
            <span class="kwrd">&lt;/</span><span class="html">clientCredentials</span><span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;/</span><span class="html">behavior</span><span class="kwrd">&gt;</span>
        <span class="kwrd">&lt;/</span><span class="html">endpointBehaviors</span><span class="kwrd">&gt;</span>
      <span class="kwrd">&lt;/</span><span class="html">behaviors</span><span class="kwrd">&gt;</span>
      <span class="kwrd">&lt;</span><span class="html">bindings</span><span class="kwrd">&gt;</span>
            <span class="kwrd">&lt;</span><span class="html">basicHttpBinding</span><span class="kwrd">&gt;</span>
                <span class="kwrd">&lt;</span><span class="html">binding</span> <span class="attr">name</span><span class="kwrd">=&quot;secureByCert&quot;</span><span class="kwrd">&gt;</span>
                    <span class="kwrd">&lt;</span><span class="html">security</span> <span class="attr">mode</span><span class="kwrd">=&quot;Transport&quot;</span><span class="kwrd">&gt;</span>
                      <span class="kwrd">&lt;</span><span class="html">transport</span> <span class="attr">clientCredentialType</span> <span class="kwrd">=&quot;Certificate&quot;</span> <span class="kwrd">/&gt;</span>
                    <span class="kwrd">&lt;/</span><span class="html">security</span><span class="kwrd">&gt;</span>
                <span class="kwrd">&lt;/</span><span class="html">binding</span><span class="kwrd">&gt;</span>
            <span class="kwrd">&lt;/</span><span class="html">basicHttpBinding</span><span class="kwrd">&gt;</span>
        <span class="kwrd">&lt;/</span><span class="html">bindings</span><span class="kwrd">&gt;</span>
        <span class="kwrd">&lt;</span><span class="html">client</span><span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span><span class="html">endpoint</span> <span class="attr">address</span><span class="kwrd">=&quot;https://myservice.cloudapp.net/service.svc&quot;</span> <span class="attr">binding</span><span class="kwrd">=&quot;basicHttpBinding&quot;</span>
          <span class="attr">bindingConfiguration</span><span class="kwrd">=&quot;secureByCert&quot;</span> 
          <span class="attr">behaviorConfiguration</span><span class="kwrd">=&quot;CertBehavior&quot;</span> 
          <span class="attr">contract</span><span class="kwrd">=&quot;IService&quot;</span> <span class="attr">name</span><span class="kwrd">=&quot;securedEndpoint&quot;</span> <span class="kwrd">/&gt;</span>
        <span class="kwrd">&lt;/</span><span class="html">client</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;/</span><span class="html">system.serviceModel</span><span class="kwrd">&gt;</span></pre>

<pre class="csharpcode"><span class="kwrd"></span></pre>

<p>For web sites running in IIS you need to ensure the user in the app pool have permissions , usually the IIS applications run under Network Service to grant permissions to that account:</p>

<ol>
  <li>Open MMC.EXE</li>

  <li>Added the certificate snap-in for local computer</li>

  <li>Locate your certificate</li>

  <li>Right Click -&gt; All Tasks -&gt; Manage Private Keys</li>

  <li>Add the &lt;LocalMachine&gt;\NETWORK SERVICE account and assigned Read rights.
    <br /></li>
</ol>


<h1>Remove the Non Secure Endpoint </h1>

<p>When all the clients are updated you can remove the non secure endpoint, to do that just remove the non secure endpoint</p>

<pre class="csharpcode">        <span class="kwrd">&lt;</span><span class="html">endpoint</span> <span class="attr">binding</span><span class="kwrd">=&quot;basicHttpBinding&quot;</span> <span class="attr">bindingConfiguration</span><span class="kwrd">=&quot;NormalBinding&quot;</span> <span class="attr">contract</span><span class="kwrd">=&quot;IService&quot;</span> <span class="kwrd">/&gt;</span></pre>


<pre class="csharpcode">The new configuration will be , with only the secure endpoint available</pre>

<pre class="csharpcode">    <span class="kwrd">&lt;</span><span class="html">services</span><span class="kwrd">&gt;</span>
      <span class="kwrd">&lt;</span><span class="html">service</span> <span class="attr">name</span><span class="kwrd">=&quot;MyWebRole.MyService&quot;</span><span class="kwrd">&gt;</span>
        <span class="kwrd">&lt;</span><span class="html">endpoint</span> <span class="attr">binding</span><span class="kwrd">=&quot;basicHttpBinding&quot;</span> <span class="attr">bindingConfiguration</span><span class="kwrd">=&quot;SecureBinding&quot;</span> <span class="attr">contract</span><span class="kwrd">=&quot;IService&quot;</span> <span class="kwrd">/&gt;</span>
      <span class="kwrd">&lt;/</span><span class="html">service</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;/</span><span class="html">services</span><span class="kwrd">&gt;</span></pre>

<pre class="csharpcode"><span class="kwrd"></span></pre>

<p>To avoid any downtime you can publish this new configuration to Staging in Windows Azure and swap it , the details are here <a href="https://www.windowsazure.com/en-us/develop/net/common-tasks/staging-deployment/">Staging an application in Windows Azure</a></p>
]]></content:encoded>
    </item>
  </channel>
</rss>