Frage

Ich habe eine ASP.net WebService, die eine COM + -Komponente aufruft. Eine Klasse in der COM + Komponente löst eine Ausnahme, die ich behandeln möchten. Aber Application wird durch die webbservice anstelle der echten Ausnahme abgefangen.

Warum?

Edit: Ausnahmedetails

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
War es hilfreich?

Lösung

Application wird anstelle der realen Ausnahme ausgelöst, wenn die Ausnahme von im Konstruktor des ServicedComponent geworfen wird.

Ich werde vergeben, die Antwort auf alle, die meinen, warum sagen kann.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top