com+:例外をスローする代わりにApplicationException
-
04-10-2019 - |
質問
com+コンポーネントを呼び出すasp.netウェブサービスを受け取りました。 com+コンポーネントのクラスは、私が処理したい例外をスローします。ただし、ApplicationExceptionは、実際の例外ではなくWebBserviceに巻き込まれます。
何故ですか?
編集:例外の詳細
System.ApplicationException: Error in the application.
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at System.EnterpriseServices.Thunk.Proxy.CoCreateObject(Type serverType, Boolean bQuerySCInfo, Boolean& bIsAnotherProcess, String& uri)
at System.EnterpriseServices.ServicedComponentProxyAttribute.CreateInstance(Type serverType)
at System.Runtime.Remoting.Activation.ActivationServices.IsCurrentContextOK(RuntimeType serverType, Object[] props, Boolean bNewObj)
at mywebbservice.Batplanering.Behorighet(String sprak) in D:\utv\Bat\Main4\Src\mywebbservice\planering.asmx.vb:line 3542
解決
ServicedComponentのコンストラクター内から例外がスローされている場合、ApplicationExceptionは実際の例外の代わりにスローされます。
私の理由を伝えることができる人に答えを授与します。
所属していません StackOverflow