問題を特定するために、誰かが私にいくつかの情報を提供してくれませんか。
これが私のプロセスです:
長い画像処理を行うアプリケーションがあり、単一ページの tiff ファイルから複数の複数ページの tiff ファイルを生成します。ファイルの区切りは、スキャンされた単一ページの tiff ファイルのバーコードです。
マルチページ tiff ファイルの名前は、バーコードと同じです。これらは、最初は一時作業フォルダーに保存されます。
一時作業フォルダー パスにある複数ページの tiff ファイルをそれぞれ調べ、バーコード (ファイル名) を抽出し、wcf サービスを呼び出してネットワーク パスを取得します。
複数ページの tiff ファイルをそれぞれのネットワーク パスに移動します。
私の問題は、呼び出しがGetNetworkPath(imageID)
ランダムに失敗することです。これがサービストレースです。これに関するヘルプは大歓迎です。
at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
at System.Environment.get_StackTrace()
at System.Diagnostics.TraceEventCache.get_Callstack()
at System.Diagnostics.XmlWriterTraceListener.WriteFooter(TraceEventCache eventCache)
at System.Diagnostics.XmlWriterTraceListener.TraceTransfer(TraceEventCache eventCache, String source, Int32 id, String message, Guid relatedActivityId)
at System.Diagnostics.TraceSource.TraceTransfer(Int32 id, String message, Guid relatedActivityId)
at System.Runtime.Diagnostics.DiagnosticTrace.TraceTransfer(Guid newId)
at System.ServiceModel.Diagnostics.ServiceModelActivity.TransferActivity.CreateActivity(Guid activityId, Boolean addTransfer)
at System.ServiceModel.Diagnostics.ServiceModelActivity.BoundOperationCore(ServiceModelActivity activity, Boolean addTransfer)
at System.ServiceModel.Diagnostics.ServiceModelActivity.BoundOperation(ServiceModelActivity activity, Boolean addTransfer)
at System.ServiceModel.Diagnostics.ServiceModelActivity.CreateBoundedActivity(Boolean suspendCurrent)
at System.ServiceModel.Diagnostics.ServiceModelActivity.CreateBoundedActivity()
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at LookupManagerServiceRef.ILookupManagerService.GetNetworkPath(Int32 _imageID)
at LookupManagerServiceRef.LookupManagerServiceClient.GetNetworkPath(Int32 _imageID) in C:\Code\Web References\LookupManagerServiceRef\Reference.cs:line 3250
at Forms.ImageHandler.GetNetworkPath(Int32 _imageID) in C:\Code\ImageHandler.cs:line 452
at Forms.ImageHandler.MoveImages(String _tmpFolderPath) in C:\Code\ImageHandler.cs:line 391
at Forms.ImageHandler.ProcessImages(String _sourceFolder, String _tmpFolder, IList`1 _prcBarcodes) in C:\Code\ImageHandler.cs:line 337
at Forms.ImageHandler.GenerateMultiPageTiffFiles(Int32 _scanBatchID) in C:\Code\ImageHandler.cs:line 58
at Forms.frmProcessScannedImages.btnProcessBatch_Click(Object sender, EventArgs e) in C:\Code\frmProcessScannedImages.cs:line 44
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(ApplicationContext context)
at Program.Main() in C:\Code\Program.cs:line 93
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)`enter code here`
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
サービスの状態を確認し、障害が発生した場合はサービスを開こうとしましたが、役に立ちませんでした。
LookupManagerServiceClient client = new LookupManagerServiceClient();
if (client.State.Equals(System.ServiceModel.CommunicationState.Faulted) ||
client.State.Equals(System.ServiceModel.CommunicationState.Closing) ||
client.State.Equals(System.ServiceModel.CommunicationState.Closed))
{
client = new LookupManagerServiceRef.LookupManagerServiceClient();
}
_result = client.GetNetworkPath(_imageID);