gpt4 book ai didi

asp.net - 无法加载文件或程序集或其依赖项之一。访问被拒绝。该问题是随机的,但发生一次后,它会继续存在

转载 作者:行者123 更新时间:2023-12-02 07:13:41 24 4
gpt4 key购买 nike

我发现了大量有关此错误的信息:“错误:无法加载文件或程序集“*.dll”或其依赖项之一。访问被拒绝。但我还没有找到适合我的场景的答案。我的网站部署在 6 台不同的生产服务器上,只有一台服务器上我面临这个问题。这个问题是随机的,但发生一次后,它会一直持续到通过在 web.config 文件中进行小修改重新编译网站(我知道技巧,在 web.config 修改后重新编译 Web 应用程序)并且该服务器上的网站启动在职的。昨天,工作一个月后问题重现。我们无法在生产中承担这个问题。
问题详情:

Server Error in '/' Application. ____________________________________ Could not load file or assembly 'MainCore.DbImpl, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Access is denied. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileLoadException: Could not load file or assembly 'MainCore.DbImpl, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Access is denied.

Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Assembly Load Trace: The following information can be helpful to determine why the assembly 'MainCore.DbImpl, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' could not be loaded.

WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Stack Trace:

[FileLoadException: Could not load file or assembly 'MainCore.DbImpl, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Access is denied.] ...DbImpl.Event.TTCEventController.GetEventFields(Int32 eventId) +0 WebSuite.SportChannel.ModelImpl.TTCModelController.AddEventFieldList(XmlElement eventNode, ITTCEventController ctrl, Int32 eventId, PlayerType stupidType) in ...root\SportChannel\ModelImpl\Ttc\TTCModelController.cs:171 ...ModelImpl.TTCModelController.GetLatestFourTourSchedulesXml() in ...root\SportChannel\ModelImpl\Ttc\TTCModelController.cs:283 ...WebRoot.UserControls.HeadlinesTab.Page_Load(Object sender, EventArgs e) +491 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +42 System.EventHandler.Invoke(Object sender, EventArgs e) +0 System.Web.UI.Control.OnLoad(EventArgs e) +132 System.Web.UI.Control.LoadRecursive() +66 System.Web.UI.Control.LoadRecursive() +191 System.Web.UI.Control.LoadRecursive() +191 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428
____________________________________

Version Information: Microsoft .NET Framework Version:2.0.50727.5446; ASP.NET Version:2.0.50727.5420

最佳答案

对于我的场景,我发现 web.config 文件中有一个身份节点。

<identity impersonate="true" userName="blah" password="blah">

当我从节点中删除用户名和密码参数时,它开始工作。

另一个选择可能是您需要确保指定的用户名有权访问在各个 C:\Windows\Microsoft.NET\Framework{version} 文件夹中找到的“临时 ASP.NET 文件”文件夹。

希望这对其他人有帮助!

关于asp.net - 无法加载文件或程序集或其依赖项之一。访问被拒绝。该问题是随机的,但发生一次后,它会继续存在,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11096225/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com