<?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>AsiaTech: Microsoft Azure &amp; Development</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/asiatech/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/asiatech/feed.xml</link>
    <description />
    <lastBuildDate>Fri, 16 Feb 2018 00:03:23 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>You may encounter “Page cannot be displayed” when using IIS HTTP redirect</title>
      <link>https://docs.microsoft.com/archive/blogs/asiatech/you-may-encounter-page-cannot-be-displayed-when-using-iis-http-redirect</link>
      <pubDate>Fri, 12 May 2017 09:17:24 GMT</pubDate>
      <dc:creator><![CDATA[old runner]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/asiatech/?p=5405</guid>
      <description><![CDATA[If you are using IIS 7and above, as well as HTTP redirect to redirect requests, you might encounter...]]></description>
      <content:encoded><![CDATA[If you are using IIS 7and above, as well as HTTP redirect to redirect requests, you might encounter this error:

<a href="https://msdnshared.blob.core.windows.net/media/2017/05/112.png"><img width="633" height="278" class="alignnone size-full wp-image-5415" alt="1" src="https://msdnshared.blob.core.windows.net/media/2017/05/112.png" /></a>

I have a website, and would like to redirect all requests to its sub application test2:

<a href="https://msdnshared.blob.core.windows.net/media/2017/05/210.png"><img width="150" height="55" class="alignnone size-full wp-image-5425" alt="2" src="https://msdnshared.blob.core.windows.net/media/2017/05/210.png" /></a>

So I would configure redirect rule like below in website level:

<a href="https://msdnshared.blob.core.windows.net/media/2017/05/36.png"><img width="601" height="352" class="alignnone size-full wp-image-5435" alt="3" src="https://msdnshared.blob.core.windows.net/media/2017/05/36.png" /></a>

However when test browsing, would found above error, if you have any chance to check failed request tracing logs, you will find they are being generated ceaselessly, check the status code, you would find they all returned 302, and be redirected to https://hostname/test2 . you will find same result in IIS log:

<a href="https://msdnshared.blob.core.windows.net/media/2017/05/46.png"><img width="1186" height="217" class="alignnone size-full wp-image-5445" alt="4" src="https://msdnshared.blob.core.windows.net/media/2017/05/46.png" /></a>

This issue is caused by HTTP Redirect inheritance. If you navigate to application level, and open HTTP redirect, you will find the rule you add has been inherited for all subfolders and sub-applications.
To resolve this issue, you need to delete the HTTP redirect rule that hosted on application test2.
Try again, you should be able to get this rule work now.

In this article, I will explain more about HTTP redirect and its usage.
<ol>
 	<li>First of all, there is heritance mechanism for “HTTP redirect”. If you configure this at IIS server level, all websites as well as subfolders and sub-applications will all inherit this http redirect rule.
If you configure this at website level, all subfolders and sub-applications under this website will inherit this rule.</li>
 	<li>So if you add this rule at server level, this rule will take effect for all incoming requests, not only for one website, if you have multiple website on this IIS, in this way, all requests to this server will still be redirected to your destination configured in HTTP redirect.
But you could change the settings for other websites manually by unchecking the inherited rule, then all sub-level setting will be canceled.</li>
 	<li>If you figure out there exists infinite redirecting loop, you’d better check all sublevel settings</li>
 	<li>If you want to redirect all requests to specific page, you’d better check “redirect all requests to exact destination”. for example, if you want to redirect all requests to https://hostname/test2/index.html</li>
</ol>
If you didn’t check this setting, when you browse https://hostname/hello.aspx , you will be redirected to https://hostname/test2/index.html/hello.aspx .
If you checked this setting, in this case, you will be redirected to https://hostname/test2/index.html

<a href="https://msdnshared.blob.core.windows.net/media/2017/05/56.png"><img width="598" height="344" class="alignnone size-full wp-image-5455" alt="5" src="https://msdnshared.blob.core.windows.net/media/2017/05/56.png" /></a>

More reference:

<a href="https://www.iis.net/configreference/system.webserver/httpredirect">https://www.iis.net/configreference/system.webserver/httpredirect</a>
<a href="https://technet.microsoft.com/en-us/library/cc732969(v=ws.10).aspx">https://technet.microsoft.com/en-us/library/cc732969(v=ws.10).aspx</a>

Thanks,
Cynthia Jiang from DEV team.]]></content:encoded>
    </item>
    <item>
      <title>How to call CRM WebAPI in Logic Apps</title>
      <link>https://docs.microsoft.com/archive/blogs/asiatech/how-to-call-crm-webapi-in-logic-apps</link>
      <pubDate>Wed, 10 May 2017 02:10:52 GMT</pubDate>
      <dc:creator><![CDATA[old runner]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/asiatech/?p=5245</guid>
      <description><![CDATA[You probably often use web API provide by Azure/Microsoft in your web applications for customized...]]></description>
      <content:encoded><![CDATA[You probably often use web API provide by Azure/Microsoft in your web applications for customized requirements. Normally,
you should follow OAuth 2.0 code authorization flow to acquire the access token for the API in your web application. But
in Logic Apps, the story is different because all the actions of a work flow are executed in the back-end. In this blog,
we will discuss how to consume Azure API in Logic Apps. In our experiment, we will use CRM WebAPI as an example.

<strong><u>Part 1:</u></strong> Register an application in Azure AD.
<ol>
<ol>
 	<li>Log on Azure Classic Portal <span><a href="https://manage.windowsazure.com/">https://manage.windowsazure.com/</a></span></li>
 	<li>Open the Active Directory.
<a href="https://msdnshared.blob.core.windows.net/media/2017/05/image001.jpg"><img src="https://msdnshared.blob.core.windows.net/media/2017/05/image001.jpg" alt="image001" width="700" class="alignnone size-full wp-image-5265" /></a></li>
 	<li>Click on Add button.
<a href="https://msdnshared.blob.core.windows.net/media/2017/05/image002.jpg"><img src="https://msdnshared.blob.core.windows.net/media/2017/05/image002.jpg" alt="image002" width="700" class="alignnone size-full wp-image-5275" /></a></li>
 	<li>Select "<strong><em>Add an application my organization is developing</em></strong>" on the popup dialog.</li>
 	<li>Set the new application properties to:
<ul>
 	<li><strong>Name</strong>: <em>CRM OAuth2 Demo</em> (you can use what name you want)</li>
 	<li><strong>Type</strong>: <em>Web application and/or web API</em></li>
</ul>
</li>
</ol>
</ol>
<ol>
<ol start="6">
 	<li>Click Next button.
<a href="https://msdnshared.blob.core.windows.net/media/2017/05/image003.jpg"><img src="https://msdnshared.blob.core.windows.net/media/2017/05/image003.jpg" alt="image003" width="400" class="alignnone size-full wp-image-5285" /></a></li>
 	<li>Set the following application properties: (Any urls we can set here I think because we can change them later, just
make sure the validations can be passed.)
<ul>
 	<li><strong>Sign-On URL</strong>: <span><a href="https://localhost:1234">https://localhost:1234</a></span></li>
 	<li><strong>APP ID URL: </strong><span><a href="https://alphac25.onmicrosoft.com/crmoauth2demo">https://alphac25.onmicrosoft.com/crmoauth2demo</a></span>
<a href="https://msdnshared.blob.core.windows.net/media/2017/05/image004.jpg"><img src="https://msdnshared.blob.core.windows.net/media/2017/05/image004.jpg" alt="image004" width="400" class="alignnone size-full wp-image-5295" /></a></li>
Click Complete button.
</ul>
</li>
</ol>
</ol>
<ol>
<ol start="8">
 	<li>The new application titled <em>CRM OAuth2 Demo</em> will be added to the list of applications in the selected Azure
Active Directory.</li>
 	<li>Select the new application titled <em>CRM OAuth2 Demo</em>.
<a href="https://msdnshared.blob.core.windows.net/media/2017/05/image005.jpg"><img src="https://msdnshared.blob.core.windows.net/media/2017/05/image005.jpg" alt="image005" width="550" class="alignnone size-full wp-image-5305" /></a></li>
 	<li>The Application Configuration Tab is displayed with the Client Id.
<a href="https://msdnshared.blob.core.windows.net/media/2017/05/image006.jpg"><img src="https://msdnshared.blob.core.windows.net/media/2017/05/image006.jpg" alt="image006" width="550" class="alignnone size-full wp-image-5315" /></a></li>
 	<li>Configure a client secret for the application.
To generate an access token, we need to configure a client secret.
To do this we add a key to the application in Azure AD. Below is a step by step guide to do this.
<ul>
 	<li>Following on from the previous section, scroll down to the keys on the applications configuration screen</li>
 	<li>Create a new key by selecting 2 years in the Select Duration drop down list.</li>
 	<li>Click Save.
<a href="https://msdnshared.blob.core.windows.net/media/2017/05/image007.jpg"><img src="https://msdnshared.blob.core.windows.net/media/2017/05/image007.jpg" alt="image007" width="700" class="alignnone size-full wp-image-5325" /></a></li>
</ul>
</li>
</ol>
<ol start="12">
 	<li>Store the generated key (Client Secret) in a safe place because it will not be visible the next time the keys screen
is displayed.
<a href="https://msdnshared.blob.core.windows.net/media/2017/05/image008.jpg"><img src="https://msdnshared.blob.core.windows.net/media/2017/05/image008.jpg" alt="image008" width="700" class="alignnone size-full wp-image-5326" /></a></li>
</ol>
<ol start="13">
 	<li>Assign Dynamics CRM permissions to the Demo application
<ul>
 	<li>Continuing from the previous section, on the applications configuration scroll down to the permissions to other
applications section.</li>
 	<li>Click on the Add application button.
<a href="https://msdnshared.blob.core.windows.net/media/2017/05/image009.jpg"><img src="https://msdnshared.blob.core.windows.net/media/2017/05/image009.jpg" alt="image009" width="700" class="alignnone size-full wp-image-5336" /></a></li>
 	<li>The permissions to other applications dialog is displayed.</li>
 	<li>Select Dynamics CRM Online.</li>
 	<li>Click the Add button.</li>
 	<li>Click the Complete button (tick in the lower right corner of the dialog).
<a href="https://msdnshared.blob.core.windows.net/media/2017/05/image010.jpg"><img src="https://msdnshared.blob.core.windows.net/media/2017/05/image010.jpg" alt="image010" width="800" height="642" class="alignnone size-full wp-image-5345" /></a></li>
 	<li>Dynamics CRM Online is added to the permissions to other applications list.</li>
 	<li>Check the Access CRM Online as organization user permission from the Delegated Permissions drop down list.</li>
 	<li>Click save.
<a href="https://msdnshared.blob.core.windows.net/media/2017/05/image011.jpg"><img src="https://msdnshared.blob.core.windows.net/media/2017/05/image011.jpg" alt="image011" width="800" height="339" class="alignnone size-full wp-image-5355" /></a></li>
</ul>
</li>
</ol>
</ol>
<strong>Part 2:</strong> Acquire an access token and use it to call CRM WebAPI
<ol>
<ol>
 	<li>Add an action to acquire access token.
<a href="https://msdnshared.blob.core.windows.net/media/2017/05/image012.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/05/image012.png" alt="image012" width="500" class="alignnone size-full wp-image-5356" /></a>
Note*: Set Headers: Cache-Control: no-cache Content-Type:
application/x-www-form-urlencoded Set Body: client_id: Client ID from Azure AD client_secret: Client ID from
Azure AD username: username of the crm user password: crm user's password resource: crm url eg: <span><a href="https://alphac25.crm5.dynamics.com">https://alphac25.crm5.dynamics.com</a></span> grant_type: password</li>
</ol>
</ol>
<ol>
<ol start="2">
 	<li>Add an action to Parse the HTTP response.
<a href="https://msdnshared.blob.core.windows.net/media/2017/05/image013.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/05/image013.png" alt="image013" width="500" class="alignnone size-full wp-image-5366" /></a></li>
</ol>
<ol start="3">
 	<li>Add another HTTP action to call CRM WebAPI:
<a href="https://msdnshared.blob.core.windows.net/media/2017/05/image014.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/05/image014.png" alt="image014" width="500" class="alignnone size-full wp-image-5375" /></a>
Note*:
<strong>Authorization</strong>: Bearer &lt;access_token&gt;
<strong>Accept</strong>: <em>application/json</em>
<strong>OData-Version</strong>: <em>4.0</em>
<strong>Cache-Control</strong>: <em>no-cache</em></li>
</ol>
</ol>
Here is my test result:
<ol>
<li><a href="https://msdnshared.blob.core.windows.net/media/2017/05/image015.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/05/image015.png" alt="image015" width="1024" class="alignnone size-full wp-image-5385" /></a></li>
</ol>
Ray Wang From APAC DSI team.]]></content:encoded>
    </item>
    <item>
      <title>How to encrypt sections in web.config and to share among the servers</title>
      <link>https://docs.microsoft.com/archive/blogs/asiatech/how-to-encrypt-sections-in-web-config-and-to-share-among-the-servers</link>
      <pubDate>Fri, 21 Apr 2017 06:44:09 GMT</pubDate>
      <dc:creator><![CDATA[old runner]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/asiatech/?p=5226</guid>
      <description><![CDATA[Scenario:

Considering you have 2 iis servers (SERVER#1 and SERVER#2) which share the same...]]></description>
      <content:encoded><![CDATA[<u>Scenario:</u>

Considering you have 2 iis servers (SERVER#1 and SERVER#2) which share the same <strong>web.config</strong> file. You would like to encrypt the sections in the file for security consideration. How to make it work on both servers after the encryption?

&nbsp;

<u>STEPS:</u>

1.Create a new key container with the name of <strong>MyKeys</strong> on the <strong>SERVER#1</strong>:

<strong>aspnet_regiis -pc "MyKeys" -exp</strong>

2.Add <strong>configProctedData</strong> section into the <strong>config</strong> to be encrypted
<table width="996">
<tbody>
<tr>
<td width="982"><strong><em>&lt;configProtectedData&gt;</em></strong>

<strong><em>&lt;providers&gt;</em></strong>

<strong><em>&lt;add name="MyProvider"</em></strong>

<strong><em>type="System.Configuration.RsaProtectedConfigurationProvider, System.Configuration, Version=4.0.30319.0,</em></strong>

<strong><em>Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a,</em></strong><strong><em>processorArchitecture=MSIL"</em></strong>

<strong><em>keyContainerName="MyKeys"</em></strong>

<strong><em>useMachineContainer="true" /&gt;</em></strong>

<strong><em>&lt;/providers&gt;</em></strong>

<strong><em>&lt;/configProtectedData&gt;</em></strong></td>
</tr>
</tbody>
</table>
Attention:

1) The PublicKeyToken depends on the dll version, you can use sn.exe to get this:<a href="https://msdnshared.blob.core.windows.net/media/2017/04/sn.png"></a>

<img width="975" height="171" class="alignnone size-full wp-image-5236" alt="sn" src="https://msdnshared.blob.core.windows.net/media/2017/04/sn.png" />

2) This section should be added after &lt;configSections&gt;, or this section will be automatically removed after the encryption as it can only be existing as the first child of the &lt;configuration&gt;

3) Set <strong>KeyContainerName</strong> with the name of the key container just created

4) Set <strong>processorArchitecture </strong>based on the architecture you have

5) You can change name <strong>MyProvider</strong> as you like

&nbsp;

3. Encrypt the section by using the command as below: eg: application-name: MyApplication, section: connectionStrings

<strong>aspnet_regiis -pe "connectionStrings" -app "/MyApplication" -prov "MyProvider"</strong>

4. Export the key container to a file:

<strong> aspnet_regiis -px "MyKeys" "c:\keys.xml" -pri</strong>

5. Copy the c:\keys.xml to the SERVER#2

6. Import the key container from the file

<strong>aspnet_regiis -pi "MyKeys" "c:\keys.xml"</strong>

7. Grant permission to the application pool identity, eg: NT AUTHORITY\NETWORK SERVICE:

<strong>aspnet_regiis -pa "MyKeys" "NT AUTHORITY\NETWORK SERVICE"</strong>

&nbsp;

Jinjie ZHOU from DSI team.]]></content:encoded>
    </item>
    <item>
      <title>How to force MS web deploy using TLS1.2</title>
      <link>https://docs.microsoft.com/archive/blogs/asiatech/how-to-force-ms-web-deploy-using-tls1-2</link>
      <pubDate>Fri, 14 Apr 2017 07:05:33 GMT</pubDate>
      <dc:creator><![CDATA[old runner]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/asiatech/?p=5225</guid>
      <description><![CDATA[Web Deploy (msdeploy) simplifies deployment of Web applications and Web sites to IIS servers....]]></description>
      <content:encoded><![CDATA[<p align="LEFT" dir="LTR">Web Deploy (msdeploy) simplifies deployment of Web applications and Web sites to IIS servers. Administrators can use Web Deploy to synchronize IIS servers or to migrate to newer versions of IIS. Web Deploy Tool also enables administrators and delegated users to use IIS Manager to deploy ASP.NET and PHP applications to an IIS server.</p>
<p align="LEFT" dir="LTR">By default, Web deploy is using TLS1.0 to synchronize. I’ve met some customers who want to set TLS1.2 as default protocol.</p>
<p align="LEFT" dir="LTR"><span style="font-family: Calibri;font-size: medium">Web Deploy</span><span style="font-family: Calibri;font-size: medium"> needs to be running in <b>windows 2008 R2/Windows 7</b> or above with<b> .NET Framework 4.5.x or .Net Framework 4.6</b> installed, since TLS 1.2 /RFC 5246 was released to industry in Aug. 2008. Any earlier version of windows and .NET Framework cannot support TLS 1.2 runtime. To use TLS1.2, you’ll first need to update .NET framework to meet the requirement.</span></p>
<p align="LEFT" dir="LTR">ALSO, below changes should be implemented only on the client (where msdeploy.exe is running) and not on the server (where IIS web server is running).</p>

<ol>
 	<li><span style="font-family: Calibri;font-size: medium">Create key about TLS1.2 if don’t exist.</span></li>
</ol>
<ul>
 	<li>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client</li>
</ul>
<p align="LEFT" dir="LTR">           "DisabledByDefault"=dword:0</p>
<p align="LEFT" dir="LTR">           "Enabled"=dword:00000001</p>
<span style="font-family: Calibri;font-size: medium">     2. </span><span style="font-family: Verdana;font-size: small">Create keys to force client use TLS1.2</span>
<ul>
 	<li><span style="font-family: Verdana;font-size: small"> </span>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\ v4.0.30319</li>
</ul>
<p style="text-align: left">            "SchUseStrongCrypto" =DWORD32:1</p>

<ul>
 	<li>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\System.Net.ServicePointManager.SecurityProtocol</li>
</ul>
<p align="LEFT" dir="LTR">           "C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" =String:"tls12"</p>
<p align="LEFT" dir="LTR">       The above name should be the location your msdeploy.exe installed in your machine.</p>
<span style="font-family: Calibri;font-size: medium">     3. </span><b><span style="font-family: Verdana;font-size: small">Reboot machine</span></b>

More reference:
<p align="LEFT" dir="LTR"><span style="font-size: medium"></span><a href="https://support.microsoft.com/en-us/help/3154518/support-for-tls-system-default-versions-included-in-the-.net-framework-3.5.1-on-windows-7-sp1-and-server-2008-r2-sp1"><span style="font-family: Calibri;font-size: medium"><span lang="EN">https://support.microsoft.com/en-us/help/3154518/support-for-tls-system-default-versions-included-in-the-.net-framework-3.5.1-on-windows-7-sp1-and-server-2008-r2-sp1</span></span></a><span style="font-family: Calibri;font-size: medium"><span lang="EN"> </span></span></p>
<p align="LEFT" dir="LTR"><span style="font-size: medium"></span><a href="https://www.iis.net/downloads/microsoft/web-deploy"><span style="font-family: Calibri;font-size: medium"><span lang="EN">https://www.iis.net/downloads/microsoft/web-deploy</span></span></a><span style="font-family: Calibri;font-size: medium"><span lang="EN"> </span></span></p>
<p align="LEFT" dir="LTR"><span style="font-size: medium"></span><a href="https://www.microsoft.com/en-sg/download/details.aspx?id=48130"><span style="font-family: Calibri;font-size: medium"><span lang="EN">https://www.microsoft.com/en-sg/download/details.aspx?id=48130</span></span></a><span style="font-family: Calibri;font-size: medium"><span lang="EN"> </span></span></p>
<span style="font-size: medium"></span><a href="https://msdn.microsoft.com/en-us/library/ff657133(v=vs.110).aspx"><span style="font-family: Calibri;font-size: medium"><span lang="EN">https://msdn.microsoft.com/en-us/library/ff657133(v=vs.110).aspx</span></span></a>]]></content:encoded>
    </item>
    <item>
      <title>How to capture crash dump for Desktop Bridge Converted or UWP app</title>
      <link>https://docs.microsoft.com/archive/blogs/asiatech/how-to-capture-crash-dump-for-desktop-bridge-converted-or-uwp-app</link>
      <pubDate>Tue, 21 Feb 2017 09:18:39 GMT</pubDate>
      <dc:creator><![CDATA[Freist]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/asiatech/?p=5215</guid>
      <description><![CDATA[Here is the guide on how to capture crash dump for UWP and Desktop Bridge Converted Apps:  1....]]></description>
      <content:encoded><![CDATA[<p>Here is the guide on how to capture crash dump for UWP and Desktop Bridge Converted Apps:  <p>1. Install Windows SDK which includes Windows Debugger (by clicking Install SDK)  <p><a href="https://developer.microsoft.com/en-us/windows/downloads/sdk-archive">https://developer.microsoft.com/en-us/windows/downloads/sdk-archive</a>  <p>&nbsp; <p><a href="https://msdnshared.blob.core.windows.net/media/2017/02/clip_image00213.jpg"><img title="clip_image002" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="clip_image002" src="https://msdnshared.blob.core.windows.net/media/2017/02/clip_image002_thumb10.jpg" width="644" height="204"></a>  <p>&nbsp; <p>2. Only select Debugging Tools for Windows to finish install.  <p><a href="https://msdnshared.blob.core.windows.net/media/2017/02/clip_image0048.jpg"><img title="clip_image004" style="border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;padding-top: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px" border="0" alt="clip_image004" src="https://msdnshared.blob.core.windows.net/media/2017/02/clip_image004_thumb8.jpg" width="644" height="473"></a>  <p>&nbsp; <p>3. Open Powershell Command, run this command to get your application ID:  <p><b>Get-appxpackage | select-string WPFUWP</b>  <p>For example, I go the result: WPFUWP_1.0.0.1_x86__s46g25shpckvj for my App WPFUWP.  <p>4. Based on your app bit, open Command Window, use 32bit (x86) folder or 64bit (x64) folder of Windows Debugger, run this command (my wpfuwp is 32bit app, so I choose Debuggers\X86) to enable debugging tool for my App:  <p><b>“C:\Program Files (x86)\Windows Kits\10\Debuggers\x86\plmdebug.exe” /enableDebug WPFUWP_1.0.0.1_x86__s46g25shpckvj "C:\Program Files (x86)\Windows Kits\10\Debuggers\x86\WinDbg.exe -c g"</b>  <p>5. Launch the App and recreate the crash issue. The Windbg will auto-break the crash point, and stop App running or existing.  <p>6. Open Windbg, in the command line, run this command:  <p><strong>.dump /ma /u c:\output\crash.dmp</strong>  <p>Then can start check the crash.dmp as postmortem analysis by debugging expert.  <p>After getting dump, can run this command to auto attach debugger on my app:  <p>plmdebug /disableDebug <b>WPFUWP_1.0.0.1_x86__s46g25shpckvj</b>  <p>&nbsp; <p>Thanks,  <p>Freist]]></content:encoded>
    </item>
    <item>
      <title>IIS 8.5 binds to all IP addresses on a server</title>
      <link>https://docs.microsoft.com/archive/blogs/asiatech/iis-8-5-binds-to-all-ip-addresses-on-a-server</link>
      <pubDate>Wed, 15 Feb 2017 11:15:51 GMT</pubDate>
      <dc:creator><![CDATA[Freist]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/asiatech/?p=5175</guid>
      <description><![CDATA[&nbsp; If you have multiple IPs in one windows server 2008 and above, when you add a website in IIS,...]]></description>
      <content:encoded><![CDATA[<p>&nbsp; <p>If you have multiple IPs in one windows server 2008 and above, when you add a website in IIS, you might found that 0.0.0.0 is listening on 80 or 443, rather than the IP address you just added. In this article, I will talk about the root cause and workarounds for this kind of scenario. <p><b><u>Backgrounds:</u></b> <p>1) I have a windows server 2012R2 with two IP address A and B. <p>2) add a new website 1, bind it to IP A with 80 port, add another website 2, bind IP B and 80 port. <p>3) run “netstat -ano”, would find below result: <p>Active connections: <p>Proto local address state PID <p>TCP 0.0.0.0:80 LISTENING 4 <p>The 80 port on all IP addresses are listening. <p>4) stop website 2, IP B:80 should be released and stop listening, If I try to telnet IP address B which is not occupied by any websites now: <p>telnet B 80 <p>it would be successful. <p>5) The scenario is not expected, as I have already stopped website 2. <p><b><u>Root cause:</u></b> <p>It is due to a feature designed in IIS, Socket Pooling. <b>Socket pooling causes Internet Information Services (IIS) to listen to all IP addresses.</b> <p><b></b> <p><b><u>disable Socket pooling?</u></b> <p>I did try to disable socket pooling following <a href="https://support.microsoft.com/en-us/help/238131/how-to-disable-socket-pooling">https://support.microsoft.com/en-us/help/238131/how-to-disable-socket-pooling</a>, however failed. <p><b></b>Here is the reason:<i> </i><b><i>Because DisableSocketPooling is defined as a valid property in the IIS 6.0 metabase schema (MBSchema.xml), you can still set this property by using Adsutil.vbs, but this has no effect.</i></b> <p><b></b> <p><b><u>Workaround:</u></b> <p>Fortunately, In this situation, if we want to delete the port 80 bound with 0.0.0.0, we can manually delete the HTTP listening rule. <p>1) When stopping website 2 in IIS console, if want IP B stop listening on port 80, please run below command: <p>netsh http delete iplisten ipadd=IPB:80 <p>2) Now, we can find that we cannot telnet IPB:80 anymore. <p>3) In the same way, if you need to start the website again, not only to start it on the IIS manager, run below command to add HTTP listening as well. <p>netsh http add iplisten ipadd=IPB:80 <p><b></b> <p><b>More references:</b> <p><a href="https://support.microsoft.com/en-us/help/813368/setting-metabase-property-disablesocketpooling-has-no-effect">https://support.microsoft.com/en-us/help/813368/setting-metabase-property-disablesocketpooling-has-no-effect</a> <p><a href="https://support.microsoft.com/en-us/help/238131/how-to-disable-socket-pooling">https://support.microsoft.com/en-us/help/238131/how-to-disable-socket-pooling</a> <p><a href="https://support.microsoft.com/en-hk/help/954874/iis-binds-to-all-ip-addresses-on-a-server-when-you-install-iis-7.0-on-windows-server-2008">https://support.microsoft.com/en-hk/help/954874/iis-binds-to-all-ip-addresses-on-a-server-when-you-install-iis-7.0-on-windows-server-2008</a> <p><a href="https://msdn.microsoft.com/en-us/library/cc307219(VS.85).aspx">https://msdn.microsoft.com/en-us/library/cc307219(VS.85).aspx</a> <p><a href="https://msdn.microsoft.com/en-us/library/cc307227(v=vs.85).aspx">https://msdn.microsoft.com/en-us/library/cc307227(v=vs.85).aspx</a> <p><b></b> <p><b>Thanks,</b> <p><b>Cynthia Jiang from DSI team</b>]]></content:encoded>
    </item>
    <item>
      <title>“Transfer-encoding: chunked” is not in the response header when using ARR</title>
      <link>https://docs.microsoft.com/archive/blogs/asiatech/transfer-encoding-chunked-is-not-in-the-response-header-when-using-arr</link>
      <pubDate>Wed, 15 Feb 2017 11:13:19 GMT</pubDate>
      <dc:creator><![CDATA[Freist]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/asiatech/?p=5165</guid>
      <description><![CDATA[&nbsp; One of my customer is using ARR (Application Request Routing) in IIS8.5 as a reverse proxy to...]]></description>
      <content:encoded><![CDATA[<p>&nbsp; <p>One of my customer is using ARR (Application Request Routing) in IIS8.5 as a reverse proxy to route the incoming requests to an application which does its own chunked transfer encoding. However, they find the <a name="OLE_LINK2"></a><a name="OLE_LINK1">“transfer-encoding: chunked” is not in the response header when using ARR</a>, which causes the failure of the application connection. <p><b>Root Cause</b> <p>============= <p>In IIS 7 and above, it automatically buffers responses data going back to the client, up to 4MB by default. If any application sends a response less than 4MB, IIS will buffer it in its entirety and send the response with a Content-Length header. If buffering is enabled and the application sends a response without a Content-Length header - and the response exceeds the buffer size or is explicitly flushed by the app before its complete - the buffering code will automatically chunk transfer encode the response if appropriate. If the application manually does its own chunked transfer encoding, it may strip the chunked transfer encoding and send the buffered response with a content-length. <p><b>Solution</b> <p>============= <p>We can try to disable buffering by changing the Response Buffer Threshold (KB) to 0 in ARR Server Farm Proxy setting.  <p><a href="https://msdnshared.blob.core.windows.net/media/2017/02/image267.png"><img title="image" style="border-top: 0px;border-right: 0px;border-bottom: 0px;padding-top: 0px;padding-left: 0px;border-left: 0px;padding-right: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/02/image_thumb237.png" width="279" height="484"></a> <p>Here is a test of the solution by using ARR to route the request to a public chunkedimage page <a href="https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fwww.httpwatch.com%2fhttpgallery%2fchunked%2fchunkedimage.aspx&amp;data=01%7c01%7cyinshi%40064d.mgd.microsoft.com%7c71632ea984a04098928708d385da61af%7c72f988bf86f141af91ab2d7cd011db47%7c1&amp;sdata=eCIwrIRXqU%2fxuQ09%2flKFJdisAZGMUeoeZOFy9lgHwKM%3d">https://www.httpwatch.com/httpgallery/chunked/chunkedimage.aspx</a> .  <p>By default, when accessing this page through ARR, it will buffer the response and send the response with a Content-Length header. <p><a href="https://msdnshared.blob.core.windows.net/media/2017/02/image268.png"><img title="image" style="border-top: 0px;border-right: 0px;border-bottom: 0px;padding-top: 0px;padding-left: 0px;border-left: 0px;padding-right: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/02/image_thumb238.png" width="462" height="484"></a> <p>When we change the Response Buffer Threshold (KB) to 0 in ARR Proxy setting. We can see the Transfer-Encoding: chunked in response header this time. <p><a href="https://msdnshared.blob.core.windows.net/media/2017/02/image269.png"><img title="image" style="border-top: 0px;border-right: 0px;border-bottom: 0px;padding-top: 0px;padding-left: 0px;border-left: 0px;padding-right: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/02/image_thumb239.png" width="378" height="484"></a> <p>-Yingjie Shi from APAC DSI team]]></content:encoded>
    </item>
    <item>
      <title>How to send a email to the subscription’s admin in Logic Apps</title>
      <link>https://docs.microsoft.com/archive/blogs/asiatech/how-to-send-a-email-to-the-subscriptions-admin-in-logic-apps</link>
      <pubDate>Wed, 15 Feb 2017 11:06:17 GMT</pubDate>
      <dc:creator><![CDATA[Freist]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/asiatech/?p=5115</guid>
      <description><![CDATA[&nbsp; Logic Apps provide a way to simplify and implement scalable integrations and workflows in the...]]></description>
      <content:encoded><![CDATA[<p>&nbsp; <p>Logic Apps provide a way to simplify and implement scalable integrations and workflows in the cloud. Using Logic Apps and Azure Service Management REST API (https://msdn.microsoft.com/en-us/library/azure/ee460799.aspx), you can create an application to manage your service’s resources programmatically. In this article, we will demonstrate how to get the email address of Azure subscription and send an email in Logic Apps dynamically. <p><b>Pre works:</b> <p>1. <b>Create a management certificate</b> <p>Please follow the steps in this document to create your management certificate: <p><a href="https://docs.microsoft.com/en-us/azure/cloud-services/cloud-services-certs-create">https://docs.microsoft.com/en-us/azure/cloud-services/cloud-services-certs-create</a> <p>2. <b>Upload your management certificate through Azure classic portal</b> <p>Then you need to upload your management certificate to your subscription (public certificate .cer file) so that it is authorized to perform management operations on your behalf. Please follow this documentation for step-by-step details: <p><a href="https://docs.microsoft.com/en-us/azure/azure-api-management-certs">https://docs.microsoft.com/en-us/azure/azure-api-management-certs</a> <p>3. <b>Find the API you needed.</b> <p>In this sample, we will call an REST API to get the User Accounts information: <p><i>GET https://management.core.windows.net/&lt;subscription-id&gt;/principals</i> <p><a href="https://msdn.microsoft.com/en-us/library/azure/dn469420.aspx">https://msdn.microsoft.com/en-us/library/azure/dn469420.aspx</a> <p><b>Logic Apps:</b> <p><b>Part A: Create a Logic App to get the email of Admin (Parent Logic App). </b> <p>1. Create a request trigger. <p>We created a request trigger here to start our workflow. But you can use any other triggers. <p>More information you can find here: <a href="https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-http-endpoint">https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-http-endpoint</a> <p>2. Create an HTTP action. <p>In this action, we will call Azure REST API using client certificate (pfx + password). <p><b><i>Note</i></b>: You need to base64 encode the pfx file content and embed in the pfx textbox. <p><a href="https://msdnshared.blob.core.windows.net/media/2017/02/clip_image0026.png"><img title="clip_image002" 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="clip_image002" src="https://msdnshared.blob.core.windows.net/media/2017/02/clip_image002_thumb5.png" width="370" height="484"></a> <p>3. The format of the response body is a xml file as follows: <table cellspacing="0" cellpadding="0" border="0"> <tbody> <tr> <td valign="top" width="623"> <p>&lt;?xml version="1.0" encoding="utf-8"?&gt; <p>&lt;Principal xmlns=”https://schemas.microsoft.com/windowsazure”&gt; <p>&lt;Role&gt;role-names-for-user-account&lt;/Role&gt; <p>&lt;Email&gt;email-address-for-user-account&lt;/Email&gt; <p>&lt;/Principal&gt;</p></td></tr></tbody></table> <p>In Logic Apps, it is more convenient to pass the data as a JSON file between different actions or apps. <p>You can use @JSON() function to convert the XML content easily in Logic Apps as below: <p><a href="https://msdnshared.blob.core.windows.net/media/2017/02/clip_image0045.jpg"><img title="clip_image004" 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="clip_image004" src="https://msdnshared.blob.core.windows.net/media/2017/02/clip_image004_thumb5.jpg" width="644" height="330"></a> <p>In real word, you can define any actions after you got the response message. <p>Here we defined a child logic apps to parse the response and send email -- <b>sendEmail</b>. <p><b>Part B: Create a Logic App to parse the response and send email to Admin (Child Logic Apps).</b> <p><b></b>The sendEmail app takes an array of subscription admins and uses Send email action inside a ForEach loop<b></b> <p>1. Create a request trigger to accept the response. <p>Here is a sample of the JSON format playload: <table cellspacing="0" cellpadding="0" border="1"> <tbody> <tr> <td valign="top" width="623"> <p>{ <p>"Principals": { <p>"Principal": [ <p>{ <p>"Role": "ServiceAdministrator;AccountAdministrator", <p>"Email": "user1@microsoft.com" <p>}, <p>{ <p>"Role": "CoAdministrator", <p>"Email": "user2@microsoft.com" <p>} <p>] <p>} <p>}</p></td></tr></tbody></table> <p>Put the above JSON data to <a href="https://jsonschema.net">https://jsonschema.net</a> to get the its JSON schema. <p>Paste the schema definition in request trigger. With the help of JSON schema, Logic App could automatically tokenize all properties e.g. Principals, EmailId etc. <p><a href="https://msdnshared.blob.core.windows.net/media/2017/02/clip_image0063.jpg"><img title="clip_image006" 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="clip_image006" src="https://msdnshared.blob.core.windows.net/media/2017/02/clip_image006_thumb3.jpg" width="644" height="474"></a> <p>2. Create a ForEach action – Loop over all principals <p>a. Send Email action – Send email using Office 365 send email action. <p><a href="https://msdnshared.blob.core.windows.net/media/2017/02/clip_image0083.jpg"><img title="clip_image008" 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="clip_image008" src="https://msdnshared.blob.core.windows.net/media/2017/02/clip_image008_thumb3.jpg" width="459" height="484"></a> <p>3. Response action – Child workflows should have response action to be callable from another logic app use native child workflow action. <p>&nbsp; <p>Special thanks to Vinay Singh, Xiaodong Zhu. <p>&nbsp; <p>Ray Wang from DSI team.]]></content:encoded>
    </item>
    <item>
      <title>How IIS interferes in Group policy “Log on as a service”</title>
      <link>https://docs.microsoft.com/archive/blogs/asiatech/how-iis-interferes-in-group-policy-log-on-as-a-service</link>
      <pubDate>Sat, 04 Feb 2017 05:17:09 GMT</pubDate>
      <dc:creator><![CDATA[Freist]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/asiatech/?p=5025</guid>
      <description><![CDATA[&nbsp; Since windows server 2008, there exists a Group policy called Log on as a service, it’s...]]></description>
      <content:encoded><![CDATA[<p>&nbsp; <p>Since windows server 2008, there exists a Group policy called <b>Log on as a service</b>, it’s located in <b>Group policy\Computer Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment</b>. <p>As introduced in the Microsoft official document <a href="https://technet.microsoft.com/en-us/library/dn221981(v=ws.11).aspx">https://technet.microsoft.com/en-us/library/dn221981(v=ws.11).aspx</a> , it’s used to determine which service accounts can register a process as a service. <p>By checking into this group policy, we will see the the application pool identity inside as below: <p><a href="https://msdnshared.blob.core.windows.net/media/2017/02/clip_image0023.jpg"><img title="clip_image002" 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="clip_image002" src="https://msdnshared.blob.core.windows.net/media/2017/02/clip_image002_thumb3.jpg" width="399" height="484"></a> <p>Apparently, it’s necessary to add the corresponding identities into this group policy for launching the specific application pool.  <p>Additionally, they are automatically inserted by IIS, no need to manually operate it. <p><b>When IIS will add the identities into Log on as a service?</b> <p>1. All the existing application pool identities will be added when IIS was initialized <p>2. When an application pool’s w3wp process is launched, IIS will check if its identity already exists in <b>Log on as a service</b>. If not, it will be added. <p><b>Attentions:</b> <p>1. For an application pool which is running under <b>OnDemand</b> mode, if its identity is not included in <b>Log on as a service</b>, IIS will not add it until the corresponding w3wp process is launched upon the first request. The identity check and insert operation happens when the w3wp process is launched instead of the application pool is started in IIS Manager. <p>2. When adding the identities, IIS will not recursively check the identities in <b>Log on as a service. </b>That is to say, a new identity will still be added even if one of its groups might have been existing inside. In a word, the application pool identities cannot be added in the form of group. <p>Special thanks to Xiaodong Zhu. <p>Jinjie ZHOU from DSI team.]]></content:encoded>
    </item>
    <item>
      <title>How to keep escape characters of slash ‘/’ in URL when using IIS ARR</title>
      <link>https://docs.microsoft.com/archive/blogs/asiatech/how-to-keep-escape-characters-of-slash-in-url-when-using-iis-arr</link>
      <pubDate>Wed, 11 Jan 2017 23:07:05 GMT</pubDate>
      <dc:creator><![CDATA[Freist]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/asiatech/?p=4975</guid>
      <description><![CDATA[&nbsp; Recently I encountered an issue that customer would like to keep Escape Characters (in this...]]></description>
      <content:encoded><![CDATA[<p>&nbsp; <p>Recently I encountered an issue that customer would like to keep Escape Characters (in this case, it’s slash ‘/’, which is encoded to ‘%2F’) in URL, when using IIS ARR to forward the request to backend server. For example, if the Browser send a request containing /a%2Fb to IIS, then ARR would forward the request to backend server, you may found backend server would receive the request being replaced to /a/b. <p>Actually, the reason is URL Rewrite performs matching and rewrite based on the cooked URL (canonical form, decoded) provided by the underlying HTTP layer (HTTP.sys). When process decoded URL, URL Rewrite has no knowledge on whether the original form of ‘/’ is “%2F” or it’s just a regular delimiter. As a consequence, when URL Rewrite encode the final forward URL for ARR, it just leaves ‘/’ as it is. This is a default behavior. <p>Workaround <p>========== <p>It would be best to avoid this kind of URL. But if your website must send request containing ‘%2F’, here is a workaround: USING DOUBLE ESCAPE. <p>In detail, set system.webServer/security/requestFiltering/allowDoubleEscaping to true, and modify the original URL to /a%252Fb (encode ‘%’ to ‘%25’). After that, the backend server could receive the request as /a%2Fb. <p>More references: <p><a href="https://blogs.iis.net/nazim/use-of-special-characters-like-in-an-iis-url">https://blogs.iis.net/nazim/use-of-special-characters-like-in-an-iis-url</a> <p><a href="https://blogs.iis.net/wadeh/how-iis-blocks-characters-in-urls?CommentPosted=true#commentmessage">https://blogs.iis.net/wadeh/how-iis-blocks-characters-in-urls?CommentPosted=true#commentmessage</a> <p>Thanks, <p>Cynthia Jiang from DSI team</p>]]></content:encoded>
    </item>
  </channel>
</rss>