<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Microsoft Azure App Service</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/waws/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/waws/feed.xml</link>
    <description>Tips and information on using Microsoft Azure App Service  from the Azure App Service support team.</description>
    <lastBuildDate>Mon, 18 Feb 2019 11:33:45 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>OneDrive deployment failure</title>
      <link>https://docs.microsoft.com/archive/blogs/waws/onedrive-deployment-failure</link>
      <pubDate>Thu, 31 Jan 2019 08:26:35 GMT</pubDate>
      <dc:creator><![CDATA[Gaurav Patole (MSFT)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/waws/?p=8135</guid>
      <description><![CDATA[Introduction

This article shows you how to troubleshoot a specific symptom that you may encounter...]]></description>
      <content:encoded><![CDATA[<strong>Introduction</strong>

This article shows you how to troubleshoot a specific symptom that you may encounter when performing deployment using OneDrive with Azure App Service. If you are using OneDrive and you notice failures during deployment, you may be interested to read this blog.

&nbsp;

<strong>Symptom</strong>: OneDrive deployment fails without clear indication of the underlying cause. Log files does not reveal much.

<a href="https://msdnshared.blob.core.windows.net/media/2019/01/OneDrive-Deployment-Failure.png"><img src="https://msdnshared.blob.core.windows.net/media/2019/01/OneDrive-Deployment-Failure.png" width="1174" height="202" /></a>

Fig: Portal shows deployment failed.

&nbsp;

<strong>Cause</strong>:
It may be difficult to know the underlying root cause of the issue from the logs. But once we understand the underlying architecture of OneDrive deployment, we may be ale to conjecture the cause. As we know Deployment from OneDrive (or FTP) is simply xcopying a new set of files over existing ones. If the files are already in use, xcopying would be prone to failure. This could be the most common issue that one might face during deployment. For example, in ASP.NET application deployment, during file change events, Roslyn (compiler) will be launched to recompile the payloads. So the Roslyn related files will be locked and trying to accessing them during xcopy will only lead to failure and hence deployment failure. Bottom line, OneDrive may not be suitable for this type of application. It might be more suitable for apps having static contents or node with node modules.

&nbsp;

<strong>Mitigation</strong>:
The mitigation steps would be to stop your web app before OneDrive deployment. After your deployment is finished, you can start your web app.

&nbsp;

<strong>Resolution</strong>:
Gauge if the continuous integration methods like OneDrive and DropBox are really required or else choose continuous deployment methods like Azure DevOps, GitHub, BitBucket, etc

&nbsp;
<p style="text-align: right"><strong>By - Shashank Ranjan (v-shranj@microsoft.com)</strong></p>]]></content:encoded>
    </item>
    <item>
      <title>Azure Storage Blob upload from browser</title>
      <link>https://docs.microsoft.com/archive/blogs/waws/azure-storage-blob-upload-from-browser</link>
      <pubDate>Thu, 25 Oct 2018 23:02:56 GMT</pubDate>
      <dc:creator><![CDATA[Prashant Pratap]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/waws/?p=7745</guid>
      <description><![CDATA[Many web application needs end-users to upload files for processing. And these files need to be...]]></description>
      <content:encoded><![CDATA[<p align="justify">Many web application needs end-users to upload files for processing. And these files need to be stored in a persisted storage. One common practice is, developers write code to upload the file and save it on the webserver itself. This approach is OK if the file size is small and/or smaller number of uploads. Recommended approach is, let the browse upload the files to Azure Storage directly without need to talk to webserver. This option, frees up webserver for other business processing.</p>
<p align="justify">For browser to talk to Azure Storage, instead of exposing storage connection string, we can use SAS Key (Share Access Security). SAS key is valid only for limited time and has specific permissions like write but not read or list. For more details on SAS keys please see <a href="https://docs.microsoft.com/en-us/azure/storage/common/storage-dotnet-shared-access-signature-part-1">here</a></p>
<p align="justify">Here is quick sample to upload blob files to Azure Storage from a browser directly and then process it the server side.</p>

<ol>
 	<li>
Blob files are uploaded directly from browser to Storage using SAS Key</li>
 	<li>
Browser sends the blob file name to Web server</li>
 	<li>
Web server access blob using connection string</li>
</ol>
<p align="center"><a href="http://dotnetdevlife.files.wordpress.com/2018/10/image.png"><img width="737" height="462" title="image" style="margin: 0px" alt="image" src="http://dotnetdevlife.files.wordpress.com/2018/10/image_thumb.png" border="0"></a></p>

<h1>1. Download JavaScript Client library for Azure Storage</h1>
<ul>
 	<li>Download the zip from <a title="https://aka.ms/downloadazurestoragejs" href="https://aka.ms/downloadazurestoragejs">https://aka.ms/downloadazurestoragejs</a></li>
 	<li>More details on this client library is found <a href="https://azure.microsoft.com/en-us/blog/new-azure-storage-javascript-client-library-for-browsers-preview/">here</a> and <a href="https://dmrelease.blob.core.windows.net/azurestoragejssample/samples/sample-blob.html#step2">here</a></li>
</ul>
<h1>2. Generate SAS token</h1>
<ol>
 	<li>
Log into Azure portal <a href="https://portal.Azure.com">https://portal.Azure.com</a></li>
 	<li>
Navigate to your Storage Account</li>
 	<li>
Click on the <strong>Share Access Signature</strong></li>
 	<li>
Select write only as shown below and click Generate SAS token button</li>
 	<li>
Copy SAS token</li>
 	<li>
Note : you may have to change expiry date/time if you are planning to use this SAS key for longer duration
<div align="center"><a href="http://dotnetdevlife.files.wordpress.com/2018/10/image1.png"><img width="885" height="817" title="image" style="margin: 0px" alt="image" src="http://dotnetdevlife.files.wordpress.com/2018/10/image_thumb1.png" border="0"></a></div></li>
</ol>
<h1>3. Enable CORS</h1>
<ol>
 	<li>
Log into Azure Portal <a href="https://portal.azure.com">https://portal.azure.com</a></li>
 	<li>
<div>Navigate to your Azure Storage account</div></li>
 	<li>
<div>Click on CORS</div></li>
 	<li>
Set these following values and hit Save button
<div align="center"><a href="http://dotnetdevlife.files.wordpress.com/2018/10/image2.png"><img width="1442" height="604" title="image" style="margin: 0px" alt="image" src="http://dotnetdevlife.files.wordpress.com/2018/10/image_thumb2.png" border="0"></a></div></li>
</ol>
<h1>4. Client side code</h1>
<ol>
 	<li>Extract the above zip file and copy the <strong>azure-storage.blob.min.js</strong> to your application scripts folder. For ASP.NET MVC application, you can copy it to <strong>Script</strong> folder as shown below
<p><div align="center"><a href="http://dotnetdevlife.files.wordpress.com/2018/10/image3.png"><img width="263" height="310" title="image" alt="image" src="http://dotnetdevlife.files.wordpress.com/2018/10/image_thumb3.png" border="0"></a></div>
</li>
 	<li>In your client side code, add these lines
[code language="javascript"]
<script src="~/Scripts/azure-storage.blob.min.js">
//this Azure Storage JavaScript Client Library
</script>

<p>Select file to upload to blob</p>
<p>
    
</p>
<p>
    <button>Upload to blob</button>
</p>
<p>
    <button>Do server side processing </button>
</p>

    <script>

        var blobname;
        function blobUpload() {
   // blob client
            var blobUri = 'https://STORAGENAME.blob.core.windows.net';
            var blobService = AzureStorage.Blob.createBlobServiceWithSas(blobUri, 'SASKEY');

            // blob upload
            var file = document.getElementById('blobFile').files[0];

            var customBlockSize = file.size &gt; 1024 * 1024 * 32 ? 1024 * 1024 * 4 : 1024 * 512;
            blobService.singleBlobPutThresholdInBytes = customBlockSize;

            var filename = file.name.substring(0, file.name.lastIndexOf('.'));
            var ext = file.name.substring(file.name.lastIndexOf('.'));

            blobname = filename + '_' + Math.random().toString(16).slice(2) + ext;

            var speedSummary = blobService.createBlockBlobFromBrowserFile('CONTAINER', blobname, file, { blockSize: customBlockSize }, function (error, result, response) {
                if (error) {
                    // Upload blob failed
                    alert("blob upload failed : check CORS");
                } else {
                    // Upload successfully
                    alert("blob upload successfull");
                }
            });

            var bcheckList = false;
            if (bcheckList) {
                // blob list
                blobService.listBlobsSegmented('CONTAINER', null, function (error, results) {
                    if (error) {
                        // List blobs error
                        alert("blob list failed : check SAS token");
                    } else {
                        for (var i = 0, blob; blob = results.entries[i]; i++) {
                            // blob object
                            alert("blob found : " + blob);
                        }
                    }
                });
            }
        }

        function serverside() {
            var newURL = location.protocol + "//" + location.host + "/Home/Contact?id=" + blobname;
            newURL = encodeURI(newURL)
            //alert(newURL);
            window.location = newURL;
        }

    </script>

[/code]
</li>

</ol>
<h1>5. Server side code</h1>
<ol>
 	<li>Add following code on your server side
[code language="csharp"]
public ActionResult Contact(string id)
{
// id is blob file name
    CloudStorageAccount storageAccount = null;

    CloudBlobContainer cloudBlobContainer = null;

    var storageConnectionString = "CONNECTION STRING TO STORAGE";
    CloudStorageAccount.TryParse(storageConnectionString, out storageAccount);

    CloudBlobClient cloudBlobClient = storageAccount.CreateCloudBlobClient();

    cloudBlobContainer = cloudBlobClient.GetContainerReference("CONTAINER");

    CloudBlockBlob cloudBlockBlob = cloudBlobContainer.GetBlockBlobReference(id);
            
    ViewBag.Message = "Your contact page.";

    return View();
}
[/code]
</li>
</ol>]]></content:encoded>
    </item>
    <item>
      <title>Azure DevOps to Azure AppServices</title>
      <link>https://docs.microsoft.com/archive/blogs/waws/azure-devops-to-azure-appservices</link>
      <pubDate>Thu, 25 Oct 2018 05:05:48 GMT</pubDate>
      <dc:creator><![CDATA[Prashant Pratap]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/waws/?p=7655</guid>
      <description><![CDATA[Azure DevOps is a complete solution for software development, from planning to building to...]]></description>
      <content:encoded><![CDATA[<p><br></p><p align="justify">Azure DevOps is a complete solution for software development, from planning to building to deployment. It has easy to use interface, with a nice flow from source code to publishing. <a href="https://docs.microsoft.com/en-us/azure/devops/user-guide/services">Here</a> is a nice link that talks about different services within Azure DevOps</p><p><br></p><p align="justify">Here are quick steps for on demand publishing websites from DevOps to AppService.</p><p align="justify">In this tutorial, we are going to show how to create a project in DevOps, upload source code to DevOps, build this source code and finally publish it to Azure AppService </p><p><br></p><h1>1. DevOps Portal</h1><ol><li>Log into DevOps Portal at <a href="https://dev.azure.com">https://dev.azure.com</a></li><li>Create a new project, by clicking on the <strong>New Project</strong> button as shown below</li><p><a href="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_NewProject.png"><img width="1156" height="364" title="DevOps_NewProject" alt="DevOps_NewProject" src="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_NewProject_thumb.png" border="0"></a></p>
<li>In the next screen, give a project name and click on the <b>Create</b> button<p><a href="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_ProjectName.png"><img width="710" height="761" title="DevOps_ProjectName" alt="DevOps_ProjectName" src="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_ProjectName_thumb.png" border="0"></a></p>
</li>
<li>Once the project is create, you can clone the repo in Visual Studio as shown below</li>
<li>If you like to push your existing code to this repo, select 2nd option
<p><a href="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_clone.png"><img width="748" height="521" title="DevOps_clone" alt="DevOps_clone" src="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_clone_thumb.png" border="0"></a></p>
</li>
</ol>
<h1>2. Visual Studio</h1><ol><li>When you click on <strong>Clone in Visual Studio</strong>, VS will prompt you to select a local path as shown below<p><a href="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_VSclone.png"><img width="504" height="229" title="DevOps_VSclone" alt="DevOps_VSclone" src="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_VSclone_thumb.png" border="0"></a></p></li>
<li>In the Visual Studio, select <b>Team Explorer</b> tab and click on <b>Create a new project</b> as shown below<p><a href="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_VS_Newproject.png"><img width="497" height="461" title="DevOps_VS_Newproject" alt="DevOps_VS_Newproject" src="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_VS_Newproject_thumb.png" border="0"></a></p></li>
<li>In the new project dialog, select <b>Web | ASP.NET Web Application</b> and give a project name as shown below<p><a href="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_VSNewWebsite.png"><img width="945" height="657" title="DevOps_VSNewWebsite" alt="DevOps_VSNewWebsite" src="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_VSNewWebsite_thumb.png" border="0"></a></p></li>

<li>In next window, select <b>MVC</b> and click <b>OK</b> button as shown below<p><a href="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_VSMVC.png"><img width="790" height="517" title="DevOps_VSMVC" alt="DevOps_VSMVC" src="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_VSMVC_thumb.png" border="0"></a></p></li>
<li>Once the project is created, in the <b>Solution Explorer</b> open <b>View | Shared | _Layout.cshtml</b> page
</li>



<li>Change the application name as shown below<p><a href="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_AppNameChange.png"><img width="983" height="446" title="DevOps_AppNameChange" alt="DevOps_AppNameChange" src="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_AppNameChange_thumb.png" border="0"></a></p></li>

<li>Now, lets check-in this code</li>
<li>In the <b>Team Explore</b>, click on the <b>Changes</b> button as shown below<p><a href="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_Changes.png"><img width="494" height="450" title="DevOps_Changes" alt="DevOps_Changes" src="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_Changes_thumb.png" border="0"></a></p></li>

<li>Enter a comment and commit the changes as shown below<p><a href="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_VSCommitAndPush.png"><img width="316" height="285" title="DevOps_VSCommitAndPush" alt="DevOps_VSCommitAndPush" src="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_VSCommitAndPush_thumb.png" border="0"></a></p></li>






<li>Browse to the Azure DevOps portal, go to <b>Code</b> tab, you should see the new project files as shown below<p><a href="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_CodeUploaded.png"><img width="524" height="460" title="DevOps_CodeUploaded" alt="DevOps_CodeUploaded" src="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_CodeUploaded_thumb.png" border="0"></a></p></li>
</ol>
<h1>3. Setup a Build pipeline in Azure DevOps</h1>
<ol>
<li>Now we have uploaded our source code to <b>Azure DevOps Repo</b>, lets build our source code</li>
<li>In the <b>Code</b>, click on the <b>Set up build</b> button<p><a href="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_SetupBuild.png"><img width="1220" height="417" title="DevOps_SetupBuild" alt="DevOps_SetupBuild" src="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_SetupBuild_thumb.png" border="0"></a></p></li>

<li>Select ASP.NET template from the list as shown below<p><a href="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_BuildTemplate2.png"><img width="690" height="626" title="DevOps_BuildTemplate2" alt="DevOps_BuildTemplate2" src="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_BuildTemplate2_thumb.png" border="0"></a></p></li>

<li>Change the name and click on <b>Save &amp; Queue</b> as shown below<p><a href="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_BuildSaveAndQueue.png"><img width="487" height="428" title="DevOps_BuildSaveAndQueue" alt="DevOps_BuildSaveAndQueue" src="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_BuildSaveAndQueue_thumb.png" border="0"></a></p></li>

<li>In the next window, click <b>Save &amp; Queue</b>
<p><a href="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_BuildSaveAndQueue2.png"><img width="694" height="729" title="DevOps_BuildSaveAndQueue2" alt="DevOps_BuildSaveAndQueue2" src="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_BuildSaveAndQueue2_thumb.png" border="0"></a></p></li>

<li>Once the build is queued, you can click on the build name to get more details as shown below<p><a href="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_BuildLink.png"><img width="555" height="267" title="DevOps_BuildLink" alt="DevOps_BuildLink" src="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_BuildLink_thumb.png" border="0"></a></p></li>


<li>Once the build is successfull, it is time to Publish</li>



</ol>
<h1>4. Publish to Azure AppService</h1>
<ol>
<li>To create a <b>Release Pipeline</b>, click on the <b>Release</b> button as shown below<p><a href="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_BuildReport.png"><img width="651" height="921" title="DevOps_BuildReport" alt="DevOps_BuildReport" src="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_BuildReport_thumb.png" border="0"></a></p></li>


<li>In the template window, select <b>Empty Job</b> as shown below<p><a href="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_ReleaseEmptyJob.png"><img width="1014" height="596" title="DevOps_ReleaseEmptyJob" alt="DevOps_ReleaseEmptyJob" src="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_ReleaseEmptyJob_thumb.png" border="0"></a></p></li>

<li>Next goto <b>Tasks</b> tab and search for <b>Azure AppService</b></li>
<li>Select <b>Azure App Service Deploy</b> as shown below
<p><a href="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_PublishTask.png"><img width="1211" height="555" title="DevOps_PublishTask" alt="DevOps_PublishTask" src="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_PublishTask_thumb.png" border="0"></a></p>
</li>
<li>Click on the <b>Azure App Service Deploy</b>, <font>select Version <b>4.*(preview)</b></font></li>
<li>Select Azure Subscription and click on the <b>Authorize</b> button<p><a href="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_AzureSubAuth.png"><img width="692" height="517" title="DevOps_AzureSubAuth" alt="DevOps_AzureSubAuth" src="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_AzureSubAuth_thumb.png" border="0"></a></p></li>

<li>Now, select <b>Web App on Windows</b>
</li>
<li>Next, select a AppService Website as shown below<p><a href="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_AppServiceName.png"><img width="698" height="520" title="DevOps_AppServiceName" alt="DevOps_AppServiceName" src="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_AppServiceName_thumb.png" border="0"></a></p></li>


<li>Once the publish settings are done, click on <b>Save</b> as shown below<p><a href="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_PublisheSave.png"><img width="1018" height="735" title="DevOps_PublisheSave" alt="DevOps_PublisheSave" src="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_PublisheSave_thumb.png" border="0"></a></p></li>
</ol>
<h1>4. Setup a Release </h1>
<ol>
<li>Once the publish pipeline is done, you can click on the <b>Create a Release</b> button as shown below
<p><a href="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_ReleaseButton2.png"><img width="1056" height="310" title="DevOps_ReleaseButton2" alt="DevOps_ReleaseButton2" src="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_ReleaseButton2_thumb.png" border="0"></a></p></li>
<li>In the next dialogbox, select <b>Stage 1</b> and click on <b>Create button</b><p><a href="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_CreateRelease.png"><img width="442" height="818" title="DevOps_CreateRelease" alt="DevOps_CreateRelease" src="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_CreateRelease_thumb.png" border="0"></a></p></li>
<li>Now deploy this Release to Azure</li>
<li>Click on the <b>Release-1</b>as shown below<p><a href="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_ReleaseLogButton.png"><img width="519" height="525" title="DevOps_ReleaseLogButton" alt="DevOps_ReleaseLogButton" src="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_ReleaseLogButton_thumb.png" border="0"></a></p></li>


<li>Next, click on the <b>Deploy</b> button as shown below<p><a href="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_Deploy.png"><img width="679" height="652" title="DevOps_Deploy" alt="DevOps_Deploy" src="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_Deploy_thumb.png" border="0"></a></p></li>
<li>In the next dialogbox, click on <b>Deploy</b> button as shown below<p><a href="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_deployCreate.png"><img width="372" height="515" title="DevOps_deployCreate" alt="DevOps_deployCreate" src="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_deployCreate_thumb.png" border="0"></a></p></li>
<li>This should start the deployment. You can click on the <b>In progress</b> link to get details as shown below<p><a href="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_DeployLogsButton.png"><img width="699" height="665" title="DevOps_DeployLogsButton" alt="DevOps_DeployLogsButton" src="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_DeployLogsButton_thumb.png" border="0"></a></p></li>
<li>Here is the screenshot when the deployment is completed<p><a href="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_Deployed.png"><img width="822" height="516" title="DevOps_Deployed" alt="DevOps_Deployed" src="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_Deployed_thumb.png" border="0"></a></p></li></ol>
<h1>5. Website</h1>
<ol>
<li>
Now browse to your Azure AppService website, you should see the <b>Wabac</b> as shown below
<p><a href="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_publishedwebsite.png"><img width="698" height="406" title="DevOps_publishedwebsite" alt="DevOps_publishedwebsite" src="https://msdnshared.blob.core.windows.net/media/2018/10/DevOps_publishedwebsite_thumb.png" border="0"></a></p></li>
</ol>]]></content:encoded>
    </item>
    <item>
      <title>Call Azure AD protected website using Managed Service Identity (MSI)</title>
      <link>https://docs.microsoft.com/archive/blogs/waws/call-azure-ad-protected-website-using-managed-service-identity-msi</link>
      <pubDate>Tue, 23 Oct 2018 00:44:31 GMT</pubDate>
      <dc:creator><![CDATA[Prashant Pratap]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/waws/?p=7045</guid>
      <description><![CDATA[Lets say you have Web APIs hosted in an Azure AppService and these Web APIs are protected using...]]></description>
      <content:encoded><![CDATA[<p align="justify">Lets say you have Web APIs hosted in an Azure AppService and these Web APIs are protected using Azure AD (EasyAuth). Now you would like to consume them from another website. One approach is using Service Principal account, where you create an Azure AD Application and use ClientID and secret in your website to get an Azure AD Token. Here are the <a href="https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-create-service-principal-portal">steps</a>. Main disadvantage of this approach is that your application is responsible to protect the ClientID and secret. You can save them in the AppSettings instead of saving it in the web.config file. Or you can use Azure Key Vault. For Key Vault, your code needs to authenticate to access Key Vault. </p><p align="justify">Better approach is <strong>Managed Identity</strong>. This option allows to access protected Azure AD resources without any need for secrets or credentials in your code or in web.config. More details on Manage Identity can be found <a href="https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/overview">here</a>&nbsp;</p><p>Here are the quick steps to use <strong>Managed Service Identity</strong> Azure AppService</p><ol><li>Create a Azure AppService Website and protect it with Azure AD (EasyAuth). This will be our Web API website</li><li>Create another Azure AppService Website and enable Managed Service Identity. This will be our client trying to consume above Web APIs</li><li>Write code to get token using <strong>Managed Identity</strong> and pass it to Web API call</li></ol><p><br></p><h1>1. WebAPI website with EasyAuth</h1><ul><li>Log into <a href="https://portal.azure.com">Azure portal</a></li><li>Click on the “<strong>+ Create a resource</strong>” on top left</li><li>In the Search textbox type “<strong>web app</strong>”</li><li>Select “<strong>Web App</strong>”</li><li>Click on the “<strong>Create</strong>” button</li><li>Provide App name, resource group name, appservice plan</li><li>(in my sample code this is <strong>WabacOneAD</strong>)</li><li>Click on “<strong>Create</strong>” button</li><li>Once the website is created, go to the resource</li><li>Click on the “<strong>Authentication / Authorization</strong>” blade</li><li>Enable “<strong>App Service Authentication</strong>”</li><li>Select “<strong>Log in with Azure AD</strong>” from dropdownbox </li><li>Select <strong>Azure AD</strong> as provider</li><li>Select <strong>Express</strong> option and click OK</li><li>Now click on the <strong>Save</strong> button</li></ul><h1>2. Website with MSI</h1><ul><li>Log into Azure portal</li><li>Click on the <strong>“+ Create a resource</strong>” on top left</li><li>In the Search textbox type “<strong>web app</strong>”</li><li>Select “<strong>Web App</strong>”</li><li>Click on the “<strong>Create</strong>” button</li><li>Provide App name, resource group name, appservice plan</li><li>(in my sample code this is <strong>WabacOne</strong>)</li><li>Click on “<strong>Create</strong>” button</li><li>Once the website is created, go to the resource<br>
</li><li>Click on the “<strong>Managed service identity</strong>” blade</li><li>Click on “<strong>On</strong>”</li><li>Click <strong>Save</strong> button</li></ul><h1>3. Now for the code</h1><ul><li>Open Visual Studio</li><li>Create a new Website project (either .net core or .net framework)</li><li>Select MVC option</li><li>In the <strong>Home</strong> controller, add following code to <strong>About</strong> action <br>
[code language="csharp"]
public ActionResult About()
{
    ViewBag.Message = "User Name is " + User.Identity.Name; 
    return View();
}
[/code]

</li><li>In the <strong>Contact</strong> action, add following code <br>
[code language="csharp"]
static HttpClient client = new HttpClient();
public ActionResult Contact()
{
    var azureServiceTokenProvider = new AzureServiceTokenProvider();
    var accessTokenTask = azureServiceTokenProvider.GetAccessTokenAsync("https://wabaconead.azurewebsites.net/"); 

    accessTokenTask.Wait();
    var accessToken = accessTokenTask.Result;

    var url = "https://wabaconead.azurewebsites.net/home/about";
    client.DefaultRequestHeaders.Authorization =  new AuthenticationHeaderValue("Bearer", accessToken);

    var responseTask = client.GetStringAsync(url);
    responseTask.Wait();
    var response = responseTask.Result;

    ViewBag.Message = "Your contact page." + accessToken + " HTML Response " + response;

    return View();
}

[/code]
</li><li>You may need to add <a href="https://www.nuget.org/packages/Microsoft.Azure.Services.AppAuthentication">Microsoft.AzureServices.AppAuthentication</a> NuGet Package</li><li>Now deploy this website to above two websites</li><li>When you access the first website, you get promoted for Azure AD credential so we are sure that this website is protected with Azure AD</li><li>Now try to access Home/About…this should return your email address you have used to log into Azure AD</li><li>Now browse to the second website, access the Home/Contact…this should call the first website and display the content. Now check for the username (search for text “<strong>User Name is</strong>”)</li></ul><p><br></p><h1><font>4. Note, there is a bug in the EasyAuth / Express options. </font></h1><p>It doesn't add the website URL in the allowed token audiences. Follow these steps to fix this bug</p><ul><li>Go to the first website in Azure portal</li><li>Click on the <strong>Authentication / Authorization</strong> blade</li><li> Click on the <strong>Azure AD</strong></li><li> Change it from <strong>Express</strong> to <strong>Advanced</strong></li><li>In the <strong>Allowed Token Audiences</strong> add your website URL as shown below</li><li>Click <strong>OK</strong></li><li>Click <strong>Save</strong></li></ul><p><strong><a href="http://dotnetdevlife.files.wordpress.com/2018/10/msi.png"><img width="1700" height="635" title="MSI" alt="MSI" src="http://dotnetdevlife.files.wordpress.com/2018/10/msi_thumb.png" border="0"></a></strong></p>]]></content:encoded>
    </item>
    <item>
      <title>Troubleshooting missing projects while using VSTS continuous deployment for Azure App Service</title>
      <link>https://docs.microsoft.com/archive/blogs/waws/troubleshooting-missing-projects-while-using-vsts-continuous-deployment-for-azure-app-service</link>
      <pubDate>Tue, 16 Oct 2018 08:39:01 GMT</pubDate>
      <dc:creator><![CDATA[Gaurav Patole (MSFT)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/waws/?p=6985</guid>
      <description><![CDATA[Authored By: Shashank Ranjan

Introduction
This article shows you how to troubleshoot a specific...]]></description>
      <content:encoded><![CDATA[<p style="text-align: right">Authored By: Shashank Ranjan</p>
</p>
<strong>Introduction</strong>
This article shows you how to troubleshoot a specific symptom that you may encounter when configuring continuous deployment for Azure App Service. App Service enables continuous deployment from Bitbucket, GitHub, and Azure DevOps Services by pulling in the most recent updates from your existing repository in one of these services. If you are using Visual Studio Team Services and you face issue while selecting your project, you can continue reading below.

<strong>Symptom:</strong> User not able to see projects for VSTS Continuous deployment.

<a href="https://msdnshared.blob.core.windows.net/media/2018/10/Fig-1.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/10/Fig-1.png" width="780" height="457" /></a>

<p>Figure 1: User not able to see his/her project if selected VSTS as source.</p>

<strong>Cause:</strong> The root cause pertains to the Access Level.
Example: Under Organization Settings Users

<a href="https://msdnshared.blob.core.windows.net/media/2018/10/Fig-2.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/10/Fig-2.png" width="1791" height="480" /></a>

<p>Figure 2: Access level of the user in Azure DevOps project.</p>

<strong>Resolution:</strong> On the ‘Users’ screen (https://{account}. dev.azure.com/_admin/_users), observe the assigned license for the specific user. The user must have a "Basic" license assigned. Even with 5 free users, it's possible to set someone to the Stakeholder category.

<a href="https://msdnshared.blob.core.windows.net/media/2018/10/Fig-3.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/10/Fig-3.png" width="1515" height="485" /></a>

<p>Figure 3: User need to have BASIC permission level.</p>

If your VSTS account is linked to Active Directory it is possible you may have added the user both as an Azure Active Directory (School/Work Account) as well as a Microsoft Account (formerly LiveID). These count as two separate users and each require their own license.

And finally, by adding someone to the [Project]Stakeholders security group, you basically limit their access as well. If you want to assign more creative security permissions, you may need to setup your own security group and assign the exact permissions you want for those users to that group.

Once the Access Level is set to Basic, you will be able to see your projects.

<a href="https://msdnshared.blob.core.windows.net/media/2018/10/Fig-4.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/10/Fig-4.png" width="790" height="536" /></a>

<p>Figure 4: User can see and select his project if VSTS is selected as source.</p>]]></content:encoded>
    </item>
    <item>
      <title>Run From Package and Slot Swap With Preview</title>
      <link>https://docs.microsoft.com/archive/blogs/waws/run-from-package-and-slot-swap-with-preview</link>
      <pubDate>Fri, 21 Sep 2018 00:01:09 GMT</pubDate>
      <dc:creator><![CDATA[Prashant Pratap]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/waws/?p=6955</guid>
      <description><![CDATA[Run From Package deployment has many advantages and makes DevOPs life much easier. No more live...]]></description>
      <content:encoded><![CDATA[<p><br></p><p><strong>Run From Package</strong> deployment has many advantages and makes DevOPs life much easier. No more live editing, no more file in use error, better cold start performance, same version gets deployed across multiple AppServices, etc. For more details please click on this <a href="https://github.com/Azure/app-service-announcements/issues/84" target="_blank">link</a></p><p><strong>Slot Swap with Preview</strong> options allows you to do a final sanity check and warmup the website before taking on production load. For more details please see this <a href="https://blogs.msdn.microsoft.com/waws/2016/12/12/slot-swap-with-preview/" target="_blank">link</a> and this <a href="https://docs.microsoft.com/en-us/azure/app-service/web-sites-staged-publishing#swap-with-preview-multi-phase-swap" target="_blank">one</a></p><p>FYI, for high availability and better network performance, you should consider hosting your website in multiple regions and configuring a Azure Traffic Manager. For more details please see this <a href="https://docs.microsoft.com/en-us/azure/traffic-manager/traffic-manager-overview" target="_blank">link</a>. Websites with heavy graphic, it is recommended to use CDN and upload all media files to Azure Storage. For more details please click on this <a href="https://docs.microsoft.com/en-us/azure/cdn/cdn-overview" target="_blank">link</a>. This will reduce the size of package zip file.</p><p>Combining these above two features, we will be able to do better controlled deployment with least amount of downtime.</p><p>Here is sample PowerShell script to streamline deployments using these two features :&nbsp; </p><p>Main steps in this PowerShell scripts are </p><ol><li>Upload the zip file to Azure Storage and get SAS url</li><li>Add this SAS url to the appsetting of AppService website</li><li>Initiate Slot Swap With Preview</li><li>Test the slot website and do the warmup </li><li>Commit Slot Swap With Preview</li></ol><p>

[code language="ps"]
#Login-AzureRmAccount

# provide your web package name
$zipFilePath = ".\V1.zip"

# provide your storage account detail 
$storageAccountName = "runaspacakge"
$storageResourceGroupName = "runaspackagecentralus"
$containerName = "mypackage"

# provide your website details
$websiteResourceGroupName = "runaspackagecentralus"
$slotName = "preprod"
$website1Names = "runaspackageeastus", "runaspackagecentralus"



# set the package name to current datetime
$uploadPackageName = (Get-Date).ToString("yyyyMMddHHmmss")

Write-Host "New package name will be "$uploadPackageName".zip" 

Write-Host "trying to get storage..."
$storageAccount = Get-AzureRmStorageAccount -ResourceGroupName $resourceGroupName `
                                -Name $storageAccountName

Write-Host "trying to get storage context..."
$ctx = $storageAccount.Context

Write-Host "trying to upload to blob..."
$blobupload = Set-AzureStorageBlobContent -File  $zipFilePath `
                                -Container $containerName `
                                -Blob $uploadPackageName `
                                -Context $ctx 

Write-Host "trying to get SAS URL..."
$sastokenURL = New-AzureStorageBlobSASToken -Container $containerName -Blob $uploadPackageName -Context $ctx -Permission rwdl -FullUri

foreach($website1Name  in $website1Names )
{
    Write-Host $website1Name
    Write-Host "`t trying to get website..." 
    $webApp =  Get-AzureRmWebAppSlot -ResourceGroupName $websiteResourceGroupName `
                        -Name $website1Name `
                        -Slot $slotName


    Write-Host "`t trying to get appsettings..."
    $currentAppSettings = $webApp.SiteConfig.AppSettings
 
    $appsettings = @{}

    ForEach ($kvp in $currentAppSettings) {
    $appsettings[$kvp.Name] = $kvp.Value
    }

    # update package URL
    $appsettings['WEBSITE_RUN_FROM_PACKAGE'] = "$sastokenURL"

    Write-Host "`t trying to set appsetting..."
    $setappSetting = Set-AzureRMWebAppSlot -ResourceGroupName $websiteResourceGroupName `
                                -Name $website1Name `
                                -AppSettings $appsettings `
                                -Slot $slotName `

}

$ans = Read-Host 'Start slot swap with preview? (Y/N)'
if( $ans -eq 'Y' -OR $ans -eq 'y')
{
 
}
else
{
    Exit
} 

foreach($website1Name  in $website1Names )
{
    Write-Host $website1Name
    Write-Host "`t trying to swap with preview..."
    Switch-AzureRmWebAppSlot -ResourceGroupName $websiteResourceGroupName `
        -Name $website1Name `
        -SourceSlotName $slotName `
        -DestinationSlotName production `
        -SwapWithPreviewAction ApplySlotConfig

    Write-Host "`t sending a test web request to slot website..."
    $response = Invoke-WebRequest -Uri $webApp.HostNames[0]
    write-host "`t test request status code is " $response.StatusCode

    Write-Host "`t test slot website now...http://"$webApp.HostNames[0]
    $ans = Read-Host "`t Commit this swap? (Y/N)"

    if( $ans -eq 'Y' -OR $ans -eq 'y')
    {
        Write-Host "`t`t Completing slot with preview swap..."
        Switch-AzureRmWebAppSlot -ResourceGroupName $websiteResourceGroupName `
                    -Name $website1Name `
                    -SourceSlotName $slotName `
                    -DestinationSlotName production `
                    -SwapWithPreviewAction CompleteSlotSwap
    }
    else
    {
        Write-Host "`t`t Canceling slot with preview swap..."
        Switch-AzureRmWebAppSlot -ResourceGroupName $websiteResourceGroupName `
                -Name $website1Name `
                -SourceSlotName $slotName `
                -DestinationSlotName production `
                -SwapWithPreviewAction ResetSlotSwap
    }
}
Write-Host "DONE"
[/code]</p><p>Here is screenshot of output of this above PowerShell script :</p><p><a href="https://msdnshared.blob.core.windows.net/media/2018/09/image88.png"><img width="641" height="367" title="image" style="margin: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2018/09/image_thumb77.png" border="0"></a></p><p>If there are any errors downloading the zip file from blob storage, you should see <font><strong>FAILED TO DOWNLOAD ZIP FILE.txt</strong></font> in the <strong>wwwroot</strong> folder as shown below:</p><p><a href="https://msdnshared.blob.core.windows.net/media/2018/09/image89.png"><img width="690" height="246" title="image" style="margin: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2018/09/image_thumb78.png" border="0"></a></p>]]></content:encoded>
    </item>
    <item>
      <title>Setting up Application Gateway with WAF with an App Service that uses multiple Custom Domain names</title>
      <link>https://docs.microsoft.com/archive/blogs/waws/setting-up-application-gateway-with-waf-with-an-app-service-that-uses-multiple-custom-domain-names</link>
      <pubDate>Wed, 18 Jul 2018 21:22:02 GMT</pubDate>
      <dc:creator><![CDATA[Prashant Pratap]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/waws/?p=6855</guid>
      <description><![CDATA[This post was contributed by Salahuddin Khatri.
Setting up Application Gateway with WAF with an App...]]></description>
      <content:encoded><![CDATA[<strong>This post was contributed by Salahuddin Khatri.</strong>
<h3>Setting up Application Gateway with WAF with an App Service that uses multiple Custom Domain names</h3>
I came across in a scenario in which customer is using WordPress Multisite configuration on Azure App Service with Linux (Multitenant) and publishing Azure App Service using Application Gateway to utilize WAF functionality.

Just so you know the template available in Azure Market Place for WordPress with App Service on Linux is deployed on a Linux container and you cannot enable Multisite feature in it unless you modify the container and then deploy the whole container, I have decided to deploy the App Service on Linux and then installed WordPress in it and then enabled Multi Site feature. For Those who doesn’t know the Multi site feature of WordPress, A multisite network is a collection of sites that all share the same WordPress installation. They can also share plugins and themes. The individual sites in the network are virtual sites in the sense that they do not have their own directories on your server, although they do have separate directories for media uploads within the shared installation, and they do have separate tables in the database for more information please review here <a href="https://codex.wordpress.org/Create_A_Network">https://codex.wordpress.org/Create_A_Network</a>.

Just to let you know what are we going to do in this article, we will go through step by step where we are going to use Azure App Service (Multitenant) with multiple custom domain names and we are going to publish Azure App Service using Application Gateway with WAF, where application gateway will accept multiple custom domain names and will forward the request to one back end which is Azure App Service (Multitenant), I will not go through installing App Service and installing WordPress along with Multisite configuration, as this is a unique scenario I thought to write a blog post about it.
<h4>Prerequisites</h4>
As a prerequisite there is nothing much, but it would be assumed that App Service is deployed and configured, application gateway is deployed but not configured because we are going to do that together and access to External DNS
<h4>Before We Start!!</h4>
Before we start, since I have two websites which I want to access using Application Gateway, in this blog I am going to use my own custom domain name salah.co whereas kw.salah.co and pk.salah.co will be subdomain names added and verified in Azure App Service using awverify and CNAME record will be pointing to Application gateway IP Address domain name.

Ok enough about scenario and let us get it going further with real work
<h4>Adding Custom Domain in Web Apps</h4>
We are going to need to prepare the App Service to accept requests on the custom domain that routes through the Application Gateway. For this, we need to first add the custom domain on the App Service. You can follow the regular guide to configure a custom domain by using awverify records to avoid adjusting the domain’s actual records (<a href="https://docs.microsoft.com/en-us/azure/app-service/app-service-custom-domain-name-migrate">https://docs.microsoft.com/en-us/azure/app-service/app-service-custom-domain-name-migrate</a>), since our purpose is to add custom domain name in Azure and for that we have to use awverify record in external DNS pointing to App Service URL so that App Service will allow us to add those custom domain names. Go to your external DNS and based on your domain names create the txt records pointing to App Service URL, below is what I have done in my External DNS

<a href="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image0023.jpg"><img width="629" height="103" title="clip_image002" style="margin: 0px" alt="clip_image002" src="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image002_thumb3.jpg" border="0" /></a>

Let us open App Service and go to Custom Domain option and click on <b>Add hostname </b>to add the required domains

<a href="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image0042.jpg"><img width="628" height="370" title="clip_image004" style="margin: 0px" alt="clip_image004" src="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image004_thumb2.jpg" border="0" /></a>

On the Add hostname under <b>hostname </b>write down the required domain <b>pk.salah.co</b> and click <b>Validate</b>

<a href="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image0061.jpg"><img width="291" height="178" title="clip_image006" style="margin: 0px" alt="clip_image006" src="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image006_thumb1.jpg" border="0" /></a>

As the awverify txt record is already created, Azure App Service has verified domain ownership and hostname availability, click on <b>Add hostname</b> to add the domain name in Azure App Service, do the same for your other domains

<a href="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image008.jpg"><img width="214" height="335" title="clip_image008" style="margin: 0px" alt="clip_image008" src="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image008_thumb.jpg" border="0" /></a>

I have added both domains in Azure App Service

<a href="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image0101.jpg"><img width="628" height="370" title="clip_image010" style="margin: 0px" alt="clip_image010" src="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image010_thumb1.jpg" border="0" /></a>
<h4>Setting up the Application Gateway</h4>
Now we have added custom domains in Azure App Service, let us configure application gateway with WAF to accept custom multiple domain names and send it to Azure App Service, I have also done other configuration in Azure App Service with WordPress and Multisite configuration to Map the domains etc.

We are going to use the mixture of PowerShell and GUI for this, as some required settings we need to set are only available in PowerShell for now.

The typical guide for setting up an App Service behind an existing Application Gateway is here: <a href="https://docs.microsoft.com/en-us/azure/application-gateway/application-gateway-web-app-powershell#configure-a-web-app-behind-an-existing-application-gateway">https://docs.microsoft.com/en-us/azure/application-gateway/application-gateway-web-app-powershell#configure-a-web-app-behind-an-existing-application-gateway</a>, however this guide will help you to configure the application gateway with default configuration to connect with Azure App Service, where App service is configured with one custom domain name or no custom domain name at all, as well as same guide can create application gateway if does not exist and the connect with Azure App service, where App service is configured with one custom domain name or no custom domain name at all.

Our scenario is different, we have multiple custom domain names and we want Application Gateway to accept and connect to Azure App Service with multiple domain names where I have configured Multi Site with WordPress.

Here is What are we going to do,

1. We will create an application gateway with WAF

2. We will configure default Backend pool to connect to App Service

3. We will create two new http Settings with custom probe one for each domain, if you have more than one domain then you must create Http Settings based on number of custom domains

4. We will create two multi-site listeners one for each domain, if you have more then one domain then you must create listeners based on number of custom domains

5. We will create two Rules one for each Listener

6. We will delete default Application Gateway settings

7. We will run commands from PowerShell to create custom Probe with required settings to make it work for App service

8. We will configure Http settings to accept and work for custom domains
<h4></h4>
<h4></h4>
<h4></h4>
<h4></h4>
<h4></h4>
<h4>Create Application Gateway</h4>
Input the application gateway name, location and RG on the basic information blade, I am naming my application gateway as testappgw

<a href="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image0121.jpg"><img width="405" height="570" title="clip_image012" style="margin: 0px" alt="clip_image012" src="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image012_thumb1.jpg" border="0" /></a>

I am going to select a VNET with dedicated subnet for application gateway, select the Public IP under IP Address type and then select create new Public IP Address, define the name for the DNS name of the Public IP Address, this is necessary because we are going to use this name for CNAME creation with your own DNS, configure Listener with port 80 since in this example I am going to have HTTP website, select other required options and click OK review the settings and then click ok

<a href="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image0141.jpg"><img width="378" height="817" title="clip_image014" style="margin: 0px" alt="clip_image014" src="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image014_thumb.jpg" border="0" /></a>

Since the application gateway is created, we will now start creating HTTP Settings, Multisite Listener etc as mentioned before
<h5>Editing existing / default Backend pool to connect App Service</h5>
On the Application Gateway with WAF Enabled, click on <b>Backend Pools </b>then open the default <b>appGatewayBackendPool </b>

<a href="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image0161.jpg"><img width="682" height="247" title="clip_image016" style="margin: 0px" alt="clip_image016" src="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image016_thumb.jpg" border="0" /></a>

under name type the name of Azure Web App in our scenario it is <b>sitewordpressss.azurewebsites.net</b> then save

<a href="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image018.jpg"><img width="628" height="323" title="clip_image018" style="margin: 0px" alt="clip_image018" src="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image018_thumb.jpg" border="0" /></a>
<h5>Add new HTTP Settings</h5>
Create two HTTP Settings, one for each custom domain name, if you have more custom domain name then you can create HTTP settings based on the number of domains

On the Application Gateway with WAF Enabled, click on <b>HTTP Settings </b>then click on <b>Add</b>, we will delete the default one once all dependencies are deleted.

<a href="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image020.jpg"><img width="361" height="319" title="clip_image020" style="margin: 0px" alt="clip_image020" src="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image020_thumb.jpg" border="0" /></a>

On the Add HTTP Settings, fill the fields, as per my scenario I do not need other settings to be enabled, changed Request timeout to <b>30</b> as per requirements.

<a href="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image022.jpg"><img width="331" height="344" title="clip_image022" style="margin: 0px" alt="clip_image022" src="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image022_thumb.jpg" border="0" /></a>

Do the same for other custom domain name, since I have two I have created two HTTP settings

<a href="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image024.jpg"><img width="346" height="302" title="clip_image024" style="margin: 0px" alt="clip_image024" src="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image024_thumb.jpg" border="0" /></a>

As you can see I have now total 3 HTTP settings, two I have created just now and the third default one which we will delete soon, notice there is no custom probe as of now, we are going to add one using PowerShell

<a href="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image026.jpg"><img width="628" height="139" title="clip_image026" style="margin: 0px" alt="clip_image026" src="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image026_thumb.jpg" border="0" /></a>
<h4>Add Multi Site Listener for customer domain</h4>
Create two Multi Site Listeners, one for each custom domain name, if you have more custom domain name then you can create Multi Site Listeners based on the number of domains

On the Application Gateway with WAF Enabled, click on <b>Listeners </b>then click on <b>Multi-Site</b>, we will delete the default one once all dependencies are deleted.

<a href="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image028.jpg"><img width="592" height="299" title="clip_image028" style="margin: 0px" alt="clip_image028" src="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image028_thumb.jpg" border="0" /></a>

On the Add, name the listener, under <b>Host name</b> make sure to add the domain name, do the same for other custom domain names, since we did not add or change anything on Frontend IP Configuration or Frontend port we will not select anything else.

<a href="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image030.jpg"><img width="385" height="312" title="clip_image030" style="margin: 0px" alt="clip_image030" src="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image030_thumb.jpg" border="0" /></a>

<a href="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image032.jpg"><img width="396" height="231" title="clip_image032" style="margin: 0px" alt="clip_image032" src="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image032_thumb.jpg" border="0" /></a>

You will see three listeners, two we have created just now and third is the default one. We will delete default one soon.

<a href="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image034.jpg"><img width="628" height="166" title="clip_image034" style="margin: 0px" alt="clip_image034" src="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image034_thumb.jpg" border="0" /></a>
<h4>Create Rule</h4>
Create two Rules, one for each custom domain name, if you have more custom domain name then you can create Rules based on the number of domains

On the Application Gateway with WAF Enabled, click on <b>Rules </b>then click on <b>Basic</b>, we will delete the default one once all dependencies are deleted.

<a href="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image036.jpg"><img width="502" height="293" title="clip_image036" style="margin: 0px" alt="clip_image036" src="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image036_thumb.jpg" border="0" /></a>

On the <b>Add</b> <b>Basic</b> <b>Rule</b>, name the rule and select the required listener and HTTP Settings, we have created two listeners and two http settings for each custom domain, associate the rule with its own custom domain <b>Listener</b> and <b>HTTP Setting</b>.

<a href="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image038.jpg"><img width="320" height="194" title="clip_image038" style="margin: 0px" alt="clip_image038" src="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image038_thumb.jpg" border="0" /></a>

Create another one for pk.salah.com listener and HTTP Setting

<a href="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image040.jpg"><img width="387" height="234" title="clip_image040" style="margin: 0px" alt="clip_image040" src="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image040_thumb.jpg" border="0" /></a>

Notice we have three rules including default one

<a href="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image042.jpg"><img width="360" height="172" title="clip_image042" style="margin: 0px" alt="clip_image042" src="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image042_thumb.jpg" border="0" /></a>
<h4>Delete Default Listener, HTTP Setting and Rule</h4>
First let us delete the default rule, click on <b>Rules, </b>select the default rule named <b>rule1</b> and then click on <b>Delete </b>and click <b>Yes</b>

<a href="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image044.jpg"><img width="394" height="318" title="clip_image044" style="margin: 0px" alt="clip_image044" src="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image044_thumb.jpg" border="0" /></a>

<a href="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image046.jpg"><img width="330" height="227" title="clip_image046" style="margin: 0px" alt="clip_image046" src="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image046_thumb.jpg" border="0" /></a>

Next, we will Delete Default Listener, click on Listeners, then click on default Listener named appGatewayHttpListener

<a href="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image048.jpg"><img width="573" height="291" title="clip_image048" style="margin: 0px" alt="clip_image048" src="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image048_thumb.jpg" border="0" /></a>

Click on <b>Delete</b> then <b>yes</b>

<a href="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image050.jpg"><img width="338" height="209" title="clip_image050" style="margin: 0px" alt="clip_image050" src="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image050_thumb.jpg" border="0" /></a>

You will be asked for the confirmation to update the resources click ok

<a href="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image052.jpg"><img width="321" height="221" title="clip_image052" style="margin: 0px" alt="clip_image052" src="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image052_thumb.jpg" border="0" /></a>

Next, we will delete default http settings, click on HTTP Settings, then click on default HTTP Settings named <b>appGatewayBackendHttpSettings</b>

<a href="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image054.jpg"><img width="627" height="248" title="clip_image054" style="margin: 0px" alt="clip_image054" src="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image054_thumb.jpg" border="0" /></a>

Click on <b>Delete </b>and then <b>Yes</b>

<a href="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image056.jpg"><img width="306" height="278" title="clip_image056" style="margin: 0px" alt="clip_image056" src="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image056_thumb.jpg" border="0" /></a><b></b>
<h4>Run the PowerShell Commands for application gateway</h4>
By running the PowerShell commands, we are configuring application gateway with custom Probes, there will be two probes for each HTTP Settings, configuring HTTP settings to accept the custom domain names, configuring custom probe to be compatible and work with App Service by using <b>“-PickHostNameFromBackendHttpSettings” </b>which is required by probe to make work with App Service. In the typical guide for setting up an App Service behind an existing Application Gateway <a href="https://docs.microsoft.com/en-us/azure/application-gateway/application-gateway-web-app-powershell#configure-a-web-app-behind-an-existing-application-gateway">https://docs.microsoft.com/en-us/azure/application-gateway/application-gateway-web-app-powershell#configure-a-web-app-behind-an-existing-application-gateway</a> which uses <b>“-PickHostNameFromBackendAddress”</b> with HTTP Settings, which would use the *.azurewebsites.net hostname when connecting to the backend App Service. When that configuration is in place, authentication goes towards the *.azurewebsites.net hostname instead of the custom domain, Since we have multiple custom domain names instead of using <b>“-PickHostNameFromBackendAddress”</b> we will use <b>“-HostName”</b> in each HTTP Settings, in our example we will use <b>-HostName “kw.salah.co” </b>with kw http settings, and <b>-HostName “pk.salah.co” </b>with pk http settings, that is the reason we have created multiple http settings, rules, listeners and Custom Probes.

In the following script change the Resource Group name, application gateway name, custom domain name, probe name etc.

<b># Retrieve existing resource group</b>

<b>$rg = Get-AzureRmResourceGroup -Name "testappgwrg"</b>

<b># Retrieve an existing application gateway</b>

<b>$gw = Get-AzureRmApplicationGateway -Name testappgw -ResourceGroupName $rg.ResourceGroupName</b>

<b># Define the status codes to match for the probe</b>

<b>$match=New-AzureRmApplicationGatewayProbeHealthResponseMatch -StatusCode 200-399</b>

<b># Add a new probe to the application gateway</b>

<b>Add-AzureRmApplicationGatewayProbeConfig -name webappprobe2 -ApplicationGateway $gw -Protocol Http -Path / -Interval 30 -Timeout 120 -UnhealthyThreshold 3 -PickHostNameFromBackendHttpSettings -Match $match</b>

<b># Add a new probe to the application gateway</b>

<b>Add-AzureRmApplicationGatewayProbeConfig -name webappprobe3 -ApplicationGateway $gw -Protocol Http -Path / -Interval 30 -Timeout 120 -UnhealthyThreshold 3 -PickHostNameFromBackendHttpSettings -Match $match</b>

<b># Retrieve the newly added probe</b>

<b>$probe = Get-AzureRmApplicationGatewayProbeConfig -name webappprobe2 -ApplicationGateway $gw</b>

<b># Retrieve the newly added probe</b>

<b>$probe1 = Get-AzureRmApplicationGatewayProbeConfig -name webappprobe3 -ApplicationGateway $gw</b>

<b># Configure an existing backend http setting </b>

<b>Set-AzureRmApplicationGatewayBackendHttpSettings -Name kwhttpsettings -ApplicationGateway $gw -HostName "kw.salah.co" -Port 80 -Protocol http -CookieBasedAffinity Disabled -RequestTimeout 30 -Probe $probe</b>

<b># Configure an existing backend http setting</b>

<b>Set-AzureRmApplicationGatewayBackendHttpSettings -Name pkhttpsettings -ApplicationGateway $gw -HostName "pk.salah.co" -Port 80 -Protocol http -CookieBasedAffinity Disabled -RequestTimeout 30 -Probe $probe1</b>

<b># Update the application gateway</b>

<b>Set-AzureRmApplicationGateway -ApplicationGateway $gw</b>

Once the Script is done, it would update the application gateway and update the settings, I am just going to share the screen shot of the settings to notice the changes in HTTP Settings and Probes which were not there while creating those.

<a href="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image058.jpg"><img width="707" height="227" title="clip_image058" style="margin: 0px" alt="clip_image058" src="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image058_thumb.jpg" border="0" /></a>

<a href="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image060.jpg"><img width="628" height="386" title="clip_image060" style="margin: 0px" alt="clip_image060" src="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image060_thumb.jpg" border="0" /></a>

In case you want to verify Health Probe Settings, notive Host is empty this is because we have used <b>“-PickHostNameFromBackendHttpSettings”</b>

<a href="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image062.jpg"><img width="493" height="493" title="clip_image062" style="margin: 0px" alt="clip_image062" src="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image062_thumb.jpg" border="0" /></a>

Since we have created and configured Application gateway, it is time now to create CNAME record for each custom domain from External DNS.
<h4>Create CNAME record for each domain</h4>
During creation of application gateway, we have provided DNS name for the public IP address of application gateway, we are going to create two CNAME record in external DNS pointing to the DNS name of application gateway Public IP Address.

<a href="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image064.jpg"><img width="629" height="45" title="clip_image064" style="margin: 0px" alt="clip_image064" src="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image064_thumb.jpg" border="0" /></a>

<a href="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image066.jpg"><img width="627" height="44" title="clip_image066" alt="clip_image066" src="https://msdnshared.blob.core.windows.net/media/2018/07/clip_image066_thumb.jpg" border="0" /></a>

It would take time to update the DNS you can verify DNS updated or not by doing nslookup from your own device, mine is updated after 5 minutes. As soon as DNS is updated when I browse kw.salah.co it is connecting me to the site contents related to kw and when I browse pk.salah.co it is connecting me to different contents related pk.]]></content:encoded>
    </item>
    <item>
      <title>PowerShell script to execute DOS commands using KUDU APIs</title>
      <link>https://docs.microsoft.com/archive/blogs/waws/powershell-script-to-execute-dos-commands-using-kudu-apis</link>
      <pubDate>Fri, 13 Jul 2018 01:21:59 GMT</pubDate>
      <dc:creator><![CDATA[Prashant Pratap]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/waws/?p=6155</guid>
      <description><![CDATA[Lets say you would like to get the machine name from all VM instances that are running your Azure...]]></description>
      <content:encoded><![CDATA[<p><br></p><p>Lets say you would like to get the machine name from all VM instances that are running your Azure AppService website or you would like to create a folder under the wwwroot, this below sample PowerShell scripts can execute any DOS command </p><p><br></p>

[code language="powershell"]
#Login-AzureRmAccount

$resoureGroupName = "wabac"
$websiteName = "wabacblue"

$env = @{
    command= 'Set COMPUTERNAME'
    dir= 'site'
}
$json = $env | ConvertTo-Json

$env2 = @{
    command= 'mkdir vdir'
    dir= 'site\wwwroot'
}
$json2 = $env2 | ConvertTo-Json

$website = Get-AzureWebsite -Name $websiteName
$username = $website.PublishingUsername
$password = $website.PublishingPassword
$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $username,$password)))
$apiBaseUrl = "https://$($website.Name).scm.azurewebsites.net/api"

[System.Uri]$Uri = $apiBaseUrl

$instances = Get-AzureRmResource -ResourceGroupName $resoureGroupName `
                                    -ResourceType Microsoft.Web/sites/instances `
                                    -ResourceName $websiteName `
                                    -ApiVersion 2018-02-01


foreach($instance in $instances)
{
    $instanceName = $instance.Name
    Write-Host "`tVM Instance ID `t`t: " $instanceName

    #Now execute 'SET COMPUTER' cmd
    $cookie= New-Object System.Net.Cookie
    $cookie.Name = "ARRAffinity"
    $cookie.Value = $instanceName
    $Cookie.Domain = $uri.DnsSafeHost
    $session=New-Object Microsoft.Powershell.Commands.WebRequestSession
    $session.Cookies.add($cookie)

    $response = Invoke-RestMethod -Uri "$apiBaseUrl/command" `
                                    -Headers @{Authorization=("Basic {0}" `
                                    -f $base64AuthInfo)} `
                                    -Method Post -Body $json `
                                    -ContentType 'application/json' `
                                    -WebSession $session
    Write-Host "`tVM Instance Name `t: " $response

    $response = Invoke-RestMethod -Uri "$apiBaseUrl/command" `
                                    -Headers @{Authorization=("Basic {0}" `
                                    -f $base64AuthInfo)} `
                                    -Method Post -Body $json2 `
                                    -ContentType 'application/json' `
                                    -WebSession $session
    Write-Host "`tCreate folder Results `t: " $response
}

[/code]]]></content:encoded>
    </item>
    <item>
      <title>PowerShell script to execute commands in SCM website on all instances</title>
      <link>https://docs.microsoft.com/archive/blogs/waws/powershell-script-to-execute-commands-in-scm-website-on-all-instances</link>
      <pubDate>Tue, 26 Jun 2018 19:27:15 GMT</pubDate>
      <dc:creator><![CDATA[Prashant Pratap]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/waws/?p=6145</guid>
      <description><![CDATA[Here is a quick PowerShell script to execute commands in SCM website on all instances. For example,...]]></description>
      <content:encoded><![CDATA[<p align="justify">Here is a quick PowerShell script to execute commands in SCM website on all instances. </p><p align="justify">For example, lets say you have a website running in an App Service Plan that has more than one instance and you would like to delete log files form all instances. You can log into KUDU console at <strong>&lt;your website name&gt;.scm.AzureWebsites.net</strong> and use <strong>Debug Console | CMD</strong> to delete log files. By default, KUDU console is connected to one of random instance. If you like to connect to another instance, you can follow these <a href="https://blogs.msdn.microsoft.com/kaushal/2016/11/21/azure-app-service-how-to-connect-to-the-kudu-site-of-a-specific-instance/">steps</a>&nbsp;</p><p align="justify">Another option is you can use below PowerShell scripts that will execute a CMD command on all instances : </p>

[code language="powershell"]
#Login-AzureRmAccount

$resoureGroupName = "wabac"
$websiteName = "wabacblue"

$env = @{
    command= 'Set COMPUTERNAME'
    dir= 'site'
}
$json = $env | ConvertTo-Json

$website = Get-AzureWebsite -Name $websiteName
$username = $website.PublishingUsername
$password = $website.PublishingPassword
$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $username,$password)))
$apiBaseUrl = "https://$($website.Name).scm.azurewebsites.net/api"

[System.Uri]$Uri = $apiBaseUrl

$instances = Get-AzureRmResource -ResourceGroupName $resoureGroupName `
                                    -ResourceType Microsoft.Web/sites/instances `
                                    -ResourceName $websiteName `
                                    -ApiVersion 2018-02-01


foreach($instance in $instances)
{
    $instanceName = $instance.Name
    Write-Host "`tVM Instance ID `t`t: " $instanceName

    #Now execute 'SET COMPUTER' cmd
    $cookie= New-Object System.Net.Cookie
    $cookie.Name = "ARRAffinity"
    $cookie.Value = $instanceName
    $Cookie.Domain = $uri.DnsSafeHost
    $session=New-Object Microsoft.Powershell.Commands.WebRequestSession
    $session.Cookies.add($cookie)

    $response = Invoke-RestMethod -Uri "$apiBaseUrl/command" `
                                    -Headers @{Authorization=("Basic {0}" `
                                    -f $base64AuthInfo)} `
                                    -Method Post -Body $json `
                                    -ContentType 'application/json' `
                                    -WebSession $session
    Write-Host "`tVM Instance Name `t: " $response
}

[/code]]]></content:encoded>
    </item>
    <item>
      <title>PowerShell script to list all running processes in your Azure AppService (w/Computer name)</title>
      <link>https://docs.microsoft.com/archive/blogs/waws/powershell-script-to-list-all-running-processes-in-your-azure-appservice-w-computer-name</link>
      <pubDate>Tue, 26 Jun 2018 18:40:34 GMT</pubDate>
      <dc:creator><![CDATA[Prashant Pratap]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/waws/?p=6135</guid>
      <description><![CDATA[Here is a quick PowerShell scripts to get list of all websites in your Azure Subscription, along...]]></description>
      <content:encoded><![CDATA[<p><br></p><p>Here is a quick PowerShell scripts to get list of all websites in your Azure Subscription, along with the processes running within each website.</p><p>This script also print the VM Instance ID and VM machine Name. Here is the sample output :</p><p><a href="https://msdnshared.blob.core.windows.net/media/2018/06/image179.png"><img width="898" height="654" title="image" style="margin: 0px auto;float: none" alt="image" src="https://msdnshared.blob.core.windows.net/media/2018/06/image_thumb139.png" border="0"></a></p>

[code language="powershell"]

Login-AzureRmAccount


$websites = Get-AzureRmResource -ResourceType Microsoft.Web/sites

foreach($website in $websites)
{
    $resoureGroupName = $website.ResourceGroupName  
    $websiteName = $website.Name
    
    Write-Host "Website : " -ForegroundColor Blue -NoNewline
    Write-Host $websiteName -ForegroundColor Red -NoNewline
    Write-Host " in ResourceGroup : " -ForegroundColor Blue -NoNewline
    Write-Host $resoureGroupName -ForegroundColor Red

    $instances = Get-AzureRmResource -ResourceGroupName $resoureGroupName `
                                     -ResourceType Microsoft.Web/sites/instances `
                                     -ResourceName $websiteName `
                                     -ApiVersion 2018-02-01


    foreach($instance in $instances)
    {
        $instanceName = $instance.Name
        Write-Host "`tVM Instance ID : " $instanceName

        try
        {
            $processes = Get-AzureRmResource -ResourceGroupName $resoureGroupName `
                                            -ResourceType Microsoft.Web/sites/instances/processes `
                                            -ResourceName $websiteName/$instanceName `
                                            -ApiVersion 2018-02-01 `
                                            -ErrorAction Ignore 
        }
        catch
        {
               continue 
        }
        

        foreach($process in $processes)
        {
            $exeName = $process.Properties.Name
            Write-Host "`t`tEXE Name `t`t: " $exeName

            $processId = $process.Properties.id
            Write-Host "`t`t`tProcess ID `t: " $processId

            try {                
                $processDetails = Get-AzureRmResource -ResourceGroupName $resoureGroupName `
                                                        -ResourceType Microsoft.Web/sites/instances/processes `
                                                        -ResourceName $websiteName/$instanceName/$processId `
                                                        -ApiVersion 2018-02-01 `
                                                        -ErrorAction Ignore 
                                                        

                Write-Host "`t`t`tFile Name `t: " $processDetails.Properties.file_name
                Write-Host "`t`t`tCMD Line `t: " $processDetails.Properties.command_line
                Write-Host "`t`t`tComputer Name `t: " $processDetails.Properties.environment_variables.COMPUTERNAME
                
            }
            catch {
                
            }
           
        }
    }
}
[/code]]]></content:encoded>
    </item>
  </channel>
</rss>