<?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>WebApps</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/webapps/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/webapps/feed.xml</link>
    <description />
    <lastBuildDate>Wed, 05 Sep 2018 07:18:02 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>How to log client IP when IIS is load balanced: the X-Forwarded-For Header (XFF)</title>
      <link>https://docs.microsoft.com/archive/blogs/webapps/how-to-log-client-ip-when-iis-is-load-balanced-the-x-forwarded-for-header-xff</link>
      <pubDate>Wed, 05 Sep 2018 07:08:47 GMT</pubDate>
      <dc:creator><![CDATA[Enamul Kh-MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/webapps/?p=915</guid>
      <description><![CDATA[X-Forwarded-For Header (XFF) is essential whenever we have a Proxy or LoadBalancer between client...]]></description>
      <content:encoded><![CDATA[X-Forwarded-For Header (XFF) is essential whenever we have a Proxy or LoadBalancer between client browser and IIS. This way, the proxy or load balancer will forward the client's IP to IIS, hence giving the IIS the much needed info to track the incoming user.

You need to check your Proxy or Load balancer documentation on how to enable XFF. Once it's enabled, you can follow this blog on how to add a custom logging field in IIS 8.5+ to log the XFF forwarded client-IP:

1. <span>Launch IIS Manager UI (alternately, On an elevated command prompt, type inetmgr.exe)</span>

<span>2. Double-click "Logging"</span>

<a href="https://msdnshared.blob.core.windows.net/media/2018/09/XFF-1.jpg"><img width="472" height="304" class="alignnone size-full wp-image-925" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/09/XFF-1.jpg" /></a>

<span>3. Click "Select Fields"</span>

<a href="https://msdnshared.blob.core.windows.net/media/2018/09/XFF-2.jpg"><img width="444" height="363" class="alignnone size-full wp-image-935" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/09/XFF-2.jpg" /></a>

<span>4. Click "Add Field"</span>

<a href="https://msdnshared.blob.core.windows.net/media/2018/09/XFF-3.jpg"><img width="388" height="512" class="alignnone size-full wp-image-945" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/09/XFF-3.jpg" /></a>

<span>5. In the Add Custom Field window, type as follows</span>

<a href="https://msdnshared.blob.core.windows.net/media/2018/09/XFF-4.jpg"><img width="490" height="278" class="alignnone size-full wp-image-955" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/09/XFF-4.jpg" /></a>

<span>6. Click on "Apply" on the Actions pane on the top right corner</span>

<span>Logs with incoming client IP will be recorded in the IIS Log (default location is %SystemDrive%\inetpub\logs\LogFiles). The new log files will have an extra "_x" to it's name.</span>]]></content:encoded>
    </item>
    <item>
      <title>FIPS compliant machinekey section for IIS Application</title>
      <link>https://docs.microsoft.com/archive/blogs/webapps/fips-compliant-machinekey-section-for-iis-application</link>
      <pubDate>Wed, 05 Sep 2018 07:01:31 GMT</pubDate>
      <dc:creator><![CDATA[Enamul Kh-MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/webapps/?p=905</guid>
      <description><![CDATA[One of my customers needed to configure his ASP.NET site under FIPS. The information was scattered...]]></description>
      <content:encoded><![CDATA[One of my customers needed to configure his ASP.NET site under FIPS. The information was scattered in various MSDN blogs and docs. To prevent the good work go to waste, I am blogging it here so that others can be benefited as well:

FIPS compliant machinekey section in web.config:
<pre>&lt;machineKey
validationKey="XXXXXXXXXXXXXXXXXXX"   (same key for all IIS servers)
decryptionKey="XXXXXXXXXXXXXXXXXXX" (same key for all IIS servers)
validation="HMACSHA256" (you can use any of the 3 validation options below based on your required encryption strength)
decryption="AES"
/&gt;</pre>
Decryption:

AES Specifies that ASP.NET uses the AES (Rijndael) algorithm to encrypt and decrypt data. AES is the default algorithm and is the one that is used when the value of this attribute is Auto. This algorithm is compliant with the United States Federal Information Processing Standards (FIPS).

Validation:
<ol>
 	<li>HMACSHA256 Specifies that ASP.NET uses the HMACSHA256 hash algorithm to validate data. This is the default value. This algorithm is compliant with the United Stated Federal Information Processing Standards (FIPS).</li>
 	<li>HMACSHA384 Specifies that ASP.NET uses the HMACSHA384 hash algorithm to validate data. This option is available for applications that require stronger security than is provided by the HMACSHA256 algorithm. This algorithm is compliant with the United States Federal Information Processing Standards (FIPS).</li>
 	<li>HMACSHA512 Specifies that ASP.NET uses the HMACSHA512 hash algorithm to validate data. This option is available for applications that require stronger security than is provided by the HMACSHA384 algorithm. This algorithm is compliant with the United States Federal Information Processing Standards (FIPS).</li>
</ol>
Do not forget:
<ul>
 	<li>Besides the above machinekey settings, you also need to ensure that the compilation section of your web.config and the page directives of individual aspx page should all have debug="false". A Debug="true" will throw a FIPs compliance error before any code in your ASPX pages can run.</li>
 	<li>If you like to test your code in Visual studio, please ensure FIPS is disabled</li>
 	<li>Also, FIPS needs to be enabled at the Machine/OS level.</li>
</ul>]]></content:encoded>
    </item>
    <item>
      <title>Forcing IIS to write logs (HTTP and FTP)</title>
      <link>https://docs.microsoft.com/archive/blogs/webapps/forcing-iis-to-write-logs-http-and-ftp</link>
      <pubDate>Wed, 05 Sep 2018 06:53:21 GMT</pubDate>
      <dc:creator><![CDATA[Enamul Kh-MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/webapps/?p=895</guid>
      <description><![CDATA[I was assisting a customer who was trying several different configurations but his IIS log was not...]]></description>
      <content:encoded><![CDATA[I was assisting a customer who was trying several different configurations but his IIS log was not reflecting any of these changes. This can be frustrating at times since you always expect the logs to be written corresponding to your actions. By default, starting with IIS 7.0, IIS HTTP logs are written once every 1 minute or at 64kb whichever comes first. The FTP logs are written once every 6 minutes. Basically the logs are buffered for performance reasons and are written at these predefined intervals.

If these default values do not work for you, then please read on…..

<strong>Steps to force IIS to write HTTP logs</strong> (forces all entries in the log buffer to be written from the buffer into the log file):
<ol>
 	<li>Open a command prompt with administrative privilege</li>
 	<li>cd C:\Windows\System32</li>
 	<li>netsh http flush logbuffer</li>
</ol>
<strong>Steps to force IIS to write FTP logs</strong> (forces all entries in the log buffer to be written from the buffer into the log file):
<ol>
 	<li>Call the FlushLog method which works at the FTP site level. There is no control in the IIS Manager that calls the &lt;FlushLog&gt; method. You can call the method programmatically using the sample code that is provided here: <a href="https://docs.microsoft.com/en-us/iis/configuration/system.applicationHost/sites/site/ftpServer/flushlog">https://docs.microsoft.com/en-us/iis/configuration/system.applicationHost/sites/site/ftpServer/flushlog</a></li>
</ol>]]></content:encoded>
    </item>
    <item>
      <title>How to programmatically determine if a user is authorized in an IIS Website</title>
      <link>https://docs.microsoft.com/archive/blogs/webapps/how-to-programmatically-determine-if-a-user-is-authorized-in-an-iis-website</link>
      <pubDate>Wed, 05 Sep 2018 06:49:38 GMT</pubDate>
      <dc:creator><![CDATA[Enamul Kh-MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/webapps/?p=885</guid>
      <description><![CDATA[A customer had a unique need of verifying authorized users against a website that runs on IIS. The...]]></description>
      <content:encoded><![CDATA[A customer had a unique need of verifying authorized users against a website that runs on IIS. The code is short and simple if you know what component and method(s) to invoke.

&nbsp;
<p lang="en-GB"><span>using</span><span> System;</span></p>
<p lang="en-GB"><span>using</span><span> System.Collections.Generic;</span></p>
<p lang="en-GB"><span>using</span><span> System.Linq;</span></p>
<p lang="en-GB"><span>using</span><span> System.Text;</span></p>
<p lang="en-GB"><span>using</span><span> System.Threading.Tasks;</span></p>
<p lang="en-GB"><span>using</span><span> Microsoft.Web.Management.Server;</span></p>
<p lang="en-GB"><span>namespace</span><span> ConsoleApp1</span></p>
<p lang="en-GB">{</p>
<p lang="en-GB"><span>    </span><span>class </span><span>Program</span></p>
<p lang="en-GB">    {</p>
<p lang="en-GB"><span>        </span><span>static void</span><span> Main(</span><span>string</span><span>[] args)</span></p>
<p lang="en-GB">        {</p>
<p lang="en-GB"><span>            </span><span>string</span><span> message = </span><span>null</span><span>; </span></p>
<p lang="en-GB"><span>            </span><span>string</span><span> isUserFound = </span><span>"No"</span><span>;</span></p>
<p lang="en-GB"><span>            </span><span>string</span><span> sprovider = </span><span>null</span><span>;</span></p>
<p lang="en-GB"><span>            </span><span>string</span><span> userName = </span><span>"john.doe"</span><span>;</span></p>
<p lang="en-GB"><span>            ManagementAuthorizationInfoCollection authorizedCollection = ManagementAuthorization.GetAuthorizedUsers(</span><span>"Default Web Site"</span><span>, </span><span>true</span><span>, 0, 10);</span></p>
<p lang="en-GB"><span>            sprovider = </span><span>"Provider: "</span><span> + ManagementAuthorization.Provider;</span></p>
<p lang="en-GB"><span>            Console.WriteLine(</span><span>"{0}"</span><span>, sprovider);</span></p>
<p lang="en-GB"><span>            </span><span>// Search the returned collection.</span></p>
<p lang="en-GB"><span>            </span><span>foreach</span><span> (ManagementAuthorizationInfo authorizedInfo </span><span>in</span><span> authorizedCollection)</span></p>
<p lang="en-GB">            {</p>
<p lang="en-GB"><span>                </span><span>// Check to see if the user is already in the allowed users collection.                </span></p>
<p lang="en-GB"><span>                </span><span>if</span><span> (userName.Equals(authorizedInfo.Name))</span></p>
<p lang="en-GB">                {</p>
<p lang="en-GB"><span>                    isUserFound = </span><span>"yes"</span><span>;</span></p>
<p lang="en-GB">                }</p>
<p lang="en-GB">            }</p>
<p lang="en-GB"><span>            Console.WriteLine(</span><span>"Does John.doe exist? {0}"</span><span>,isUserFound);</span></p>
<p lang="en-GB"><span>            Console.WriteLine(</span><span>"done calling Microsoft.Web.Management.dll. Hit any key"</span><span>);</span></p>
<p lang="en-GB">            Console.ReadLine();</p>
<p lang="en-GB">        }</p>
<p lang="en-GB">    }</p>
<p lang="en-GB">}</p>]]></content:encoded>
    </item>
    <item>
      <title>Powershell ISE crashes on exit while using Microsoft.Web.Management.dll</title>
      <link>https://docs.microsoft.com/archive/blogs/webapps/powershell-ise-crashes-on-exit-while-using-microsoft-web-management-dll</link>
      <pubDate>Wed, 05 Sep 2018 06:37:09 GMT</pubDate>
      <dc:creator><![CDATA[Enamul Kh-MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/webapps/?p=865</guid>
      <description><![CDATA[I was helping a customer other day on a stubborn crash whenever Powershell-ISE and...]]></description>
      <content:encoded><![CDATA[I was helping a customer other day on a stubborn crash whenever Powershell-ISE and Microsoft.Web.Management.dll are put together. While calling Microsoft.Web.Management.dll from Powershell-ISE or WMIprvse.exe, upon exit, it was throwing Runtime.InteropServices.InvalidComObject error while crashing the Powershell-ISE or WMIprvse.exe. Loading/calling the same DLL on the same machine from a C# console application did NOT exhibit this behavior.

<em><strong>Error details from Event Log:</strong></em>
- &lt;Event xmlns="<a href="https://schemas.microsoft.com/win/2004/08/events/event">https://schemas.microsoft.com/win/2004/08/events/event</a>"&gt;
- &lt;System&gt;
&lt;Provider Name="Windows Error Reporting" /&gt;
&lt;EventID Qualifiers="0"&gt;1001&lt;/EventID&gt;
&lt;Level&gt;4&lt;/Level&gt;
&lt;Task&gt;0&lt;/Task&gt;
&lt;Keywords&gt;0x80000000000000&lt;/Keywords&gt;
&lt;TimeCreated SystemTime="2018-08-14T17:21:53.000000000Z" /&gt;
&lt;EventRecordID&gt;6366&lt;/EventRecordID&gt;
&lt;Channel&gt;Application&lt;/Channel&gt;
&lt;Computer&gt;MYMACHINE&lt;/Computer&gt;
&lt;Security /&gt;
&lt;/System&gt;
- &lt;EventData&gt;
&lt;Data&gt;125883710853&lt;/Data&gt;
&lt;Data&gt;5&lt;/Data&gt;
&lt;Data&gt;PowerShell&lt;/Data&gt;
&lt;Data&gt;Not available&lt;/Data&gt;
&lt;Data&gt;0&lt;/Data&gt;
&lt;Data&gt;PowerShell_ISE.exe&lt;/Data&gt;
&lt;Data&gt;10.0.10586.117&lt;/Data&gt;
&lt;Data&gt;Runtime.InteropServices.InvalidComObject&lt;/Data&gt;
&lt;Data&gt;Runtime.InteropServices.InvalidComObject&lt;/Data&gt;
&lt;Data&gt;unknown&lt;/Data&gt;
&lt;Data&gt;System.StubHelpers.StubHelpers.GetCOMIPFromRCW&lt;/Data&gt;
&lt;/EventData&gt;
&lt;/Event&gt;

<em><strong>Repro steps:</strong></em>
-First verify that IIS Default Web Site is up and running without any issues (we will be referencing this site in the powershell script)
-Launch Powershell ISE in admin mode
-Run following commands one after another

[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Web.Management")

if (-Not ([Microsoft.Web.Management.Server.ManagementAuthorization]::GetAuthorizedUsers("Default Web Site", $true, 0, 10) | ? Name -eq YourDomain\YourUserName)) {
$false
}
else {
$true
}
exit

-ISE crashes.
-Error logged in the Eventlog

<em><strong> The solution:</strong></em>
Replace the exit with
[System.Environment]::Exit(0)]]></content:encoded>
    </item>
    <item>
      <title>Enabling “Transfer-encoding: chunked” in the response header with IIS</title>
      <link>https://docs.microsoft.com/archive/blogs/webapps/enabling-transfer-encoding-chunked-in-the-response-header-with-iis</link>
      <pubDate>Mon, 26 Mar 2018 03:42:24 GMT</pubDate>
      <dc:creator><![CDATA[Enamul Kh-MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/webapps/?p=855</guid>
      <description><![CDATA[While assisting a customer on configuring ARR (Application Request Routing), we found that chunked...]]></description>
      <content:encoded><![CDATA[While assisting a customer on configuring ARR (Application Request Routing), we found that chunked transfer encoding was not working properly. After bit of workaround, we were able to fix it up. Here is a summary of the troubleshooting session.

Quick Note: "Chunked" is a type of transfer encoding by which the message body is transmitted to the client as chunks that are stamped with the size of the chunks (see section 14.40 of RFC 2068). With chunked transfer encoding, the client can make sure that it has received all of the data that the server sends. Chunked transfer encoding is similar to MIME encoding in relation to Internet mail (see RFC 822). The specific differences between MIME encoding and chunked transfer encoding are discussed in section 19.4 of RFC 2068.

To enable chunked transfer encoding, set the value for AspEnableChunkedEncoding to True for the site, the server, or the virtual directory that you want to enable chunked transfer encoding for:
<ul>
 	<li>Open a command prompt.</li>
 	<li>Change to the Inetpub\Adminscripts folder.</li>
 	<li>Run the following:
cscript adsutil.vbs set /W3SVC/AspEnableChunkedEncoding "TRUE"</li>
</ul>]]></content:encoded>
    </item>
    <item>
      <title>How to remove NEGOTIATE from IIS Windows Authentication</title>
      <link>https://docs.microsoft.com/archive/blogs/webapps/how-to-remove-negotiate-from-iis-windows-authentication</link>
      <pubDate>Mon, 26 Mar 2018 03:26:48 GMT</pubDate>
      <dc:creator><![CDATA[Enamul Kh-MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/webapps/?p=805</guid>
      <description><![CDATA[I was assisting a customer just the other day who was having a dejavu of removing Negotiate from IIS...]]></description>
      <content:encoded><![CDATA[I was assisting a customer just the other day who was having a dejavu of removing Negotiate from IIS Windows Authentication. After clicking the "Remove" button, if he restarted the machine, the Negotiate would reappear!

This is because the setting is by default locked. You need to do from the IIS Configuration Editor.

Here is how to do it:
<p style="padding-left: 30px">Open IIS Manager (just type inetmgr.exe on your Start---&gt;Run)</p>
<p style="padding-left: 30px">Select "Configuration Editor" under management<a href="https://msdnshared.blob.core.windows.net/media/2018/03/four.jpg"></a></p>
<p style="padding-left: 30px"><a href="https://msdnshared.blob.core.windows.net/media/2018/03/four.jpg"><img width="467" height="141" class="alignnone size-full wp-image-825" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/03/four.jpg" /></a></p>
<p style="padding-left: 30px"><span style="float: none;background-color: transparent;color: #242729;font-family: Arial,'Helvetica Neue',Helvetica,sans-serif;font-size: 15px;font-style: normal;font-variant: normal;font-weight: 400;letter-spacing: normal;line-height: 19.5px;text-align: left;text-decoration: none;text-indent: 0px">Change the Section to </span><code>system.webServer/security/authentication/windowsAuthentication</code></p>
<p style="padding-left: 30px"><a href="https://msdnshared.blob.core.windows.net/media/2018/03/five.jpg"><img width="435" height="381" class="alignnone size-full wp-image-815" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/03/five.jpg" /></a></p>
<p style="padding-left: 30px"><span style="float: none;background-color: transparent;color: #242729;font-family: Arial,'Helvetica Neue',Helvetica,sans-serif;font-size: 15px;font-style: normal;font-variant: normal;font-weight: 400;letter-spacing: normal;line-height: 19.5px;text-align: left;text-decoration: none;text-indent: 0px">Click on the </span><code>providers</code><span style="float: none;background-color: transparent;color: #242729;font-family: Arial,'Helvetica Neue',Helvetica,sans-serif;font-size: 15px;font-style: normal;font-variant: normal;font-weight: 400;letter-spacing: normal;line-height: 19.5px;text-align: left;text-decoration: none;text-indent: 0px"> item, and then click </span><code>Edit Items</code><span style="float: none;background-color: transparent;color: #242729;font-family: Arial,'Helvetica Neue',Helvetica,sans-serif;font-size: 15px;font-style: normal;font-variant: normal;font-weight: 400;letter-spacing: normal;line-height: 19.5px;text-align: left;text-decoration: none;text-indent: 0px"> on the right. Select the "Negotiate" item and click "Remove":</span></p>
<p style="padding-left: 30px"><a href="https://msdnshared.blob.core.windows.net/media/2018/03/six.jpg"><img width="492" height="196" class="alignnone size-full wp-image-835" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/03/six.jpg" /></a></p>
<p style="padding-left: 30px">Click Apply</p>
&nbsp;

Alternately, you can do it from the command line as follows:
<pre><span>appcmd.exe set config "Virtual/path/to/application" -section:system.webServer/security/</span><span>authentication/windowsAuthentication /-"providers.[value='Negotiate']" /commit:apphost</span></pre>]]></content:encoded>
    </item>
    <item>
      <title>Server object error 'ASP 0177 : 8000ffff'</title>
      <link>https://docs.microsoft.com/archive/blogs/webapps/server-object-error-asp-0177-8000ffff</link>
      <pubDate>Mon, 26 Mar 2018 02:59:58 GMT</pubDate>
      <dc:creator><![CDATA[Enamul Kh-MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/webapps/?p=795</guid>
      <description><![CDATA[I was assisting a customer who was struggling with this intermittent error. An iisreset would...]]></description>
      <content:encoded><![CDATA[I was assisting a customer who was struggling with this intermittent error. An iisreset would alleviate the problem temporarily only to resurface within few days again. This is the error details:

<span class="go">Server object error 'ASP 0177 : 8000ffff'
Server.CreateObject Failed
ShowReport.asp, line 36</span>

<span style="float: none;background-color: transparent;color: #000000;font-family: 'Segoe UI',SegoeUI,'Helvetica Neue',Helvetica,Arial,sans-serif;font-size: 15px;font-style: normal;font-variant: normal;font-weight: 400;letter-spacing: normal;text-align: left;text-decoration: none;text-indent: 0px">This problem occurs if a website that you browse is an Active Server Pages (ASP) page that calls a .NET-managed component. </span>
<span class="text-base">Note</span><span style="float: none;background-color: transparent;color: #000000;font-family: 'Segoe UI',SegoeUI,'Helvetica Neue',Helvetica,Arial,sans-serif;font-size: 15px;font-style: normal;font-variant: normal;font-weight: 400;letter-spacing: normal;text-align: left;text-decoration: none;text-indent: 0px"> This .NET-managed component uses .NET interop functionality.</span>

Here is how we fixed the issue:
<ol class="sbody-num_list">
 	<li>Click <strong class="uiterm">Start</strong>, click <strong class="uiterm">Run</strong>, type <span class="sbody-userinput">regedit</span>, and then click <strong class="uiterm">OK</strong>. (<strong>NOTE</strong>: Registry changes can impact your server severely. You need to test this on a Test server first and only to promote to Production after adequate testing)</li>
 	<li class="x-hidden-focus">Locate and then click one of the following registry subkeys, depending on the version of Windows that is running on your computer. If your computer is running a 32-bit version of Windows, click the following registry subkey:<span class="text-base">
</span>
<div class="indent"><strong class="sbody-strong">HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_IGNORE_ZONES_INITIALIZATION_FAILURE_KB945701</strong></div>
Programs that are 32-bit and run on a 64-bit version of Windows operate in WOW64 mode. These programs access registry keys and values that are stored in a different registry subkey. If you are running 32-bit programs on a 64-bit version of Windows, click the following registry subkey:
<div class="indent"><strong class="sbody-strong">HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_IGNORE_ZONES_INITIALIZATION_FAILURE_KB945701</strong></div>
<span class="text-base">Note</span> If the FEATURE_IGNORE_ZONES_INITIALIZATION_FAILURE_KB945701 subkey does not exist, you must manually create it.</li>
 	<li>Right-click <strong class="uiterm">FEATURE_IGNORE_ZONES_INITIALIZATION_FAILURE_KB945701</strong>, point to <strong class="uiterm">New</strong>, and then click <strong class="uiterm">DWORD Value</strong>.</li>
 	<li>Type <span class="sbody-userinput">w3wp.exe</span> to name the new registry entry, and then press ENTER.</li>
 	<li>Right-click <span class="sbody-userinput">w3wp.exe</span>, and then click
<strong class="uiterm">Modify</strong>.</li>
 	<li>In the <strong class="uiterm">Value data</strong> box, type <span class="sbody-userinput">1</span>, and then click <strong class="uiterm">OK</strong>.</li>
 	<li>Exit Registry Editor.</li>
 	<li>Reboot your server.</li>
</ol>]]></content:encoded>
    </item>
    <item>
      <title>IIS Manager shows Authorization warning when testing a Physical Path</title>
      <link>https://docs.microsoft.com/archive/blogs/webapps/iis-manager-shows-authorization-warning-when-testing-a-physical-path</link>
      <pubDate>Sat, 24 Mar 2018 03:47:00 GMT</pubDate>
      <dc:creator><![CDATA[Enamul Kh-MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/webapps/?p=755</guid>
      <description><![CDATA[Time to time, customers ask us about this warning. This is a by-design "benign" warning simply...]]></description>
      <content:encoded><![CDATA[Time to time, customers ask us about this warning. This is a by-design "benign" warning simply telling us a verification has been deferred to runtime. This can be ignored in most cases.

If you select your Application pool in IIS Manager and choose the basic settings, you will see following window:

<a href="https://msdnshared.blob.core.windows.net/media/2018/03/one.jpg"><img width="644" height="477" class="size-full wp-image-765" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/03/one.jpg" /></a>

<span style="float: none;background-color: transparent;color: #333333;cursor: text;font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif;font-size: 16px;font-style: normal;font-variant: normal;font-weight: 400;letter-spacing: normal;line-height: 24px;text-align: left;text-decoration: none;text-indent: 0px">Now if you click on "Test Settings…", you may see a yellow icon next to Authorization section and a corresponding warning message as follows:</span>

<a href="https://msdnshared.blob.core.windows.net/media/2018/03/two.jpg"><img width="762" height="518" class="alignnone size-full wp-image-775" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/03/two.jpg" /></a>

Here is the warning details: The server is configured to use pass-through authentication with a built-in account to access the specified physical path. However, IIS Manager cannot verify whether the built-in account has access. Make sure that the application pool identity has Read access to the physical path. If this server is joined to a domain, and the application pool identity is NetworkService or LocalSystem, verify that &lt;domain&gt;\&lt;computer_name&gt;$ has Read access to the physical path. Then test these settings again.

This is just a warning, not Error. Path authorization couldn't be tested at configuration time, but it will be tested at runtime.]]></content:encoded>
    </item>
    <item>
      <title>Binding a Certificate in IIS using C# and Powershell</title>
      <link>https://docs.microsoft.com/archive/blogs/webapps/binding-a-certificate-in-iis-using-c-and-powershell</link>
      <pubDate>Fri, 23 Mar 2018 22:29:43 GMT</pubDate>
      <dc:creator><![CDATA[Enamul Kh-MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/webapps/?p=745</guid>
      <description><![CDATA[Other day I was assisting a customer who had a unique need of binding a Certificate from within C#...]]></description>
      <content:encoded><![CDATA[Other day I was assisting a customer who had a unique need of binding a Certificate from within C# code using Powershell. A direct API call won't work due to some constraints, so Powershell was the other viable option. Customer also didn't want any Powershell window to pop-up, so we needed to code around it.

Here is the code sample:
<pre>using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Management.Automation;
using System.Collections.ObjectModel;

namespace ExecutePowershell
{
 class Program
 {
 static void Main(string[] args)
 {
 ExecutePowershellClass pwrshell = new ExecutePowershellClass();
 pwrshell.ExecuteCommand();
 Console.ReadLine();
 }
 }
 class ExecutePowershellClass
 {
 public void ExecuteCommand()
 {
 using (PowerShell myPowerShellInstance = PowerShell.Create())
 {
 //powershell script to get version number and list of processes currently executing in the machine.
 string sScript= "$PSVersionTable.PSVersion;get-process"; //<strong>REPLACE THIS sScript WITH THE POWERSHELL </strong>
<strong> //COMMAND BELOW. BASICALLY BUILD YOUR OWN STRING BASED ON YOUR NEED</strong>

// use "AddScript" to add the contents of a script file to the end of the execution pipeline.
 myPowerShellInstance.AddScript(sScript);

// invoke execution on the pipeline (collecting output)
 Collection&lt;PSObject&gt; PSOutput = myPowerShellInstance.Invoke();

// loop through each output object item
 foreach (PSObject outputItem in PSOutput)
 {
 if (outputItem != null)
 {
 Console.WriteLine(outputItem.ToString());
 }
 }
 }
 }
 }
}</pre>
<pre>Powershell COMMAND to bind a certificate

# Import IIS web administration Module
Import-Module WebAdministration

New-SelfSignedCertificate -DnsName website.test.com -CertStoreLocation cert:\LocalMachine\My

$certificate = Get-ChildItem Cert:\LocalMachine\My | Where-Object {$_.subject -like "*website.test.com*"} | Select-Object -ExpandProperty Thumbprint

Write-Host $certificate

Get-WebBinding -Port 443 -Name website.test.com | Remove-WebBinding

Remove-Item -Path "IIS:\SslBindings\*!443!website.test.com"

New-WebBinding -Name "Default Web Site" -IPAddress "*" -HostHeader "website.test.com" -Port 443 -Protocol https -SslFlags 0

get-item -Path "cert:\localmachine\my\$certificate" | new-item -path IIS:\SslBindings\0.0.0.0!443!website.test.com -Value $certificate -Force</pre>
<strong>Note</strong>: You need to modify the hostname and binding accordingly.

&nbsp;]]></content:encoded>
    </item>
  </channel>
</rss>