Use the same code for DLL library and serviced component
Hi all, I'm wondering if is possible to use the same DLL for a .net
application and for COM.
I need the same code to be available for .Net and regular asp clients,
my class inherits from ServicedComponent so I can register it for COM+
in one server so the asp clients can call it, and added a reference to
the DLL in a .net application and call it directly, the problem is
that running the .Net client in another computer does not work the
exception is
System.UnauthorizedAccessException: Acceso denegado.
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(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(Type
serverType, Object[] props, Boolean bNewObj)
the code in the application is :
Dim obj As Cnbv.Sait.Encripta.AlgorithmSymmetric
Dim res As String
obj = New Cnbv.Sait.Encripta.AlgorithmSymmetric
res = obj.Cipher(Me.TextBox1.Text, "asdasd")
MessageBox.Show(res)
obj.Dispose()
Obviously the application is trying to call the COM+ instead of the
local DLL, i don't know if what i want is possible, or how to
accomplish it. thanks in advance.
Juan Zamudio
Date:Fri, 29 Jun 2007 23:58:30 -0000
Author:
|