I'm trying to instaniate my own COM+ component (running as a library application) without success.
All I get is a NotImplementedException when I try to create it
dim myComponent As New MyComponent()
The stack trace is not of much help:
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 MyApp.MyMethod() in D:\blabla\MyService.asmx.vb:line 66 (this line have been modified by me)
The COM+ component is compiled for "AnyCPU" and the webbservice is running x64 inside ASP.Net 4 Application pool.
HRResult: -2147467263
I had not removed the old .tlb files (for a previous version). Removing them helped.