DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Fri, 29 Jun 2007 23:58:30 -0000,    posted on: microsoft.public.dotnet.framework.component_services        back       

Thread Index
  1    jmzl666


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:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us