HighTechTalks DotNet Forums  

Use the same code for DLL library and serviced component

Dotnet Framework (Component Services) microsoft.public.dotnet.framework.component_services


Discuss Use the same code for DLL library and serviced component in the Dotnet Framework (Component Services) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
jmzl666
 
Posts: n/a

Default Use the same code for DLL library and serviced component - 06-29-2007 , 06:58 PM






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.ThrowExcept ionForHR(Int32
errorCode, IntPtr errorInfo)
at System.EnterpriseServices.Thunk.Proxy.CoCreateObje ct(Type
serverType, Boolean bQuerySCInfo, Boolean& bIsAnotherProcess, String&
uri)
at
System.EnterpriseServices.ServicedComponentProxyAt tribute.CreateInstance(Type
serverType)
at
System.Runtime.Remoting.Activation.ActivationServi ces.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


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.