[英]Web App works on localhost but fails on remote connection
我們正在部署一個新的ASP.NET Web應用程序,它使用我們還構建的單獨的DLL,它反過來詢問Active Directory以獲取簡單的用戶和組成員身份信息。 該服務器是Windows Server 2003。
如果我RDP到服務器並在localhost下瀏覽它 ,應用程序工作正常 。
當我從一台單獨的PC瀏覽時 ,應用程序拋出以下錯誤 。 如果我從服務器上的RDP會話瀏覽它,它也會拋出相同的錯誤,但在服務器名稱下瀏覽它。
這是代碼訪問安全問題嗎? 其他想法?
異常詳細信息: System.Runtime.InteropServices.COMException:發生操作錯誤。
源錯誤:在執行當前Web請求期間生成了未處理的異常。 可以使用下面的異常堆棧跟蹤來識別有關異常的起源和位置的信息。
堆棧跟蹤: [COMException(0x80072020):發生操作錯誤。 ]
System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail) +420085
System.DirectoryServices.DirectoryEntry.Bind() +36
System.DirectoryServices.DirectoryEntry.get_Name() +32
USM.UsmAD.get_DomainName() in C:\DevWork\Repo_CP\UnifiedSecurity\BRANCHES\LoginVsGUID\Applications\Active Directory Search\USMAD\USMAD\UsmAD.cs:60
USM.UsmAD.Get_UserGroupNames(String username) in C:\DevWork\Repo_CP\UnifiedSecurity\BRANCHES\LoginVsGUID\Applications\Active Directory Search\USMAD\USMAD\UsmAD.cs:190
AdminWeb.CheckAccessDAL.GetGroupNames() in C:\DevWork\Repo_CP\UnifiedSecurity\BRANCHES\LoginVsGUID\Applications\AdminWeb\USMDAL\CheckAccessDAL.cs:28
AdminWeb.CheckAccessDAL.SetMenuAccess(Menu mnuUSMAdmin) in C:\DevWork\Repo_CP\UnifiedSecurity\BRANCHES\LoginVsGUID\Applications\AdminWeb\USMDAL\CheckAccessDAL.cs:89
AdminWeb.SiteMaster.TrimMainMenus() in C:\DevWork\Repo_CP\UnifiedSecurity\BRANCHES\LoginVsGUID\Applications\AdminWeb\AdminWeb\Site.Master.cs:50
AdminWeb.SiteMaster.Page_Load(Object sender, EventArgs e) in C:\DevWork\Repo_CP\UnifiedSecurity\BRANCHES\LoginVsGUID\Applications\AdminWeb\AdminWeb\Site.Master.cs:17
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +91
System.Web.UI.Control.LoadRecursive() +74
System.Web.UI.Control.LoadRecursive() +146
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207
您可能需要在域級別標識下運行您的應用程序池,該標識有權訪問與Active Directory
所需的資源。
如果您需要在運行時執行此操作,請參閱以下文章:
我還鼓勵您實現UnhandledException
處理程序來記錄這些運行時錯誤。
聽起來像dll上的燙發問題
嘗試允許IUSR訪問此文件....
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.