0

我有一个调用 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
4

1 回答 1

0

如果异常是从 ServicedComponent 的构造函数中抛出的,则抛出 ApplicationException 而不是真正的异常。

我会把答案奖励给任何能告诉我原因的人。

于 2010-09-23T13:25:59.503 回答