为什么:System.IO.FileLoadException: Access is denied

pray1997 2004-03-08 01:27:45
我做的一个Web站点,在本地机器上测试时没有任何问题,但是当我把它放到web服务器上时,页面就会出错,出现以下提示:
==============================================
Access is denied: 'CommonGlobal.CommonUtility'.
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: Access is denied: 'CommonGlobal.CommonUtility'.

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 'CommonGlobal.CommonUtility' could not be loaded.


=== Pre-bind state information ===
LOG: DisplayName = CommonGlobal.CommonUtility, Version=1.0.1528.20259, Culture=neutral, PublicKeyToken=35a3f5a78c29cae6
(Fully-specified)
LOG: Appbase = file:///E:/web/safa/DCenter
LOG: Initial PrivatePath = bin
Calling assembly : DCenter.Web, Version=1.0.1528.22535, Culture=neutral, PublicKeyToken=null.
===

LOG: Attempting download of new URL file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/dcenter/f47a8152/51b7ca04/CommonGlobal.CommonUtility.DLL.
LOG: Attempting download of new URL file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/dcenter/f47a8152/51b7ca04/CommonGlobal.CommonUtility/CommonGlobal.CommonUtility.DLL.
LOG: Attempting download of new URL file:///E:/web/safa/DCenter/bin/CommonGlobal.CommonUtility.DLL.

================================================
我在项目中引用了一个CommonGlobal.CommonUtility.dll,其中定义了几个静态函数而已。出错后我在本地重新编译了一遍,上船覆盖后显示正常,但当我改变web.config之后,这个错误又出现了。之后试过几次,发现只要重新编译一次就正常,可是一旦改变了web.config文件,就又会出现这种错误了。

请问这是什么问题?
...全文
374 15 打赏 收藏 转发到动态 举报
写回复
用AI写文章
15 条回复
切换为时间正序
请发表友善的回复…
发表回复

62,046

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧