<?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>Http Client Protocol Issues (and other fun stuff I support)</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/jpsanders/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/jpsanders/feed.xml</link>
    <description>If you use any of these solutions, Please let me know so I can track if any of this is useful to you!  Thanks!</description>
    <lastBuildDate>Wed, 24 Oct 2018 19:27:09 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Moving Blog</title>
      <link>https://docs.microsoft.com/archive/blogs/jpsanders/moving-blog</link>
      <pubDate>Thu, 13 Sep 2018 08:29:24 GMT</pubDate>
      <dc:creator><![CDATA[Jeff Sanders]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jpsanders/?p=5385</guid>
      <description><![CDATA[I am moving my blogs to here: https://jsandersblog.azurewebsites.net/ so update any links!]]></description>
      <content:encoded><![CDATA[I am moving my blogs to here: <a target="_blank" href="https://jsandersblog.azurewebsites.net/" rel="noopener">https://jsandersblog.azurewebsites.net/</a> so update any links!]]></content:encoded>
    </item>
    <item>
      <title>Failed to update web app settings: The storage URI is invalid</title>
      <link>https://docs.microsoft.com/archive/blogs/jpsanders/failed-to-update-web-app-settings-the-storage-uri-is-invalid</link>
      <pubDate>Tue, 05 Jun 2018 14:20:38 GMT</pubDate>
      <dc:creator><![CDATA[Jeff Sanders]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jpsanders/?p=5345</guid>
      <description><![CDATA[Overview When updating your Azure Function App storage account keys, if you specify the wrong key…...]]></description>
      <content:encoded><![CDATA[<h1>Overview</h1> <p>When updating your Azure Function App storage account keys, if you specify the wrong key… You could get an error including the text:</p> <p>Failed to update web app settings:&nbsp; Bad Request&nbsp; The storage URI is invalid ExtendedCode:04203 No valid combination of account information found</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2018/06/Capture.png"><img title="Capture" style="border-top: 0px;border-right: 0px;border-bottom: 0px;padding-top: 0px;padding-left: 0px;border-left: 0px;padding-right: 0px" border="0" alt="Capture" src="https://msdnshared.blob.core.windows.net/media/2018/06/Capture_thumb.png" width="478" height="292"></a></p> <h1>Fix</h1> <p>I found the older version of the key did not have the suffix listed.&nbsp; When I generated the new key it did… thinking that it was invalid I removed it and then got this error.&nbsp; Ensure that you copy and use the entire key as provided!</p> <p>Example: DefaultEndpointsProtocol=https;AccountName=cs2d3de4593cb35x492dxa63;AccountKey=xxxxxxxxxxxxx==;<font style="background-color: #ffff00">EndpointSuffix=core.windows.net</font></p> <p><font style="background-color: #ffff00"></font>&nbsp;</p> <p>Please drop me a note if you found this useful!</p> <p><font style="background-color: #ffff00"></font></p>]]></content:encoded>
    </item>
    <item>
      <title>Create Service Principal in Linux for Azure Automation</title>
      <link>https://docs.microsoft.com/archive/blogs/jpsanders/create-service-principal-in-linux-for-azure-automation</link>
      <pubDate>Tue, 29 May 2018 14:57:46 GMT</pubDate>
      <dc:creator><![CDATA[Jeff Sanders]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jpsanders/?p=5315</guid>
      <description><![CDATA[Overview There are lots of ways to do things in Azure.&nbsp; I could not find a current end to end...]]></description>
      <content:encoded><![CDATA[<h1>Overview</h1> <p>There are lots of ways to do things in Azure.&nbsp; I could not find a current end to end sample of setting up and getting an Access Token using SSH on a Linux box.&nbsp; I chose the latest Ubuntu image up in Azure Virtual Machines for this overview.&nbsp; This is loosely based on this older blog which had you create a PEM certificate (which is no longer necessary) <a title="https://blogs.msdn.microsoft.com/arsen/2015/09/18/certificate-based-auth-with-azure-service-principals-from-linux-command-line/" href="https://blogs.msdn.microsoft.com/arsen/2015/09/18/certificate-based-auth-with-azure-service-principals-from-linux-command-line/">https://blogs.msdn.microsoft.com/arsen/2015/09/18/certificate-based-auth-with-azure-service-principals-from-linux-command-line/</a> .</p> <h1>Steps</h1> <p><strong>Install Azure CLI 2.0</strong></p> <p><a title="https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest" href="https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest">https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest</a></p> <p>I am installing on Ubuntu: <a title="https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-apt?view=azure-cli-latest" href="https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-apt?view=azure-cli-latest">https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-apt?view=azure-cli-latest</a></p> <p><strong>Login</strong> with an account that can create Service Principals using the interactive login (works with MFA):&nbsp; </p> <p><a title="https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli?view=azure-cli-latest#interactive-log-in" href="https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli?view=azure-cli-latest#interactive-log-in">https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli?view=azure-cli-latest#interactive-log-in</a></p> <p><a href="https://msdnshared.blob.core.windows.net/media/2018/05/Login1.png"><img title="Login" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="Login" src="https://msdnshared.blob.core.windows.net/media/2018/05/Login_thumb.png" width="810" height="108"></a></p> <p><strong>Select the Target Subscription:</strong></p> <p>In my case I have many subscriptions and I need to make active or select the one ending in ‘umption’.&nbsp; Here are the commands to do that:</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2018/05/Set-Subcription-edit-1.png"><img title="Set Subcription edit 1" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="Set Subcription edit 1" src="https://msdnshared.blob.core.windows.net/media/2018/05/Set-Subcription-edit-1_thumb.png" width="756" height="183"></a></p> <p><strong>Create Service Principal with Certificate</strong></p> <p><a title="https://docs.microsoft.com/en-us/cli/azure/create-an-azure-service-principal-azure-cli?view=azure-cli-latest" href="https://docs.microsoft.com/en-us/cli/azure/create-an-azure-service-principal-azure-cli?view=azure-cli-latest">https://docs.microsoft.com/en-us/cli/azure/create-an-azure-service-principal-azure-cli?view=azure-cli-latest</a></p> <p>I used the default access and the&nbsp; --create-cert option like this: <font style="background-color: #ffff00">az ad sp create-for-rbac -n "ForMyAutomationApp" --create-cert</font></p> <p><a href="https://msdnshared.blob.core.windows.net/media/2018/05/createSPcert.png"><img title="createSPcert" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="createSPcert" src="https://msdnshared.blob.core.windows.net/media/2018/05/createSPcert_thumb.png" width="777" height="162"></a></p> <p>Copy all this information as you will need it to login using this Service Principle (to test access).</p> <p>Note that location of the .pem file.&nbsp; Go there and you can list it out.&nbsp; You will need information from this certificate later to verify the signature of this token:</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2018/05/Cert.png"><img title="Cert" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="Cert" src="https://msdnshared.blob.core.windows.net/media/2018/05/Cert_thumb.png" width="362" height="645"></a></p> <p><strong>Copy the public key</strong> which is the entire section <em>after</em> -----END PRIVATE KEY-----</p> <p>Like this:</p> <p>-----BEGIN CERTIFICATE-----<br>MIICoTCCA</p> <p>…..</p> <p>Y32P5WwcaOfX1hkzMtTj4DAmAAlhudWhnRmVBRUvSx7RmWMl1Fhe<br>+ufr0jY=<br>-----END CERTIFICATE-----</p> <p>You will need this to test the signature of your JWT later.</p> <p>&nbsp;</p> <p><strong>Log out and test the Service Principal login (optional)</strong></p> <p>Using the information you copied when creating the service principal you can test access.&nbsp; You may want to create your service principal with a certain role for access reasons.&nbsp; The default is Contributor which is fine for me:</p> <p><strong><a href="https://msdnshared.blob.core.windows.net/media/2018/05/TestLogin.png"><img title="TestLogin" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="TestLogin" src="https://msdnshared.blob.core.windows.net/media/2018/05/TestLogin_thumb.png" width="981" height="211"></a></strong></p> <p>&nbsp;</p> <p><strong>Sign the JWT Token</strong>  <p>Note:&nbsp; This is accurate at time of publication, but these are all 3rd party Open Source tools that may change.&nbsp; Also I removed this service principal and PEM file before publishing file so this information won’t work for anything.  <p>You will need to first get the certificate thumbprint.&nbsp; You can get it using OpenSSL (which you may have to install) using this command.&nbsp; You will need to enter the path to the PEM file you generated earlier:&nbsp; echo $(openssl x509 -in /home/jsandersrocks/tmpgfr4s8q4.pem -fingerprint -noout) | sed 's/SHA1 Fingerprint=//g' | sed 's/://g' | xxd -r -ps | base64  <p>The result is a small string which is the thumbprint: <strong>Pic3Y1tO/jwbLjppXwJdbiPAAro=</strong>  <p><strong>Create Token.js and run in node to create Signed JWT</strong>  <p>I used VIM and created a file called token.js to create the signed JWT.&nbsp; Choose appropriate values for your token based on the library documentation here: <a title="https://www.npmjs.com/package/jsonwebtoken" href="https://www.npmjs.com/package/jsonwebtoken">https://www.npmjs.com/package/jsonwebtoken</a>&nbsp; <p>In this script You need to add the highlighted portions from the data above to include the PEM file path to read the <em>cert</em>, the SHA1 thumbprint for <em>x5t</em>, the tenant ID in the <em>aud</em> field and finally the appId for <em>iss</em> and <em>sub</em>.</p> <p><br>var jwt = require('jsonwebtoken');<br>var fs = require('fs');</p> <p>var cert = fs.readFileSync(<font style="background-color: #ffff00">'/home/jsandersrocks/tmpgfr4s8q4.pem'</font>);</p> <p>var additionalHeaders = {</p> <p>"x5t":"<font style="background-color: #ffff00">Pic3Y1tO/jwbLjppXwJdbiPAAro=</font>"</p> <p>}</p> <p>var myJwt = {</p> <p>"aud": <a href="https://login.microsoftonline.com/72f988bf-XXXXXXXXXXXX-2d7cd011db47/oauth2/token">https://login.microsoftonline.com/<font style="background-color: #ffff00">72f988bf-XXXXXXXXXXXX-2d7cd011db47</font>/oauth2/token</a>,</p> <p>"iss": "<font style="background-color: #ffff00">81ad91de-0844-4547-88ed-bffed69e45f1</font>",</p> <p>"sub": "<font style="background-color: #ffff00">81ad91de-0844-4547-88ed-bffed69e45f1</font>",</p> <p>"jti": "" + Math.random(),</p> <p>&nbsp;</p> <p>"exp": Math.floor(Date.now()/1000)+7*8640000</p> <p>};</p> <p>console.log(myJwt);</p> <p>var token = jwt.sign(myJwt,cert,{algorithm:'RS256', header:additionalHeaders});</p> <p>console.log(token);</p> <p>&nbsp;</p> <p>Install node.js if necessary and then the jasonwebtoken package using this command: <strong>npm install jsonwebtoken, </strong> <p>Finally run node pointing to your script file to generate the token!  <p><a href="https://msdnshared.blob.core.windows.net/media/2018/05/SignToken.png"><img title="SignToken" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="SignToken" src="https://msdnshared.blob.core.windows.net/media/2018/05/SignToken_thumb.png" width="964" height="228"></a>  <p><strong>Copy the Token and Verify the signature:</strong>  <p>The signed token is the text above starting with “ey” and to the end of the string (in this case –SRg).  <p>Go to <a title="https://jwt.io/" href="https://jwt.io/">https://jwt.io/</a> and paste your token into the first field.&nbsp; Then past in the information from the public key (from the section above - <strong>Copy the public key</strong> ).  <p>&nbsp; <p><a href="https://msdnshared.blob.core.windows.net/media/2018/05/image295.png"><img title="image" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2018/05/image_thumb226.png" width="699" height="548"></a>  <p>&nbsp;</p> <h2></h2> <h1>Next Steps</h1> <p>You can now use this JWT to get an access token and use this in REST APIs (see blog that inspired this in the opening statement).&nbsp; </p> <p>Here is an example of me generating a token and using it in curl to get an access token.&nbsp; The actual access token is the field after “access_token” in the below output.&nbsp; </p> <p><a href="https://msdnshared.blob.core.windows.net/media/2018/05/token2.png"><img title="token2" style="border-top: 0px;border-right: 0px;border-bottom: 0px;padding-top: 0px;padding-left: 0px;border-left: 0px;padding-right: 0px" border="0" alt="token2" src="https://msdnshared.blob.core.windows.net/media/2018/05/token2_thumb.png" width="926" height="234"></a></p> <p>&nbsp;</p> <p>Note that there are so many different ways to use this token and you can generate this many ways.&nbsp; There are settings for expiration of this token and when it begins to be valid.&nbsp; I leave that research to you as it is adequately documented.&nbsp; A lot of these techniques are contained in the various libraries and APIs for different languages and I encourage you to use those whenever possible. </p> <p>Please drop me a note if you found this useful!</p>]]></content:encoded>
    </item>
    <item>
      <title>Azure Cloud Service: ERR_SPDY_INADEQUATE_TRANSPORT_SECURITY error in Chrome</title>
      <link>https://docs.microsoft.com/archive/blogs/jpsanders/azure-cloud-service-err_spdy_inadequate_transport_security-error-in-chrome</link>
      <pubDate>Thu, 03 May 2018 14:13:24 GMT</pubDate>
      <dc:creator><![CDATA[Jeff Sanders]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jpsanders/?p=5165</guid>
      <description><![CDATA[OverviewI ran into an interesting error that I had to debunk where a customer thought with HTTP/2 on...]]></description>
      <content:encoded><![CDATA[<h2>Overview</h2><p>I ran into an interesting error that I had to debunk where a customer thought with HTTP/2 on Windows Server 2016 which has IIS 10 installed, that this caused the error above.&nbsp; That was not true!</p><h2>Analysis</h2><p>Looking at a network trace I could see that the client (Chrome) was advertising higher level encryption as accepted Cipher Suites but the server was coming back with Cipher Suite: TLS_RSA_WITH_AES_256_CBC_SHA (0x0035) in the server hello reply</p><p>I spun up an Azure Cloud Service, ensured I could use HTTP/2 with no error and indeed, in my case I could see in the trace indeed, no error from Chrome and the Cipher Suite returned was: Cipher Suite: TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (0xc030)</p><p>Knowing that SChannel will return the Cipher Suites in the order that they are prioritized, compared the unadulterated machine Cipher Suite order with the broken one and sure enough, the broken one had the wrong (non-default) order.&nbsp; The way to check this is to run the following in a powershell command window:&nbsp;&nbsp; get-tlsciphersuite&nbsp; | foreach {$_.Name}.&nbsp; For the broken case I saw the offending Cipher Suite listed as the 2nd item in the list.&nbsp; Further queries revealed on startup them were manually setting the cipher suites due to some old requirements!</p><p><a href="https://msdnshared.blob.core.windows.net/media/2018/05/cipher-suites.png"><img width="832" height="618" title="cipher suites" alt="cipher suites" src="https://msdnshared.blob.core.windows.net/media/2018/05/cipher-suites_thumb.png" border="0"></a></p><h2>Solution</h2><p>Don’t mess with the default cipher suite order as this is set correctly out of the box for the latest OS updates!&nbsp; The default should serve you needs and is in the correct order.&nbsp; ref: <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/mt490158(v=vs.85).aspx">https://msdn.microsoft.com/en-us/library/windows/desktop/mt490158(v=vs.85).aspx</a> is the listing for 2016</p><p>If this helped you, drop me a note!</p>]]></content:encoded>
    </item>
    <item>
      <title>Point Kudu to a Particular Web Worker Instance</title>
      <link>https://docs.microsoft.com/archive/blogs/jpsanders/point-kudu-to-a-particular-web-worker-instance</link>
      <pubDate>Mon, 26 Feb 2018 14:16:10 GMT</pubDate>
      <dc:creator><![CDATA[Jeff Sanders]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jpsanders/?p=4775</guid>
      <description><![CDATA[Overview
Kudu is the .SCM interface for Azure App Services.&nbsp; If you are running more than one...]]></description>
      <content:encoded><![CDATA[<h1>Overview</h1>
<p>Kudu is the .SCM interface for Azure App Services.&nbsp; If you are running more than one instance of Azure App Services (for instance you have scaled out to 4 instances) and you need to get to the Kudu console to do something like kill a process, profile an instance or get a dump of a particular instance… you can use this technique.&nbsp; This technique does not rely on ARRAffinity being set for the Application because that setting does not affect the Kudu site.&nbsp; </p>
<h1>Steps (with Instance Detective Extension)</h1>
<p><strong>Note that ASE is a special case</strong> and the Instance Detective Extension will not work.&nbsp; You can use a powershell command to get the instances:&nbsp; Get-AzureRmResource -ResourceGroupName &lt;RG name&gt;-ResourceType Microsoft.Web/sites/instances -ResourceName "&lt;App Name&gt;" -ApiVersion 2016-08-01&nbsp; </p><p>In this example, I have a particular instance of my site (jsandersscale) that is problematic and I logged an error that point to Azure Instance ID 92294a.&nbsp; I will use Chrome to ensure I am on the correct instance (1 of 4 allocated for this site) and profile that instance.</p>
<ol>
<li><strong>Download Publish Profile<br>
</strong>a.&nbsp; From the Azure Portal, navigate to the Overview section of your app and download the publish portal from there by selecting ‘Get publish profile’ (make a note of where it downloads to so you can find it later:<br>
<a href="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180227101743150.png"><img width="514" height="106" title="capture20180227101743150" style="border: 0px currentcolor;padding-top: 0px;padding-right: 0px;padding-left: 0px" alt="capture20180227101743150" src="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180227101743150_thumb.png" border="0"></a></li>
<ol><!--EndFragment--></ol>
<li><strong>Install Instance Explorer</strong>&nbsp;&nbsp;&nbsp; <br>
a. Open you site’s Kudu page (https://&lt;yourappname&gt;.scm.azurewebsites.net) and select the ‘Site extensions’ section.&nbsp; Click on the ‘Gallery’ tab then enter ‘Instance Detective’ in the search box and click on the ‘Search’ button.
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180227101021493.png"><img width="536" height="243" title="capture20180227101021493" style="border: 0px currentcolor;padding-top: 0px;padding-right: 0px;padding-left: 0px" alt="capture20180227101021493" src="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180227101021493_thumb.png" border="0"></a><br>
b. Click the ‘+’ icon to install the extension.&nbsp; When it is done installing it tells you to ‘Restart Site’ so hit the ‘Restart Site’ button so you can use this:<br>
<a href="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180227095408213.png"><img width="383" height="167" title="capture20180227095408213" style="border: 0px currentcolor;padding-top: 0px;padding-right: 0px;padding-left: 0px" alt="capture20180227095408213" src="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180227095408213_thumb.png" border="0"></a><br>
c.&nbsp; From this (or the Installed tab) you can hit the Run Icon to start the extension.&nbsp; The first time you run it, you need to supply the Publish Profile as pictured below.<br>
<a href="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180227095457337.png"><img width="294" height="380" title="capture20180227095457337" style="border: 0px currentcolor;padding-top: 0px;padding-right: 0px;padding-left: 0px" alt="capture20180227095457337" src="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180227095457337_thumb.png" border="0"></a><br>
d.&nbsp; Press the ‘Upload Publish Profile’ button and navigate to the publish profile you downloaded in step 1.</p></li>
<li><strong>Use the Extension!<br>
</strong>Now the extension is loaded and you can connect to and perform various operations on the individual instances:<br>
<a href="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180227095533576.png"><img width="315" height="283" title="capture20180227095533576" style="border: 0px currentcolor;padding-top: 0px;padding-right: 0px;padding-left: 0px" alt="capture20180227095533576" src="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180227095533576_thumb.png" border="0"></a>
<p><a href="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180227095544621.png"><img width="286" height="170" title="capture20180227095544621" style="border: 0px currentcolor;padding-top: 0px;padding-right: 0px;padding-left: 0px" alt="capture20180227095544621" src="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180227095544621_thumb.png" border="0"></a></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180227102322857.png"><img width="707" height="364" title="capture20180227102322857" style="border: 0px currentcolor;padding-top: 0px;padding-right: 0px;padding-left: 0px" alt="capture20180227102322857" src="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180227102322857_thumb.png" border="0"></a><br>
</p></li>
<li><strong>When finished you can uninstall the Extension<br>
</strong>Simply go back to the Installed Site extensions section and click on the ‘x’ icon to remove the extension:<br>
<a href="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180227102557607.png"><img width="492" height="258" title="capture20180227102557607" style="border: 0px currentcolor;padding-top: 0px;padding-right: 0px;padding-left: 0px" alt="capture20180227102557607" src="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180227102557607_thumb.png" border="0"></a></li>
</ol>
<p><br></p>
<h1>Steps (without Extension)</h1>
<p>In this example, I have a particular instance of my site (jsandersscale) that is problematic and I logged an error that point to Azure Instance ID 92294a.&nbsp; I will use Chrome to ensure I am on the correct instance (1 of 4 allocated for this site) and profile that instance.</p>
<ol>
<li><strong>Identify the full Instance ID</strong>&nbsp; <br>
a.&nbsp; Go to Azure Resource Explorer (<a title="https://resources.azure.com" href="https://resources.azure.com">https://resources.azure.com</a>), log in and click on the subscription node<br>
b.&nbsp; Type the name of your site in search box and click on the app to navigate to it:<br>
<a href="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180226134710218.png"><img width="529" height="284" title="capture20180226134710218" style="border-width: 0px;padding-top: 0px;padding-right: 0px;padding-left: 0px" alt="capture20180226134710218" src="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180226134710218_thumb.png" border="0"></a><br>
c.&nbsp; Click on the ‘instances’ node of your app to get a list of the instances and search for the partial Instance ID:<br>
<a href="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180226135025934.png"><img width="647" height="414" title="capture20180226135025934" style="border-width: 0px;padding-top: 0px;padding-right: 0px;padding-left: 0px" alt="capture20180226135025934" src="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180226135025934_thumb.png" border="0"></a><br>
d.&nbsp; Copy the full “name” that starts with the partial instance id.&nbsp; This is what we will use for the ARRAffinity Cookie. <br>
<a href="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180226135521848.png"><img width="643" height="182" title="capture20180226135521848" style="border-width: 0px;padding-top: 0px;padding-right: 0px;padding-left: 0px" alt="capture20180226135521848" src="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180226135521848_thumb.png" border="0"></a><br>
In this case it is: 92294a4eceea77fdf386fdf56832c40e0b95a40e7628c943f2f1ba5a62eec768
<li><strong>Set the ARRAffinity cookie in Kudu</strong><br>
a.&nbsp; Log into Kudu using Chrome and go to the Environment tab to see what instance you are currently on (it will be one of the instances you see in Azure Resource Explorer above).<br>
<a href="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180226135836571.png"><img width="470" height="340" title="capture20180226135836571" style="border-width: 0px;padding-top: 0px;padding-right: 0px;padding-left: 0px" alt="capture20180226135836571" src="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180226135836571_thumb.png" border="0"></a><br>
b.&nbsp; Hit the F12 key (or right click on the page and choose ‘Inspect’) and click on the ‘Application’ Tab.&nbsp; Then click on ‘Cookies’ and the page (&lt;yourapp&gt;.scm.azurewebsites.net) and find the ARRAffinity cookie (you will see in this example it is not the one I want… as expected):<br>
<a href="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180226140334031.png"><img width="466" height="206" title="capture20180226140334031" style="border-width: 0px;padding-top: 0px;padding-right: 0px;padding-left: 0px" alt="capture20180226140334031" src="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180226140334031_thumb.png" border="0"></a><br>
c.&nbsp; Change the ARRAffinity cookie value to be the target by double clicking on the old value and pasting in the new.&nbsp; Then Tab out of the field&nbsp; In this case it is: 92294a4eceea77fdf386fdf56832c40e0b95a40e7628c943f2f1ba5a62eec768<br>
<a href="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180226140408139.png"><img width="563" height="207" title="capture20180226140408139" style="border-width: 0px;padding-top: 0px;padding-right: 0px;padding-left: 0px" alt="capture20180226140408139" src="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180226140408139_thumb.png" border="0"></a><br>
d.&nbsp; Now refresh the browser and close the developer tools.&nbsp; You can confirm you are on the correct instance by looking at that value in the Environment Tab once again:<br>
<a href="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180226140741820.png"><img width="596" height="418" title="capture20180226140741820" style="border-width: 0px;padding-top: 0px;padding-right: 0px;padding-left: 0px" alt="capture20180226140741820" src="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180226140741820_thumb.png" border="0"></a></li>
</ol>
<p><br></p>
<h1>Conclusion</h1>
<p>That’s it!&nbsp; Now you can profile or get a dump of a particular process (note the ‘SCM’ process is not your app but is the Kudu process that hosts this Kudu site).</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180226141038680.png"><img width="725" height="205" title="capture20180226141038680" style="border-width: 0px;padding-top: 0px;padding-right: 0px;padding-left: 0px" alt="capture20180226141038680" src="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180226141038680_thumb.png" border="0"></a></p>
<p>Please drop me a note if you found this useful!</p>
<p><br></p>
<h1>Links</h1>
<p><strong>ARRAffinity<br>
</strong>&nbsp;&nbsp;&nbsp; Disable: <a title="https://blogs.msdn.microsoft.com/appserviceteam/2016/05/16/disable-session-affinity-cookie-arr-cookie-for-azure-web-apps/" href="https://blogs.msdn.microsoft.com/appserviceteam/2016/05/16/disable-session-affinity-cookie-arr-cookie-for-azure-web-apps/" target="_blank">https://blogs.msdn.microsoft.com/appserviceteam/2016/05/16/disable-session-affinity-cookie-arr-cookie-for-azure-web-apps/</a>&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; General Discussion:&nbsp; <a title="https://azure.microsoft.com/en-us/blog/disabling-arrs-instance-affinity-in-windows-azure-web-sites/" href="https://azure.microsoft.com/en-us/blog/disabling-arrs-instance-affinity-in-windows-azure-web-sites/" target="_blank">https://azure.microsoft.com/en-us/blog/disabling-arrs-instance-affinity-in-windows-azure-web-sites/</a></p>
<p><strong>Kudu</strong> <a title="https://github.com/projectkudu/kudu/wiki" href="https://github.com/projectkudu/kudu/wiki" target="_blank">https://github.com/projectkudu/kudu/wiki</a></p>
<p><strong>Azure Resource Explorer</strong>&nbsp; <a title="https://azure.microsoft.com/en-us/blog/azure-resource-explorer-a-new-tool-to-discover-the-azure-api/" href="https://azure.microsoft.com/en-us/blog/azure-resource-explorer-a-new-tool-to-discover-the-azure-api/" target="_blank">https://azure.microsoft.com/en-us/blog/azure-resource-explorer-a-new-tool-to-discover-the-azure-api/</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Error: Could not find a part of the path 'E:\sitesroot\0\bin\roslyn\csc.exe'.</title>
      <link>https://docs.microsoft.com/archive/blogs/jpsanders/error-could-not-find-a-part-of-the-path-esitesroot0binroslyncsc-exe</link>
      <pubDate>Thu, 22 Feb 2018 16:30:11 GMT</pubDate>
      <dc:creator><![CDATA[Jeff Sanders]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jpsanders/?p=4605</guid>
      <description><![CDATA[Overview After publishing the web app to Azure Cloud Services from Visual Studio 2017, it would not...]]></description>
      <content:encoded><![CDATA[<h2>Overview</h2> After publishing the web app to Azure Cloud Services from Visual Studio 2017, it would not run and returned a 500 error.  Turning off custom error messages I was getting this error: <i>Could not find a part of the path 'E:\sitesroot\0\bin\roslyn\csc.exe'.</i> In your solution explorer for your project, right click on the ‘References’ section for your WebRole and select ‘Manage NuGet Packages…’  <em>full stack:</em> <pre>[DirectoryNotFoundException: Could not find a part of the path 'E:\sitesroot\0\bin\roslyn\csc.exe'.]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +548
   System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) +1159
   System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) +133
   Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Compiler.get_CompilerName() +127
   Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Compiler.FromFileBatch(CompilerParameters options, String[] fileNames) +832
   Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Compiler.CompileAssemblyFromFileBatch(CompilerParameters options, String[] fileNames) +189
   System.Web.Compilation.AssemblyBuilder.Compile() +2038
   System.Web.Compilation.BuildProvidersCompiler.PerformBuild() +325
   System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean isPrecompiledApp) +406
   System.Web.Compilation.BuildManager.CompileGlobalAsax() +47
   System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +366

[HttpException (0x80004005): Could not find a part of the path 'E:\sitesroot\0\bin\roslyn\csc.exe'.]
   System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +76
   System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +642
   System.Web.Compilation.BuildManager.CallAppInitializeMethod() +34
   System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +927

[HttpException (0x80004005): Could not find a part of the path 'E:\sitesroot\0\bin\roslyn\csc.exe'.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +534
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +119
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +726</pre>

<h2>Cause</h2>
A bug in Microsoft.CodeDom.Providers.DotNetCompilerPlatform package 1.0.7
<h2>Fix</h2>
Upgrade package to 1.0.8

<a href="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180222162517321.png"><img title="capture20180222162517321" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px" border="0" alt="capture20180222162517321" src="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180222162517321_thumb.png" width="342" height="210" /></a>

You will notice Updates will have some updates available and select the Microsoft.CodeDom.Providers.DotNetCompilerPlatform ‘Latest stable 1.0.8’ and hit the Update button.

<a href="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180222160446837.png"><img title="capture20180222160446837" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px" border="0" alt="capture20180222160446837" src="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180222160446837_thumb.png" width="969" height="257" /></a>

Publish your application.

Now you may have to wait a bit as the role drains any existing connections, but eventually this will result in getting rid of this pesky error!]]></content:encoded>
    </item>
    <item>
      <title>How To: Capture a System.Net trace from PowerShell</title>
      <link>https://docs.microsoft.com/archive/blogs/jpsanders/how-to-capture-a-system-net-trace-from-powershell</link>
      <pubDate>Thu, 15 Feb 2018 13:50:41 GMT</pubDate>
      <dc:creator><![CDATA[Jeff Sanders]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jpsanders/?p=4555</guid>
      <description><![CDATA[Overview PowerShell can and does use System.Net classes to communicate over the wire.&nbsp; This...]]></description>
      <content:encoded><![CDATA[<h2>Overview</h2> <p>PowerShell can and does use System.Net classes to communicate over the wire.&nbsp; This example will cover capturing a System.Net trace of the Azure PowerShell <em>Publish-AzureWebsiteProject</em> command-let.</p> <h2></h2> <h2></h2> <h2>Setup</h2> <p><strong>Close any running PowerShell instances</strong>.&nbsp; PowerShell reads the .config file when you first start the executable.&nbsp; </p> <p><strong>Locate the PowerShell (or PowerShell_ise) executable</strong> so you can alter the application .config file (or create it).</p> <p>&nbsp;</p> <p>On my Windows 10 machine the location of the PowerShell executable is here:&nbsp; C:\Windows\System32\WindowsPowerShell\v1.0</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180215110755159.png"><img title="capture20180215110755159" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="capture20180215110755159" src="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180215110755159_thumb.png" width="1080" height="161"></a></p> <p>Note the ‘CONFIG File’ for PowerShell.exe.&nbsp; If you have file extensions turned on in Windows Explorer it they look like this:</p> <p>&nbsp;</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180215111016568.png"><img title="capture20180215111016568" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="capture20180215111016568" src="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180215111016568_thumb.png" width="1079" height="174"></a></p> <p>&nbsp;</p> <p>If there are no .config files, don’t panic!&nbsp; You simply will create one.</p> <p><strong>Open (or create) the appropriate .config file</strong>.&nbsp; In my case I will not be using the integrated editor so I need to edit <em>powershell.exe.config</em>.&nbsp; This directory is protected however so if you simply open it with notepad and try and save it, you will get this error: <em>You do not have permission to open this file.&nbsp; See the owner of the file or an administrator to obtain permission.&nbsp; (</em>Note: depending on how your machine is configured, you may have to take ownership of this file – do this in the security tab of the properties).</p> <p>Open notepad (or your favorite editor), right click on the icon and find Notepad.exe,&nbsp; and choose: <em>Run as administrator</em>:</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180215111340287.png"><img title="capture20180215111340287" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="capture20180215111340287" src="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180215111340287_thumb.png" width="244" height="170"></a>&nbsp;</p> <p>&nbsp;</p> <p><strong>Copy the .config file</strong> for a backup and name it something like PowerShell.exe.backupconfig.&nbsp; You can use this to restore the .config file later.</p> <p><strong>Alter the .config file</strong> to enable System.Net tracing. Copy the trace configuration from my blog: <a title="https://blogs.msdn.microsoft.com/jpsanders/2009/03/24/my-favorite-system-net-trace-configuration-file-dumps-process-id-and-date-time-information/" href="https://blogs.msdn.microsoft.com/jpsanders/2009/03/24/my-favorite-system-net-trace-configuration-file-dumps-process-id-and-date-time-information/">https://blogs.msdn.microsoft.com/jpsanders/2009/03/24/my-favorite-system-net-trace-configuration-file-dumps-process-id-and-date-time-information/</a> and add it to the existing config file or create a new one if it does not exist.</p> <p>In my case the &lt;configuration&gt; section already exists so I simply need the section and everything inside the <strong>&lt;system.diagnostics&gt; &lt;/system.diagnostics&gt;</strong> section from the above blog:</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180215111735958.png"><img title="capture20180215111735958" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="capture20180215111735958" src="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180215111735958_thumb.png" width="549" height="354"></a></p> <p>&nbsp;</p> <p><strong>Find the section: initializeData="System.Net.trace.log" </strong>.&nbsp; This section tells where to write the log and the name of the file.&nbsp; We cannot write to this directory so, <strong>change that entry</strong> to initializeData="c:\temp\System.Net.trace.log"</p> <p><strong>Save the .config file.</strong></p> <p><strong>Create the directory c:\temp</strong> on your machine and you are all set to trace!</p> <p><strong>Start powershell and run the command you wish to trace. </strong>&nbsp; In my example I navigated to the directory where my WebDeploy package was and typed: <em>Publish-AzureWebsiteProject -Name jspowershellpublish -Package .\PowershellPublish.zip</em></p> <p><strong>Exit PowerShell and restore the .config file.&nbsp; </strong>If you didn’t have a config file previously simply delete the file you created.&nbsp; If you did have one, copy your backup .config file over top of the one you altered.</p> <p><strong>Read your trace and enjoy!</strong></p> <h2>Conclusion</h2> <p>This blog is not intended to help you solve you issue but simply give you a tool to collect the System.Net trace.&nbsp; Using System.Net tracing to analyze the network traffic in PowerShell is a powerful tool.&nbsp; I hope this blog helps you grab that trace easily.&nbsp; If you found this blog useful, drop me a note!</p>]]></content:encoded>
    </item>
    <item>
      <title>How tell if your Mac Supports Support Intel® Virtualization Technology</title>
      <link>https://docs.microsoft.com/archive/blogs/jpsanders/how-tell-if-your-mac-supports-support-intel-virtualization-technology</link>
      <pubDate>Tue, 13 Feb 2018 09:12:41 GMT</pubDate>
      <dc:creator><![CDATA[Jeff Sanders]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jpsanders/?p=4475</guid>
      <description><![CDATA[I was trying to see if my MacBook Air support HAXM for Android emulation and could not find a good...]]></description>
      <content:encoded><![CDATA[<p>I was trying to see if my MacBook Air support HAXM for Android emulation and could not find a good resource to tell me how to find out what the processor number of my Mac was. So here you go! <p>Open a Terminal <ul> <li>Go to Finder and press Command + Shift + U  <li>Select Terminal  <li>Type the following:&nbsp;&nbsp; <strong>sysctl machdep.cpu.brand_string</strong></li></ul> <p>This returns something like this: machdep.cpu.brand_string: Intel(R) Core(TM) <strong>i7-5650U</strong> CPU @ 2.20GHz <p>The <strong>BOLD </strong>part is the processor number so continue to follow the instructions starting at step 2 below: <a href="https://www.intel.com/content/www/us/en/support/articles/000005486/processors.html">Does My Processor Support Intel® Virtualization Technology?</a> <p>In my case, yes this process does! <p>As a short cut (don’t have to look up the processor number) simply type: <font size="2"><strong>sysctl machdep.cpu.features</strong> </font> <blockquote> <p><font size="2">and see if it contains <strong>VMX</strong></font></p></blockquote>]]></content:encoded>
    </item>
    <item>
      <title>Using/Installing Fiddler on Mac OS</title>
      <link>https://docs.microsoft.com/archive/blogs/jpsanders/usinginstalling-fiddler-on-mac-os</link>
      <pubDate>Thu, 08 Feb 2018 16:57:40 GMT</pubDate>
      <dc:creator><![CDATA[Jeff Sanders]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jpsanders/?p=4455</guid>
      <description><![CDATA[Overview I could not find a good walkthrough so here is one for you.&nbsp; Disclaimer:&nbsp; This is...]]></description>
      <content:encoded><![CDATA[<h2>Overview</h2> <p>I could not find a good walkthrough so here is one for you.&nbsp; Disclaimer:&nbsp; This is on the latest OS and Latest version of Fiddler Beta</p> <h2>Steps</h2> <p>Install Mono – You can do this many ways but I wanted to do Xamarin development so I downloaded and installed Visual Studio for Mac and installed Mono as part of that installation:</p> <p><a href="https://www.visualstudio.com/vs/visual-studio-mac" target="_blank">https://www.visualstudio.com/vs/visual-studio-mac</a></p> <p>Download Fiddler - <a title="https://www.telerik.com/download/fiddler" href="https://www.telerik.com/download/fiddler/fiddler-osx-beta" target="_blank">https://www.telerik.com/download/fiddler/fiddler-osx-beta</a></p> <p>You did step 1 of the instructions on this page already if you installed Visual Studio.</p> <p>Move the ‘fiddler-mac’ folder somewhere you have write access to.&nbsp; I chose my Applications Folder.&nbsp; Open in Finder:</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180208162842248.png"><img title="capture20180208162842248" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="capture20180208162842248" src="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180208162842248_thumb.png" width="244" height="232"></a></p> <p>and then just drag and drop it into Applications:</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180208162949169.png"><img title="capture20180208162949169" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="capture20180208162949169" src="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180208162949169_thumb.png" width="244" height="213"></a></p> <p>And here it is!</p> <p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180208163026081.png"><img title="capture20180208163026081" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="capture20180208163026081" src="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180208163026081_thumb.png" width="490" height="281"></a></p> <p>Next find the Terminal app in LaunchPad and run it:</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180208163159656.png"><img title="capture20180208163159656" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="capture20180208163159656" src="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180208163159656_thumb.png" width="244" height="165"></a></p> <p>Navigate to the Applications folder: <strong>cd /Applications/fiddler-mac/</strong></p> <p>Pre the instructions I ran this:&nbsp; <strong>mono fiddler.exe</strong></p> <p><strong>And got this error:</strong></p> <p>WARNING: The Carbon driver has not been ported to 64bits, and very few parts of Windows.Forms will work properly, or at all  <p>Stacktrace:  <p>&nbsp; at &lt;unknown&gt; &lt;0xffffffff&gt;  <p>&nbsp; at (wrapper managed-to-native) System.Windows.Forms.XplatUICarbon.CGDisplayBounds (intptr) [0x00002] in &lt;36fbc38531724d82b10aef6ebafea6e9&gt;:0  <p><strong>And this error because I never ran/accepted the xcodebuild license :</strong>&nbsp; Agreeing to the Xcode/iOS license requires admin privileges, please run “sudo xcodebuild -license” and then retry this command.</p> <p>To fix this I first ran: <strong>sudo xcodebuild –license</strong></p> <p>and then used the correct 32 bit command to run mono and fiddler: <strong>mono --arch=32 fiddler.exe</strong></p> <p>You next have to allow changes to your networking so you will be prompted:</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180208164015601.png"><img title="capture20180208164015601" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="capture20180208164015601" src="https://msdnshared.blob.core.windows.net/media/2018/02/capture20180208164015601_thumb.png" width="625" height="337"></a></p> <p>And Fiddler will start running!</p> <p>When you start capture, again you need to enter your password to reset the proxy.</p> <h2></h2> <h2>Conclusion</h2> <p>Pretty simple but like I said, I had no luck finding a good workaround and the fiddler instructions did not have the <strong>sudo xcodebuild –license, nor the <strong>mono --arch=32 fiddler.exe </strong></strong>commands</p> <p>Drop me a note if you found this useful!</p>]]></content:encoded>
    </item>
    <item>
      <title>Azure Mobile Apps: Disable Swagger</title>
      <link>https://docs.microsoft.com/archive/blogs/jpsanders/azure-mobile-apps-disable-swagger</link>
      <pubDate>Wed, 31 Jan 2018 10:15:56 GMT</pubDate>
      <dc:creator><![CDATA[Jeff Sanders]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jpsanders/?p=4275</guid>
      <description><![CDATA[Overview The Azure Mobile Apps quickstarts can support Swagger.&nbsp; What if you want to disable...]]></description>
      <content:encoded><![CDATA[<h2>Overview</h2> <p>The Azure Mobile Apps quickstarts can support Swagger.&nbsp; What if you want to disable this?&nbsp; This walkthrough shows you where the Swagger routes come from and how to remove them</p> <h2>Walkthrough – Node.js backend</h2> <p>The Node.js implementation is simply a property.&nbsp; All you need to do is remove the attribute in your code.&nbsp; For example, if you are simply developing in the portal you can use the App Service Editor.&nbsp; In your app chose ‘App Service Editor’ and hit go (pro tip shortcut:&nbsp; It is simply https://&lt;the name of your app&gt;.scm.azurewebsites.net/dev/&nbsp; “</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2018/01/capture20180131095116230.png"><img title="capture20180131095116230" style="border-top: 0px;border-right: 0px;border-bottom: 0px;padding-top: 0px;padding-left: 0px;border-left: 0px;padding-right: 0px" border="0" alt="capture20180131095116230" src="https://msdnshared.blob.core.windows.net/media/2018/01/capture20180131095116230_thumb.png" width="500" height="335"></a></p> <p>Then navigate to the wwwroot/app.js file and change the existing entry <em>swagger: true</em> to <em>swagger: false </em>(the change will automatically be saved and restart the app):</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/2018/01/capture20180131095511742.png"><img title="capture20180131095511742" style="border-top: 0px;border-right: 0px;border-bottom: 0px;padding-top: 0px;padding-left: 0px;border-left: 0px;padding-right: 0px" border="0" alt="capture20180131095511742" src="https://msdnshared.blob.core.windows.net/media/2018/01/capture20180131095511742_thumb.png" width="507" height="355"></a></p> <p>If you are using source control, simply make the change in app.js to set swagger: false and push you changes to the app!</p> <p>&nbsp;</p> <h2>Walkthrough – C# backend</h2> <p>C# does not include swagger by default so you would have had to added it.&nbsp; If you need to remove it, simply remove the code configuring swagger.&nbsp; Example remove the call to ConfigureSwagger highlighted below:</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2018/01/capture20180131101259135.png"><img title="capture20180131101259135" style="border-top: 0px;border-right: 0px;border-bottom: 0px;padding-top: 0px;padding-left: 0px;border-left: 0px;padding-right: 0px" border="0" alt="capture20180131101259135" src="https://msdnshared.blob.core.windows.net/media/2018/01/capture20180131101259135_thumb.png" width="244" height="220"></a></p> <p>&nbsp;</p> <h2>Conclusion</h2> <p>Swagger is useful but you don’t need it most cases.&nbsp; Let me know if you found this useful!</p> <p>C# sample using swagger Ref: <a title="https://github.com/Azure/azure-mobile-apps-net-server/tree/master/samples/SampleApp" href="https://github.com/Azure/azure-mobile-apps-net-server/tree/master/samples/SampleApp" target="_blank">https://github.com/Azure/azure-mobile-apps-net-server/tree/master/samples/SampleApp</a></p>]]></content:encoded>
    </item>
  </channel>
</rss>