我在尝试打开该网站时遇到错误。它在 Visual Studio 中运行良好,在本地发布时也运行良好,但在 Azure Devops 中构建时出现此错误:Server Error in '/' Application.Could not load file or assembly 'file:///D:\home\site\wwwroot\bin\App_Web_orhmujnn.dll' or one of its dependencies. Access is denied.这是堆栈跟踪:[FileLoadException: Could not load file or assembly 'file:///D:\home\site\wwwroot\bin\App_Web_orhmujnn.dll' or one of its dependencies. Access is denied.] System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0 System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +36 System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +152 System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark) +102 System.Reflection.Assembly.LoadFrom(String assemblyFile) +34 WebActivatorEx.ActivationManager.get_Assemblies() +187 WebActivatorEx.ActivationManager.RunActivationMethods(Boolean designerMode) +97 WebActivatorEx.ActivationManager.RunPreStartMethods(Boolean designerMode) +36 WebActivatorEx.ActivationManager.Run() +75在页面上执行 Ctrl + F5 有时会返回不同的 dll,但大部分错误没有改变我已经检查了 Azure Devops 构建设置并与之前工作的构建相匹配。Web 配置和 csproj 也与之前的工作版本匹配。我还在我以外的电脑上检查了该网站,也出现了同样的错误
- 1 回答
- 0 关注
- 146 浏览
添加回答
举报
0/150
提交
取消