![](/img/trans.png)
[英]Programmatically set up user account for custom identity application pool in IIS 7
[英]IIS Application Pool Identity to use Logged On User Windows Identity
我正在開發一個使用LDAP執行Active Directory更新的Web應用程序。 當我在IIS 7上托管應用程序時,我在語句directoryEntry.CommitChanges();
收到Access is denied
錯誤directoryEntry.CommitChanges();
。
然后我發現應用程序池使用標識“IIS APPPOOL \\ ASP.NET v4.0”來執行更新。
我需要使用Web應用程序的用戶的窗口帳戶作為應用程序池的標識。
我做了以下事情:
但還沒有得到它的工作。
您正在尋找的概念稱為假冒
從文件 :
在我使用此配置的情況下,它使用活動目錄帳戶和System.Security.Principal.WindowsIdentity.GetCurrent()的結果進行記錄.Name是經過身份驗證的會話
<identity impersonate="true"/>
<authentication mode="Windows">
<forms name="Login" loginUrl="Login.aspx" path="/" timeout="10"/>
</authentication>
<authorization>
<deny users="?"/>
<allow users="*"/>
</authorization>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.