0

asp.net のチャート コントロールを使用して Web サイトを作成します。負荷ユーザーが大きくなると、ログにエラーが発生します。エラーの詳細はこのようになっています。

例外の詳細: タイプ 'System.Web.HttpException' の例外がスローされました。c:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\Temporary の ASP.city_aspx.EndProcessRequest(IAsyncResult ar) で System.Web.UI.Page.AsyncPageEndProcessRequest(IAsyncResult 結果) で

ASP.NET Files\root\f4f3c9d4\d7501188\App_Web_3mnuhygo.2.cs: System.Web.HttpApplication.CallHandlerExecutionStep.OnAsyncHandlerCompletion(IAsyncResult ar) の行 0 System.Web.HttpUnhandledException (0x80004005): 'System.Web. HttpUnhandledException' がスローされました。--->

System.IO.IOException: プロセスはファイル 'D:\MeeToo\Deploy\Website\tempimg\60101037.png' にアクセスできません。

別のプロセスによって使用されます。System.IO.__Error.WinIOError (Int32 errorCode、文字列の多分フルパス) で System.IO.FileStream.Init (文字列パス、FileMode モード、FileAccess アクセス、Int32 権限、ブール値の useRights、FileShare 共有、Int32

bufferSize、FileOptions オプション、SECURITY_ATTRIBUTES secAttrs、String msgPath、Boolean bFromProxy、Boolean useLongPath) を System.IO.FileStream..ctor (String パス、FileMode モード、FileAccess アクセス、FileShare 共有、Int32 bufferSize、FileOptions オプション、

System.Web.UI.DataVisualization.Charting.Chart.SaveImage(String imageFileName) の System.IO.FileStream..ctor(String パス、FileMode モード) の String msgPath、Boolean bFromProxy) System.Web.UI.DataVisualization.Charting のSystem.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter ライター、ICollection の子) の .Chart.Render(HtmlTextWriter ライター) System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter ライター) の 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 ライター、ICollection の子) の 14 行目 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter ライター、ICollection の子)、System.Web で。 UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter ライター) の System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter ライター、ICollection の子) System.Web.UI.Page.Render(HtmlTextWriter ライター) の System.Web.UI.Page .ProcessRequestMain (ブール値の includeStagesBeforeAsyncPoint、ブール値の includeStagesAfterAsyncPoint) の System.Web.UI.Page.HandleError(Exception e) の System.Web.UI.Page.ProcessRequestMain (ブール値の includeStagesBeforeAsyncPoint、ブール値の includeStagesAfterAsyncPoint) の System.Web.UI.Page.ProcessRequest (ブール値 includeStagesBeforeAsyncPoint、System.Web.UI.Page.PageAsyncInfo.CallHandlersPossivelyUnderLock(Boolean onPageThread) のブール値 includeStagesAfterAsyncPoint)

4

2 に答える 2

0

これは他の数人にも起こったようです。彼らは、ファイルに一意の名前を付け、古いファイルを消去するコードを追加することで、この問題を修正しました。もちろん、新しいファイルは決してロックされないからです。

<asp:Chart ImageType="Png" runat="server" ID="chartStatComp" Palette="BrightPastel"
ImageLocation="~/CRM/Reports/chartStatComp_#SEQ(100,10)" ImageStorageMode="UseImageLocation"
Width="620" Height="300">

プロセスは System.Web.UI.DataVisualization.Charting でファイル エラーにアクセスできません

于 2012-03-19T02:40:49.947 に答える
0
System.IO.IOException: The process cannot access the file   
'D:\MeeToo\Deploy\Website\tempimg\60101037.png' 
because it is being used by another process.

上記のメッセージは、何が原因かを示しています。it is being used by another process.別のプロセスがこのファイル(60101037.png)にアクセスしないようにする必要があります。

于 2012-03-19T02:19:34.520 に答える