[英]Synergy dbr.exe getting System.ServiceModel.FaultException during xcall
我們有一個Synergy應用程序,該應用程序使用Synergy的xcall函數來加載(COM interop?)程序集(ImageRetrieval.dll)並從中調用方法。
此特定方法調用是對在同一位置的另一台服務器上托管的DotNetNuke中運行的Web服務(ImageRetrievalService.asmx)的服務調用。
在更新Web服務之前,此調用工作正常,但是在更新項目以利用新的(在.net 4.0中)任務並行庫的過程中,我們將應用程序池從2.0 CLR更改為4.0 CLR。 我們還為Web應用程序修改了web.config,但是我們沒有刪除任何內容,我們僅在引用中的類型名稱之后添加了程序集名稱,並將preCondition =“ runtimeVersionv2.0”添加到了svc-Integrated處理程序中。
Synergy應用程序因以下的Watson Bucket問題簽名而破滅
Description:
Stopped working
Problem signature:
Problem Event Name: CLR20r3
Problem Signature 01: dbr.exe //EXE file name
Problem Signature 02: 9.5.1.3 //EXE file assembly version number
Problem Signature 03: 4e95fcb0 //EXE File Stamp
Problem Signature 04: System.ServiceModel //Faulting assembly version
Problem Signature 05: 4.0.0.0 //Faulting assembly version
Problem Signature 06: 5073e42b //Faulting assembly timestamp
Problem Signature 07: 575d //Faulting assembly method def
Problem Signature 08: 205 //Faulting method IL Offset within the faulting method
Problem Signature 09: System.ServiceModel.FaultException //Exception type
OS Version: 6.0.6002.2.2.0.272.7
Locale ID: 1033
使用ILDASM反編譯System.ServiceModel 4.0.0.0程序集並查找帶有簽名/ 0600575d的方法后,我能夠發現發生異常的是System.ServiceModel.Dispatcher.BufferedReceiveBinder.TryReceive方法。
public bool TryReceive(TimeSpan timeout, out RequestContext requestContext)
{
if (Interlocked.CompareExchange(ref this.pendingOperationSemaphore, 1, 0) == 0)
{
ActionItem.Schedule(tryReceive, this);
}
RequestContextWrapper wrapper;
bool success = this.inputQueue.Dequeue(timeout, out wrapper);
if (success && wrapper != null)
{
requestContext = wrapper.RequestContext;
}
else
{
requestContext = null;
}
return success;
}
我無法確定這是否發生在Synergy應用程序,ImageRetrieval.dll或ImageRetrievalService.asmx中,但聽起來它可能正在從ImageRetrieval.dll跳至ImageRetrievalService.asmx,但由於某種原因,它沒有不明白訊息嗎?
已反編譯的IL(我看不到與Problem Signature 08、205的偏移量匹配的IL偏移量)
.method /*0600575D*/ private hidebysig static
void TryReceive(object state) cil managed
{
// Code size 108 (0x6c)
.maxstack 3
.locals /*11000D10*/ init (class System.ServiceModel.Dispatcher.BufferedReceiveBinder/*02000912*/ V_0,
class System.ServiceModel.Channels.RequestContext/*0200009B*/ V_1,
bool V_2,
class [mscorlib/*23000001*/]System.Exception/*0100000A*/ V_3)
IL_0000: ldarg.0
IL_0001: castclass System.ServiceModel.Dispatcher.BufferedReceiveBinder/*02000912*/
IL_0006: stloc.0
IL_0007: ldc.i4.0
IL_0008: stloc.2
.try
{
.try
{
IL_0009: ldloc.0
IL_000a: ldfld class System.ServiceModel.Dispatcher.IChannelBinder/*020008F4*/ System.ServiceModel.Dispatcher.BufferedReceiveBinder/*02000912*/::channelBinder /* 04002C8D */
IL_000f: ldsfld valuetype [mscorlib/*23000001*/]System.TimeSpan/*01000002*/ [mscorlib/*23000001*/]System.TimeSpan/*01000002*/::MaxValue /* 0A000133 */
IL_0014: ldloca.s V_1
IL_0016: callvirt instance bool System.ServiceModel.Dispatcher.IChannelBinder/*020008F4*/::TryReceive(valuetype [mscorlib/*23000001*/]System.TimeSpan/*01000002*/,
class System.ServiceModel.Channels.RequestContext/*0200009B*/&) /* 060055CD */
IL_001b: brfalse.s IL_0030
IL_001d: ldloc.0
IL_001e: ldfld class [System.ServiceModel.Internals/*23000002*/]System.Runtime.InputQueue`1/*01000020*/<class System.ServiceModel.Dispatcher.BufferedReceiveBinder/*02000912*//RequestContextWrapper/*02000913*/> System.ServiceModel.Dispatcher.BufferedReceiveBinder/*02000912*/::inputQueue /* 04002C8E */
IL_0023: ldloc.1
IL_0024: newobj instance void System.ServiceModel.Dispatcher.BufferedReceiveBinder/*02000912*//RequestContextWrapper/*02000913*/::.ctor(class System.ServiceModel.Channels.RequestContext/*0200009B*/) /* 06005762 */
IL_0029: ldnull
IL_002a: callvirt instance bool class [System.ServiceModel.Internals/*23000002*/]System.Runtime.InputQueue`1/*01000020*/<class System.ServiceModel.Dispatcher.BufferedReceiveBinder/*02000912*//RequestContextWrapper/*02000913*/>/*1B00059B*/::EnqueueWithoutDispatch(!0,
class [mscorlib/*23000001*/]System.Action/*0100001D*/) /* 0A00203F */
IL_002f: stloc.2
IL_0030: leave.s IL_004d
} // end .try
catch [mscorlib/*23000001*/]System.Exception/*0100000A*/
{
IL_0032: stloc.3
IL_0033: ldloc.3
IL_0034: call bool [System.ServiceModel.Internals/*23000002*/]System.Runtime.Fx/*010000DA*/::IsFatal(class [mscorlib/*23000001*/]System.Exception/*0100000A*/) /* 0A0000CE */
IL_0039: brfalse.s IL_003d
IL_003b: rethrow
IL_003d: ldloc.0
IL_003e: ldfld class [System.ServiceModel.Internals/*23000002*/]System.Runtime.InputQueue`1/*01000020*/<class System.ServiceModel.Dispatcher.BufferedReceiveBinder/*02000912*//RequestContextWrapper/*02000913*/> System.ServiceModel.Dispatcher.BufferedReceiveBinder/*02000912*/::inputQueue /* 04002C8E */
IL_0043: ldloc.3
IL_0044: ldnull
IL_0045: callvirt instance bool class [System.ServiceModel.Internals/*23000002*/]System.Runtime.InputQueue`1/*01000020*/<class System.ServiceModel.Dispatcher.BufferedReceiveBinder/*02000912*//RequestContextWrapper/*02000913*/>/*1B00059B*/::EnqueueWithoutDispatch(class [mscorlib/*23000001*/]System.Exception/*0100000A*/,
class [mscorlib/*23000001*/]System.Action/*0100001D*/) /* 0A002040 */
IL_004a: stloc.2
IL_004b: leave.s IL_004d
} // end handler
IL_004d: leave.s IL_006b
} // end .try
finally
{
IL_004f: ldloc.0
IL_0050: ldflda int32 System.ServiceModel.Dispatcher.BufferedReceiveBinder/*02000912*/::pendingOperationSemaphore /* 04002C8F */
IL_0055: ldc.i4.0
IL_0056: call int32 [mscorlib/*23000001*/]System.Threading.Interlocked/*01000291*/::Exchange(int32&,
int32) /* 0A0009AE */
IL_005b: pop
IL_005c: ldloc.2
IL_005d: brfalse.s IL_006a
IL_005f: ldloc.0
IL_0060: ldfld class [System.ServiceModel.Internals/*23000002*/]System.Runtime.InputQueue`1/*01000020*/<class System.ServiceModel.Dispatcher.BufferedReceiveBinder/*02000912*//RequestContextWrapper/*02000913*/> System.ServiceModel.Dispatcher.BufferedReceiveBinder/*02000912*/::inputQueue /* 04002C8E */
IL_0065: callvirt instance void class [System.ServiceModel.Internals/*23000002*/]System.Runtime.InputQueue`1/*01000020*/<class System.ServiceModel.Dispatcher.BufferedReceiveBinder/*02000912*//RequestContextWrapper/*02000913*/>/*1B00059B*/::Dispatch() /* 0A002041 */
IL_006a: endfinally
} // end handler
IL_006b: ret
} // end of method BufferedReceiveBinder::TryReceive
編輯 :忘記添加事件查看器日志
Application: dbr.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ServiceModel.FaultException
Stack:
Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(System.Runtime.Remoting.Messaging.IMessage, System.Runtime.Remoting.Messaging.IMessage)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(System.Runtime.Remoting.Proxies.MessageData ByRef, Int32)
at ImageRetrievalLib.DataService.DataServiceSoap.RetrieveDocuments(ImageRetrievalLib.DataService.RetrieveDocumentsRequest)
at ImageRetrievalLib.DataService.DataServiceSoapClient.ImageRetrievalLib.DataService.DataServiceSoap.RetrieveDocuments(ImageRetrievalLib.DataService.RetrieveDocumentsRequest)
at ImageRetrievalLib.DataService.DataServiceSoapClient.RetrieveDocuments(Byte[], Byte[])
at ImageRetrievalLib.DocumentRetrieval.RetrieveDocuments(System.String, System.String, System.String, System.String)
at ImageRetrievalLib.ImageRetrieval.RetrieveDocuments(System.String, System.String, System.String, System.String)
最終這是由於在托管ImageRetrievalService.asmx的計算機上的IIS中為應用程序池設置的身份屬性設置不正確引起的。
Identity設置為ApplicationPoolIdentity,這顯然是一個臨時配置文件,因此,由於我們將應用程序池CLR從2.0更改為4.0,因此ASP.NET 4.0不允許臨時配置文件通過DSACryptoServiceProvider驗證該服務使用的身份。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.