2012-03-19 6 views
0

asp.netのチャートコントロールを使用してウェブサイトを作成します。負荷ユーザーが大きくなると、ログにエラーが発生します。エラーの詳細は、これを解決する方法です。このエラーに直面しているasp.netのチャートを使用しています "プロセスはファイルにアクセスできません...."

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

ASP.NETファイル\ルート\ f4f3c9d4 \ d7501188 \ App_Web_3mnuhygo.2.cs:種類の例外「System.Web.HttpUnhandledException:System.Web.HttpApplication.CallHandlerExecutionStep.OnAsyncHandlerCompletion(たIAsyncResultのAR) System.Web.HttpUnhandledException(0x80004005が)のライン0 '投げられた。 --->

System.IO.IOException:プロセスはファイルにアクセスできません 'D:\ MeeToo \展開\サイト\ tempimg \ 60101037.png' は別のプロセスで使用

をされているため。 System.IO .__ Error.WinIOError(のInt32 errorCodeを、文字列maybeFullPath)System.IO.FileStream.Initで (文字列のパス、にFileModeモード、FileAccessのアクセス、のInt32権、ブールuseRights、ファイル共有の共有、のInt32

がbufferSizeで 、FileOptionsはオプション、SECURITY_ATTRIBUTES secAttrs、文字列MSGPATH、ブールbFromProxy、ブールuseLongPath)System.IO.FileStream..ctor(文字列のパス、にFileModeモード、FileAccessのアクセス、ファイル共有の共有、のInt32あるbufferSize、FileOptionsはオプション、

文字列で msgPath、ブール値bFromProxy)System.Web.UI.DataVisualization.Charting.Chの にSystem.IO.FileStream..ctor(文字列パス、FileModeモード)の system.Web.UI.DataVisualization.Charting.Chart.Render(HtmlTextWriterライター) でart.SaveImage(String imageFileName)System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriterライター、ICollectionの子要素) System.Webで を描画します。 System.Web.UI.HtmlControls.HtmlContainerControl.RenderでUI.HtmlControls.HtmlContainerControl.Render System.Web.UI.Control.RenderChildrenInternalで(たHtmlTextWriterライター) (たHtmlTextWriterライター、ICollectionを子供) (たHtmlTextWriterライター)ASPで 。 control_locationinfo_ascx._ _control1(たHtmlTextWriter __w、コントロールparameterContainer)(d)にレンダリング:\ MeeToo \展開

\ Webサイト\制御\ LocationInfo.ascx:ライン14を(HtmlTextWriterライター、ICollection子) System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriterライター、ICollectionの子要素) System.Web.UI.Control.HtmlContainerControl.Renderで HtmlTextWriterライター) System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriterライター、ICollectionの子要素) System.Web.UI.Page.Render(HtmlTextWriterライター) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint 、Boolean includeStagesAfterAsyncPoint)System.Web.UI.Page.HandleError(例外e)の System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint、Boolean includeStagesAfterAsyncPoint)の System.Web.UIの にあります。 Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint、Boolean includeStagesAfterAsyncPoint) (System.Web.UI.Page.PageAsyncInfo)CallHandlersPossiblyUnderLock(ブールonPageThread)

+0

こんにちは、あなたはこの問題は解決したのですか? – msigman

答えて

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)

+0

私は問題は、他のIIS/.NETプロセスがファイルにアクセスしていることだと思います。 – msigman

0

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

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

The process cannot access the file error with System.Web.UI.DataVisualization.Charting

関連する問題