

<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>IIS &#8211; Max的程式語言筆記</title>
	<atom:link href="https://stackoverflow.max-everyday.com/tag/iis/feed/" rel="self" type="application/rss+xml" />
	<link>https://stackoverflow.max-everyday.com</link>
	<description>我要當一個豬頭，快樂過每一天</description>
	<lastBuildDate>Mon, 05 Feb 2018 07:42:25 +0000</lastBuildDate>
	<language>zh-TW</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>

<image>
	<url>https://stackoverflow.max-everyday.com/wp-content/uploads/2017/02/max-stackoverflow-256.png</url>
	<title>IIS &#8211; Max的程式語言筆記</title>
	<link>https://stackoverflow.max-everyday.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Enable Run As User to Act as the Operating System</title>
		<link>https://stackoverflow.max-everyday.com/2018/02/enable-run-as-user-to-act-as-the-operating-system/</link>
					<comments>https://stackoverflow.max-everyday.com/2018/02/enable-run-as-user-to-act-as-the-operating-system/#respond</comments>
		
		<dc:creator><![CDATA[max-stackoverflow]]></dc:creator>
		<pubDate>Mon, 05 Feb 2018 07:36:34 +0000</pubDate>
				<category><![CDATA[VisualStudio筆記]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[Windows]]></category>
		<guid isPermaLink="false">http://stackoverflow.max-everyday.com/?p=2033</guid>

					<description><![CDATA[To use Kerberos delegati...]]></description>
										<content:encoded><![CDATA[<p>To use Kerberos delegation with Tableau Server, you must configure the Run As User account to act as the operating system on each Tableau Server node.</p>
<ol>
<li value="1">On the computer that is running Tableau Server, select <span class="uicontrol">Start &gt; Control Panel &gt; Administrative Tools &gt; Local Security Policy</span>.</li>
<li value="2">In the Local Security Settings window, expand <span class="uicontrol">Local Policies</span>, click <span class="uicontrol">User Rights Assignments</span>, and then right-click <span class="uicontrol">Act as part of the operating system</span> and select <span class="uicontrol">Properties</span>.
<p><img fetchpriority="high" decoding="async" class="alignnone size-full wp-image-2036" src="https://stackoverflow.max-everyday.com/wp-content/uploads/2018/02/runas_os.png" alt="" width="623" height="542" srcset="https://stackoverflow.max-everyday.com/wp-content/uploads/2018/02/runas_os.png 623w, https://stackoverflow.max-everyday.com/wp-content/uploads/2018/02/runas_os-600x522.png 600w" sizes="(max-width: 623px) 100vw, 623px" /></li>
<li value="3">In the Act as part of the operating system Properties window, click <span class="uicontrol">Add User or Group</span>.</li>
<li value="4">Type the <code>&lt;domain&gt;\&lt;username&gt;</code> for the Tableau Server Run As User account (for example: <code>MYCOMPANY\tableau_server</code>), and then click <span class="uicontrol">Check Names</span>.</li>
<li value="5">When the account resolves correctly, it is underlined. Click <span class="uicontrol">OK</span>.</li>
<li value="6">Click <span class="uicontrol">OK</span> to close the Local Security Policy windows.</li>
</ol>
<p>&nbsp;</p>
<p>照上面的流程，可以讓 asp.net 提升權限為其他帳號，預設完全沒去修改的情況下，帳號是使用：</p>
<p class="p1"><span class="s1">IIS APPPOOL\DefaultAppPool</span></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<hr />
<h1 class="title">建立本機使用者帳戶</h1>
<p>更新日期: 2012年3月</p>
<p>適用於: Windows 7, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012</p>
<div id="mainSection">
<div id="mainBody">
<p>若要完成此程序，至少需要 <strong>Administrators</strong> 群組成員資格。請檢視本主題中「其他考量」的詳細資料。</p>
<div id="sectionSection0" class="section">
<h4 class="subHeading">建立本機使用者帳戶</h4>
<div class="subSection">
<ol class="ordered">
<li>開啟 [電腦管理]。</li>
<li>在主控台樹狀目錄中，按一下 [使用者]。
<p><strong>位置</strong></p>
<ul>
<li class="unordered">電腦管理\系統工具\本機使用者和群組\使用者</li>
</ul>
</li>
<li>在 [執行] 功能表，按一下 [新增使用者]。</li>
<li>在對話方塊中輸入適當資訊。</li>
<li>選取或清除下列項目的核取方塊：
<ul>
<li class="unordered"><strong>使用者必須在下次登入時變更密碼</strong></li>
<li class="unordered"><strong>使用者不能變更密碼</strong></li>
<li class="unordered"><strong>密碼永久有效</strong></li>
<li class="unordered"><strong>帳戶已停用</strong></li>
</ul>
</li>
<li>按一下 [建立]，然後按 [關閉]。</li>
</ol>
</div>
<div class="subSection">
<h4 class="subHeading">其他考量</h4>
<div class="subSection">
<ul>
<li class="unordered">若要執行此程序，您必須提供本機電腦上 Administrator 帳戶的認證 (如果系統提示您)，或者您必須是本機電腦上 Administrators 群組的成員。</li>
<li class="unordered">使用者名稱不能與受管理電腦上的其他任何使用者名稱或群組名稱相同。使用者名稱最多可以包含 20 個大小寫字元，但不包括下列字元：
<p>&#8221; / \ [ ] : ; | = , + * ?&lt; &gt; @</p>
<p>群組名稱不能僅由句點 (.) 或空格所組成。</li>
<li class="unordered">在 [密碼] 及 [確認密碼] 中，您可以輸入包含多達 127 個字元的密碼。</li>
<li class="unordered">使用強式密碼及適當的密碼原則可協助保護電腦免受攻擊。</li>
</ul>
</div>
</div>
</div>
</div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://stackoverflow.max-everyday.com/2018/02/enable-run-as-user-to-act-as-the-operating-system/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Impersonate tag in Web.Config in ASP.NET</title>
		<link>https://stackoverflow.max-everyday.com/2018/02/impersonate-tag-in-web-config-in-asp-net/</link>
					<comments>https://stackoverflow.max-everyday.com/2018/02/impersonate-tag-in-web-config-in-asp-net/#respond</comments>
		
		<dc:creator><![CDATA[max-stackoverflow]]></dc:creator>
		<pubDate>Mon, 05 Feb 2018 03:24:55 +0000</pubDate>
				<category><![CDATA[VisualStudio筆記]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[Windows]]></category>
		<guid isPermaLink="false">http://stackoverflow.max-everyday.com/?p=2031</guid>

					<description><![CDATA[MS 官方寫法： https://support...]]></description>
										<content:encoded><![CDATA[<p>MS 官方寫法：</p>
<p><a href="https://support.microsoft.com/en-us/help/306158/how-to-implement-impersonation-in-an-asp-net-application">https://support.microsoft.com/en-us/help/306158/how-to-implement-impersonation-in-an-asp-net-application</a></p>
<p>MS 寫的不太貼心：</p>
<h3 class="sbody-h3">Impersonate the IIS Authenticated Account or User</h3>
<p>To impersonate the Microsoft Internet Information Services (IIS) authenticating user on every request for every page in an ASP.NET application, you must include an <span class="text-base">&lt;identity&gt;</span> tag in the Web.config file of this application and set the <span class="text-base">impersonate</span> attribute to <span class="text-base">true</span>. For example:</p>
<div class="sbody-code">
<pre class=""><code>&lt;identity impersonate="true" /&gt;
</code></pre>
</div>
<p><a class="managed-link content-anchor-link" tabindex="0" href="https://support.microsoft.com/#top" target="" data-bi-name="content-anchor-link" aria-live="rude">back to the top</a></p>
<h3 class="sbody-h3"><a id="2" class="bookmark"></a>Impersonate a Specific User for All the Requests of an ASP.NET Application</h3>
<p>To impersonate a specific user for all the requests on all pages of an ASP.NET application, you can specify the <span class="text-base">userName</span> and <span class="text-base">password</span> attributes in the <span class="text-base">&lt;identity&gt;</span> tag of the Web.config file for that application. For example:</p>
<div class="sbody-code">
<pre><code>&lt;identity impersonate="true" userName="accountname" password="password" /&gt;
</code></pre>
</div>
<p><span class="text-base">Note</span> The identity of the process that impersonates a specific user on a thread must have the &#8220;Act as part of the operating system&#8221; privilege. By default, the Aspnet_wp.exe process runs under a computer account named ASPNET. However, this account does not have the required privileges to impersonate a specific user. You receive an error message if you try to impersonate a specific user. This information applies only to the .NET Framework 1.0. This privilege is not required for the .NET Framework 1.1.</p>
<p>To work around this problem, use one of the following methods:</p>
<ul class="sbody-free_list">
<li>Grant the &#8220;Act as part of the operating system&#8221; privilege to the ASPNET account (the least privileged account).<span class="text-base">Note</span> Although you can use this method to work around the problem, Microsoft does not recommend this method.</li>
<li class="">Change the account that the Aspnet_wp.exe process runs under to the System account in the &lt;processModel&gt; configuration section of the Machine.config file.</li>
</ul>
<hr />
<p>正確用法：</p>
<p>The <code>identity</code> section goes under the <code>system.web</code> section:</p>
<pre class="default prettyprint prettyprinted"><code><span class="tag">&lt;system.web&gt;</span>
  <span class="tag">&lt;authentication</span> <span class="atn">mode</span><span class="pun">=</span><span class="atv">"Windows"</span><span class="tag">/&gt;</span>
  <span class="tag">&lt;identity</span> <span class="atn">impersonate</span><span class="pun">=</span><span class="atv">"true"</span> <span class="atn">userName</span><span class="pun">=</span><span class="atv">"foo"</span> <span class="atn">password</span><span class="pun">=</span><span class="atv">"bar"</span><span class="tag">/&gt;</span>
<span class="tag">&lt;/system.web&gt;</span></code></pre>
<hr />
<h4>相關文章：</h4>
<p>Enable Run As User to Act as the Operating System<br />
<a href="https://stackoverflow.max-everyday.com/2018/02/enable-run-as-user-to-act-as-the-operating-system/">https://stackoverflow.max-everyday.com/2018/02/enable-run-as-user-to-act-as-the-operating-system/</a></p>
<p>&nbsp;</p>
<p>附註：在impersonate為其他帳號時，需要開啟 asp.net 的 temp folder 的寫入權限給該 user account, 不然會產生錯誤訊息。</p>
<p>&nbsp;</p>
<p>附註： 如果遇到這一個 Exception 在 copy file 時：</p>
<blockquote><p>System.IO.IOException: The user name or password is incorrect.</p>
<p>at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)<br />
at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost)</p></blockquote>
<p>請檢查 impersonate 相關的帳號/密碼設定，或寫法是否正確。</p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://stackoverflow.max-everyday.com/2018/02/impersonate-tag-in-web-config-in-asp-net/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>[iis] The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.</title>
		<link>https://stackoverflow.max-everyday.com/2018/01/iis-404-3-wcf/</link>
					<comments>https://stackoverflow.max-everyday.com/2018/01/iis-404-3-wcf/#respond</comments>
		
		<dc:creator><![CDATA[max-stackoverflow]]></dc:creator>
		<pubDate>Mon, 15 Jan 2018 04:04:10 +0000</pubDate>
				<category><![CDATA[VisualStudio筆記]]></category>
		<category><![CDATA[IIS]]></category>
		<guid isPermaLink="false">http://stackoverflow.max-everyday.com/?p=1886</guid>

					<description><![CDATA[拿到別人寫的 C# 寫的 WCF service...]]></description>
										<content:encoded><![CDATA[<p>拿到別人寫的 C# 寫的 WCF service 的 code, 放到 IIS 上跑會顯示 404.3 的 Error.</p>
<blockquote><p>HTTP Error 404.3 &#8211; Not Found The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.</p></blockquote>
<p>解法：</p>
<p>go to control panel or use search  -&gt; &#8216;<strong>Turn Windows feature on or off</strong>&#8216; -&gt;</p>
<p>I just went to &#8216;Add roles and features&#8217; and in the Features part I checked <strong>&#8216;HTTP activation</strong>&#8216; on &#8216;<strong>.Net Framework 4.5 Features</strong>&#8216; -&gt; &#8216;<strong>WCF Services</strong>&#8216;.</p>
<p><img decoding="async" class="alignnone size-full wp-image-1889" src="https://stackoverflow.max-everyday.com/wp-content/uploads/2018/01/Screenshot-2018-01-15-11.39.55.jpg" alt="" width="860" height="610" srcset="https://stackoverflow.max-everyday.com/wp-content/uploads/2018/01/Screenshot-2018-01-15-11.39.55.jpg 860w, https://stackoverflow.max-everyday.com/wp-content/uploads/2018/01/Screenshot-2018-01-15-11.39.55-600x426.jpg 600w, https://stackoverflow.max-everyday.com/wp-content/uploads/2018/01/Screenshot-2018-01-15-11.39.55-768x545.jpg 768w" sizes="(max-width: 860px) 100vw, 860px" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://stackoverflow.max-everyday.com/2018/01/iis-404-3-wcf/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>[iis] web.config This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault=&#8221;Deny&#8221;), or set explicitly by a location tag with overrideMode=&#8221;Deny&#8221; or the legacy allowOverride=&#8221;false&#8221;</title>
		<link>https://stackoverflow.max-everyday.com/2018/01/iis-web-config-this-configuration-section-cannot-be-used-at-this-path-this-happens-when-the-section-is-locked-at-a-parent-level-locking-is-either-by-default-overridemodedefaultdeny-or-set/</link>
					<comments>https://stackoverflow.max-everyday.com/2018/01/iis-web-config-this-configuration-section-cannot-be-used-at-this-path-this-happens-when-the-section-is-locked-at-a-parent-level-locking-is-either-by-default-overridemodedefaultdeny-or-set/#respond</comments>
		
		<dc:creator><![CDATA[max-stackoverflow]]></dc:creator>
		<pubDate>Mon, 15 Jan 2018 03:09:10 +0000</pubDate>
				<category><![CDATA[VisualStudio筆記]]></category>
		<category><![CDATA[IIS]]></category>
		<guid isPermaLink="false">http://stackoverflow.max-everyday.com/?p=1883</guid>

					<description><![CDATA[拿到別人的 web.config 放進 iis ...]]></description>
										<content:encoded><![CDATA[<p>拿到別人的 web.config 放進 iis 裡，顯示 Error 500.19</p>
<p>有錯誤的設定值：</p>
<blockquote><p>&lt;system.webServer&gt;<br />
&lt;modules runAllManagedModulesForAllRequests=&#8221;true&#8221;/&gt;<br />
&lt;/system.webServer&gt;</p></blockquote>
<p>&nbsp;</p>
<p>錯誤原因：</p>
<blockquote><p>This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault=&#8221;Deny&#8221;), or set explicitly by a location tag with overrideMode=&#8221;Deny&#8221; or the legacy allowOverride=&#8221;false&#8221;</p></blockquote>
<p>&nbsp;</p>
<p>google 了很久，結果最後解法是透過：</p>
<p>I had the same problem. Don&#8217;t remember where I found it on the web, but here is what I did:</p>
<ul>
<li>Click &#8220;Start button&#8221;</li>
<li>in the search box, enter &#8220;Turn windows features on or off&#8221;</li>
<li>in the features window, Click: &#8220;Internet Information Services&#8221;</li>
<li>Click: &#8220;World Wide Web Services&#8221;</li>
<li>Click: &#8220;Application Development Features&#8221;</li>
<li>Check (enable) the features. I checked all but CGI.</li>
</ul>
<p>&nbsp;</p>
<p>截圖：</p>
<p><img decoding="async" class="alignnone size-full wp-image-1884" src="https://stackoverflow.max-everyday.com/wp-content/uploads/2018/01/Screenshot-2018-01-15-10.56.37.jpg" alt="" width="860" height="608" srcset="https://stackoverflow.max-everyday.com/wp-content/uploads/2018/01/Screenshot-2018-01-15-10.56.37.jpg 860w, https://stackoverflow.max-everyday.com/wp-content/uploads/2018/01/Screenshot-2018-01-15-10.56.37-600x424.jpg 600w, https://stackoverflow.max-everyday.com/wp-content/uploads/2018/01/Screenshot-2018-01-15-10.56.37-768x543.jpg 768w" sizes="(max-width: 860px) 100vw, 860px" /></p>
<p>原來預設不會安裝這一些，只要全裝上去就可以跑了。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://stackoverflow.max-everyday.com/2018/01/iis-web-config-this-configuration-section-cannot-be-used-at-this-path-this-happens-when-the-section-is-locked-at-a-parent-level-locking-is-either-by-default-overridemodedefaultdeny-or-set/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
