我使用asp.net中的图表控件制作了一个网站。当负载用户越来越大时,日志中会出现错误。错误细节是这样的,如何解决这个问题。
异常详细信息:引发了“System.Web.HttpException”类型的异常。在 System.Web.UI.Page.AsyncPageEndProcessRequest(IAsyncResult result) 在 ASP.city_aspx.EndProcessRequest(IAsyncResult ar) 在 c:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\Temporary
ASP.NET Files\root\f4f3c9d4\d7501188\App_Web_3mnuhygo.2.cs:System.Web.HttpApplication.CallHandlerExecutionStep.OnAsyncHandlerCompletion(IAsyncResult ar) System.Web.HttpUnhandledException (0x80004005) 的第 0 行:“System.Web”类型的异常。抛出了 HttpUnhandledException'。--->
System.IO.IOException:进程无法访问文件 'D:\MeeToo\Deploy\Website\tempimg\60101037.png',因为它正在
被另一个进程使用。在 System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32
bufferSize, FileOptions 选项, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options,
String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode) at System.Web.UI.DataVisualization.Charting.Chart.SaveImage(String imageFileName) at System.Web.UI.DataVisualization.Charting .Chart.Render(HtmlTextWriter writer) 在 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) 在 System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) 在 System.Web.UI.Control。 RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) at ASP.control_locationinfo_ascx._ Render _control1(HtmlTextWriter __w, Control parameterContainer) in d:\MeeToo\Deploy
\Website\control\LocationInfo.ascx:System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer,ICollection children)处 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer,ICollection children)的第 14 行。 UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Page.Render(HtmlTextWriter writer) at System.Web.UI.Page .ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest (布尔包括StagesBeforeAsyncPoint,System.Web.UI.Page.PageAsyncInfo.CallHandlersPossiblyUnderLock 处的布尔 includeStagesAfterAsyncPoint)(布尔 onPageThread)