<P><STRONG>问题:</STRONG></P> <P>访问网站首页时出错:</P> <FIELDSET style="BACKGROUND-COLOR: #ffffcc; COLOR: #fdfddf"> <P><STRONG><FONT color=#000000 size=5></FONT></STRONG> </P> <P><STRONG><FONT color=#000000 size=5>“/”应用程序中的服务器错误。</FONT></STRONG><BR><FONT color=#555555>--------------------------------------------------------------------------------</FONT></P> <P><FONT color=#000000 size=4><STRONG>未能加载文件或程序集“AjaxControlToolkit”或它的某一个依赖项。磁盘空间不足。 (异常来自 HRESULT:0x80070070)</STRONG></FONT> <BR><FONT color=#000000>说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 </FONT></P> <P><FONT color=#000000>异常详细信息: System.IO.FileLoadException: 未能加载文件或程序集“AjaxControlToolkit”或它的某一个依赖项。磁盘空间不足。 (异常来自 HRESULT:0x80070070)</FONT></P> <P><FONT color=#000000>源错误: </FONT></P> <P><FONT color=#000000>执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。 </FONT></P> <P><FONT color=#000000>程序集加载跟踪: 下列信息有助于确定程序集“AjaxControlToolkit”无法加载的原因。</FONT></P> <P><BR><FONT color=#000000>警告: 程序集绑定日志记录被关闭。<BR>要启用程序集绑定失败日志记录,请将注册表值 [HKLMSoftwareMicrosoftFusion!EnableLog] (DWORD)设置为 1。<BR>注意: 会有一些与程序集绑定失败日志记录关联的性能损失。<BR>要关闭此功能,请移除注册表值 [HKLMSoftwareMicrosoftFusion!EnableLog]。</FONT></P> <P><FONT color=#000000></FONT> </P> <P><FONT color=#000000><STRONG><FONT size=4>堆栈跟踪:</FONT></STRONG> </FONT></P> <P><BR><FONT color=#000000>[FileLoadException: 未能加载文件或程序集“AjaxControlToolkit”或它的某一个依赖项。磁盘空间不足。 (异常来自 HRESULT:0x80070070)]</FONT></P> <P><FONT color=#000000>[FileLoadException: 未能加载文件或程序集“AjaxControlToolkit, Version=1.0.10301.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e”或它的某一个依赖项。磁盘空间不足。 (异常来自 HRESULT:0x80070070)]<BR> System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0<BR> System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +43<BR> System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +127<BR> System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +142<BR> System.Reflection.Assembly.Load(String assemblyString) +28<BR> System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46</FONT></P> <P><FONT color=#000000>[ConfigurationErrorsException: 未能加载文件或程序集“AjaxControlToolkit, Version=1.0.10301.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e”或它的某一个依赖项。磁盘空间不足。 (异常来自 HRESULT:0x80070070)]<BR> ……</FONT></P> <P><BR><FONT color=#000000><FONT color=#888888>--------------------------------------------------------------------------------<BR></FONT>版本信息: Microsoft .NET Framework 版本:2.0.50727.3603; ASP.NET 版本:2.0.50727.3614 </FONT></P></FIELDSET> <P> </P> <P><FONT color=#ee1111><STRONG>解决问题思路:</STRONG></FONT>出现“磁盘空间”这样的提示,一般都是日志文件增长太快而把磁盘空间给占用了。</P> <P> </P> <P><FONT color=#ff0000><STRONG>解决问题的方法:</STRONG></FONT></P> <P>1、确保网站能正常运行,先把日志文件给清除。操作如下:</P> <P>(1)、打开IIS,右击网站>>“属性”,如图:</P> <P> <IMG onmousewheel="return bbimg(this)" border=0 src="$/History/tech/uploadfiles/help_UploadFiles_4256/201007/2010070515021539.jpg" width=797 onload=resizepic(this) height=454> </P> <P>(2)找出日志所在的位置,把无用的日志文件给清除,注:删除前做好备份!</P> <P> </P> <P>2、为了预防日志文件增太快而再次出现同样的问题,在这里,我们设置一下IIS的文件增加及把日志文件搬出C盘,同时修改IIS日志记录选项,只有这样才能让服务器更好的运行下去。操作如下图:</P> <P>(1)修改IIS的文件增加及把日志文件搬出C盘:</P> <P><IMG onmousewheel="return bbimg(this)" border=0 src="$/History/tech/uploadfiles/help_UploadFiles_4256/201007/2010070515190358.jpg" width=405 onload=resizepic(this) height=381> </P> <P>(2)设置IIS记录项(这里要根据自己的需求做记录,下图是默认选项):</P> <P><IMG onmousewheel="return bbimg(this)" border=0 src="$/History/tech/uploadfiles/help_UploadFiles_4256/201007/2010070515203225.jpg" width=404 onload=resizepic(this) height=379> </P> <P> </P>