<?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>pagarwal</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/pagarwal/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/pagarwal/feed.xml</link>
    <description />
    <lastBuildDate>Wed, 17 Apr 2019 03:41:30 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Release Management–Releases failing with Error: (404) Not Found.</title>
      <link>https://docs.microsoft.com/archive/blogs/pagarwal/release-managementreleases-failing-with-error-404-not-found</link>
      <pubDate>Sun, 29 Mar 2015 09:29:00 GMT</pubDate>
      <dc:creator><![CDATA[Pradeep Agarwal [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/pagarwal/2015/03/29/release-managementreleases-failing-with-error-404-not-found/</guid>
      <description><![CDATA[Recently one of the customer reported that the releases are failing with following stack trace....]]></description>
      <content:encoded><![CDATA[<p><br /><span style="font-size: small;">Recently one of the customer reported that the releases are failing with following stack trace. Essentially releases were failing while sending email notifications to the release step approvers.</span></p>
<p style="padding-left: 30px;"><span style="font-size: x-small;"><em>Message: The remote server returned an error: (404) Not Found.: \r\n\r\n </em></span></p>
<p style="padding-left: 30px;"><span style="font-size: x-small;"><em>at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: x-small;"><em>at Microsoft.TeamFoundation.Release.Data.WebRequest.PlatformHttpClient.EndGetResponse(IAsyncResult asyncResult)</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: x-small;"><em>at Microsoft.TeamFoundation.Release.Data.WebRequest.RestClientResponseRetriever.EndGetAsyncMemoryStreamFromResponse(IAsyncResult asyncResult, IPlatformHttpClient platformHttpClient)</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: x-small;"><em>at Microsoft.TeamFoundation.Release.Data.WebRequest.RestClientResponseRetriever.EndDownloadString(IAsyncResult asyncResult, IPlatformHttpClient platformHttpClient)</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: x-small;"><em>at Microsoft.TeamFoundation.Release.Data.WebRequest.RestClient.EndPost(IAsyncResult asyncResult)</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: x-small;"><em>at Microsoft.TeamFoundation.Release.Data.Proxy.RestProxy.HttpRequestor.&lt;&gt;c__DisplayClass1.&lt;GetPostCaller&gt;b__0(String url, String body)</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: x-small;"><em>at Microsoft.TeamFoundation.Release.Data.Proxy.RestProxy.BaseNotificationServiceProxy.SendNotification(Int32 releaseId, String releaseName, String applicationVersionName, String stageTypeName, String environmentName, Int32 releaseStepId, Int32 releaseStepTypeId, Boolean releaseStepIsAutomated)</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: x-small;"><em>at Microsoft.TeamFoundation.Release.Workflow.Services.ReleaseWorkflowService.CreateNextReleaseStep(Release release, Stage stage, StageStep stageStep, Int32 releaseStageRank, Int32 trialNumber)</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: x-small;"><em>at Microsoft.TeamFoundation.Release.Workflow.Services.ReleaseWorkflowService.Initiate(Release release)</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: x-small;"><em>at Microsoft.VisualStudio.Release.ViewModel.ViewModels.ReleaseViewModel.&lt;StartRelease&gt;b__85(Object sender, DoWorkEventArgs args)</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: x-small;"><em>at Microsoft.VisualStudio.Release.ViewModel.ViewModels.ReleaseViewModel.PerformActionAndRefresh(DoWorkEventHandler action, Boolean selectViewEditorBasedOnReleaseStatus)</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: x-small;"><em>at Microsoft.VisualStudio.Release.ViewModel.ViewModels.ReleaseViewModel.StartRelease()</em></span></p>
<p>&nbsp;</p>
<p><span style="font-size: small;"><span>It turned out to be the releases were failing because the release name contained special character &lsquo;#&rsquo; due to which POST Call URL was getting truncated after &lsquo;#&rsquo; char. </span><span>By URL specifications, &ldquo;#&rdquo; is a reference to the start of the current document. Thus, the character "#" should be excluded in that are passed in the URL because it is used to delimit a URI from a fragment identifier in URI. </span></span></p>
<p>&nbsp;</p>
<p><span style="font-size: small;">For Example, let say release name is &ldquo;My Release #1&rdquo;. While constructing SendNotification(Email notifications&nbsp;to the step approver) POST Call we expect below URL</span></p>
<p>POST&nbsp; <a href="https://rmserver:1000/account/releaseManagementService/_apis/releaseManagement/NotificationService/SendNotification?releaseId=1&amp;releaseName=My%20Release%20#1&amp;applicationVersionName=ReleaseTemplate1&amp;stageTypeName=Stage1&amp;environmentName=Environment1&amp;StepId=1&amp;releaseStepTypeId=1&amp;releaseStepIsAutomated=True">https://rmserver:1000/account/releaseManagementService/_apis/releaseManagement/NotificationService/SendNotification?releaseId=1&amp;releaseName=My%20Release%20<strong><span style="color: #ff0000; background-color: #ffff00;">#</span></strong>1&amp;applicationVersionName=ReleaseTemplate1&amp;stageTypeName=Stage1&amp;environmentName=Environment1&amp;StepId=1&amp;releaseStepTypeId=1&amp;releaseStepIsAutomated=True</a></p>
<p>But due to special meaning of <span style="color: #ff0000;">&lsquo;#&rsquo; </span><span style="color: #000000;">character, URL is truncated and below invalid POST call is made for SendNotification service.</span></p>
<p>POST&nbsp; <a href="https://rmserver:1000/account/releaseManagementService/_apis/releaseManagement/NotificationService/SendNotification?releaseId=1&amp;releaseName=My%20Release%20">https://rmserver:1000/account/releaseManagementService/_apis/releaseManagement/NotificationService/SendNotification?releaseId=1&amp;releaseName=My%20Release%20</a>&nbsp;</p>
<p>&nbsp;</p>
<ul>
<li><span style="font-size: small;">The above issue will occur if if any of the artifacts like <strong>ReleaseName, ReleaseTemplateName, StageTypeName or EnvironmentName </strong>contains special characters like &lsquo;#&rsquo;.</span></li>
<li><span style="font-size: small;">The workaround for now is please refrain from using special characters like &lsquo;#&rsquo; in any of the artifacts like <strong>Release Name, Release Template Name, Stage Name, Environment name</strong> etc. till this gets fixed in the future release of the Release Management product.</span></li>
</ul>
<p>&nbsp;</p>
<p>Thank You.</p>]]></content:encoded>
    </item>
    <item>
      <title>Release Management Client Silent Installation and Automatic Configuration</title>
      <link>https://docs.microsoft.com/archive/blogs/pagarwal/release-management-client-silent-installation-and-automatic-configuration</link>
      <pubDate>Tue, 24 Mar 2015 08:38:00 GMT</pubDate>
      <dc:creator><![CDATA[Pradeep Agarwal [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/pagarwal/2015/03/24/release-management-client-silent-installation-and-automatic-configuration/</guid>
      <description><![CDATA[There has been asks from customer on how to perform an unattended or silent installation of Release...]]></description>
      <content:encoded><![CDATA[<p>There has been asks from customer on how to perform an unattended or silent installation of Release Management Client and get it automatically pre-configured with the desired Release Management server url without a need to launch Release Management client and feed the server url manually. Below are the steps which one can follow to get this done.</p>
<h3><strong>How to Perform an unattended/silent installation of Release Management Client</strong></h3>
<p style="padding-left: 30px;">1. Download &ldquo;Release Management for Visual Studio 2013 with Update 4 RTM&rdquo; from your MSDN subscription using <a href="https://msdn.microsoft.com/subscriptions/downloads/#searchTerm=Release%20Management%20for%20Visual%20Studio%202013&amp;ProductFamilyId=0&amp;Languages=en&amp;PageSize=10&amp;PageIndex=0&amp;FileId=0">link</a></p>
<p style="padding-left: 30px;">2. Launch admin command prompt and run below command</p>
<p style="padding-left: 30px;">&nbsp;&nbsp;&nbsp; <strong><em>[PathToRMSetup]\rm_Client.exe /silent</em></strong></p>
<p><strong><span style="text-decoration: underline;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/70/18/0535.SilentInstall.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-70-18/0535.SilentInstall.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/70/18/0535.SilentInstall.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-70-18/0535.SilentInstall.png" alt="" border="0" /></a></span></strong></p>
<p><strong></strong>&nbsp;</p>
<h3><strong>How to Perform an unattended/silent installation of Release Management Client on large number of machines</strong></h3>
<p style="padding-left: 30px;">1. Download &ldquo;Release Management for Visual Studio 2013 with Update 4 RTM&rdquo; from your MSDN subscription using <a href="https://msdn.microsoft.com/subscriptions/downloads/#searchTerm=Release%20Management%20for%20Visual%20Studio%202013&amp;ProductFamilyId=0&amp;Languages=en&amp;PageSize=10&amp;PageIndex=0&amp;FileId=0">link</a></p>
<p style="padding-left: 30px;">2. Copy above setup on all remote machines where Release Management client installation is needed</p>
<p style="padding-left: 60px;">a. Launch &ldquo;Windows Powershell&rdquo; as different user(user who has admin permissions on all desired remote machines)</p>
<p style="padding-left: 60px;">b. Run below powershell command:-[ <span style="background-color: #ffff00;">C:\setup</span> in below command should be available on machine from where the command is being run]</p>
<p><strong><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; foreach ($name in&nbsp; "Remote-Machine1",&rdquo;Remote-Machine2") { Copy-Item "<span style="background-color: #ffff00;">C:\setup</span>" &ndash;Destination &rdquo;</em><a href="file:///\\$name\c$">\\$name\c$</a>"<em> -Recurse -force }</em></strong></p>
<p style="padding-left: 30px;">3. Run below powershell command targeting multiple remote machines:-</p>
<p><strong><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; foreach($name in "Remote-Machine1",&rdquo;Remote-Machine2"){invoke-command -computername "$name" -scriptblock {&amp;cmd.exe /c "<span style="background-color: #ffff00;">C:\setup\rm_Client.exe</span> /silent"}}</em></strong></p>
<p><strong><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </em>Note</strong>. The <span style="background-color: #ffff00;">highlighted</span> path is remote machine local path.</p>
<p>&nbsp;</p>
<h3><strong>How to Automatically Pre Configure Release Management Client with desired Release Management Server</strong></h3>
<p>When user install Release Management Client and launch it for the first time, below client configuration UI is launched and user need to configure the client with Release Management server. If user wants to get it auto configured without doing it manually, below are the steps for it.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/70/18/7041.clientConfigure.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-70-18/7041.clientConfigure.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/70/18/7041.clientConfigure.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-70-18/7041.clientConfigure.png" alt="" border="0" /></a></p>
<p><strong>Steps</strong></p>
<ol>
<li>Install Release Management Client</li>
<li>Take backup &amp; Edit "[ProgramFilesX86]\Microsoft Visual Studio 12.0\Release Management\Client\bin\Microsoft.TeamFoundation.Release.Data.dll.config"</li>
</ol>
<p style="padding-left: 30px;">a.&nbsp;Replace all instances of &ldquo;https://localhost:[0-9]*/&rdquo; with &ldquo;https://[RMServerName]:[port]/&rdquo;</p>
<p style="padding-left: 30px;">b. Set <span style="background-color: #ffff00;">highlighted</span> value to <strong>False</strong></p>
<p style="padding-left: 60px;"><em>&lt;setting name="RequestServerLocation" serializeAs="String"&gt;</em></p>
<p style="padding-left: 60px;"><em>&nbsp;&nbsp;&nbsp;&lt;value&gt;<span style="background-color: #ffff00;">True</span>&lt;/value&gt;</em></p>
<p style="padding-left: 60px;"><em>&lt;/setting&gt;</em></p>
<p style="padding-left: 30px;">c. Save the file&nbsp;</p>
<p><strong><span style="text-decoration: underline;">Note</span></strong>. You can use below powershell script to do edit the file as well rather than doing it manually</p>
<p style="padding-left: 30px;">$configFile = Join-Path ([Environment]::GetFolderPath('ProgramFilesX86')) 'Microsoft Visual Studio 12.0\Release Management\Client\bin\Microsoft.TeamFoundation.Release.Data.dll.config'</p>
<p style="padding-left: 30px;">(Get-Content $configFile) | ForEach-Object {$_ -replace "<a href="https://w+/d+/">https://\w+:\d+/</a>", 'https://hostname:port/'} | Set-Content $configFile</p>
<p style="padding-left: 30px;">$xml = [XML](Get-Content $configFile)</p>
<p style="padding-left: 30px;">$requestServerLocation = $xml.configuration.applicationSettings.'Microsoft.TeamFoundation.Release.Data.Properties.Settings'.ChildNodes | Where-Object { $_.name -eq 'RequestServerLocation' }</p>
<p style="padding-left: 30px;">$requestServerLocation.value = 'false'</p>
<p style="padding-left: 30px;">$xml.Save($configFile)</p>
<p>&nbsp;3. Launching client will auto connect with the specified RM server.</p>
<p><strong>Note</strong>. You can edit one such file and push it in all machines where you installed RM Client</p>
<p style="padding-left: 30px;">a. Launch Windows PowerShell as an user who has admin access on desired remote machines</p>
<p><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; foreach ($name in "Remote-Machine1",&rdquo;Remote-Machine2"){ Copy-Item&nbsp; "C:\temp\Microsoft.TeamFoundation.Release.Data.dll.config" -Destination</em><em> "<a href="file:///\\$name\c$\Program%20Files%20(x86)\Microsoft%20Visual%20Studio%2012.0\Release%20Management\Client\bin">\\$name\c$\Program Files (x86)\Microsoft Visual Studio 12.0\Release Management\Client\bin</a>" </em><em>-force -recurse}</em>&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
  </channel>
</rss>