473,382 Members | 1,512 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Use the same code for DLL library and serviced component

Hi, i asked this question in the component services group but appears to
be dead, so i hope is ok to ask the question here,

Is possible to use the same DLL for a .net application and for COM+?.
I need the same code to be available for .Net (windows forms app) and
regular asp clients (asp 3.0),
my class inherits from ServicedComponent so I can register it for COM+
in the 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: Access denied.
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.
I also tried removing the servicedcomponent from my class and install it
in COM+ through the .tlb file (the DLL has the option "register for com"
enabled) but it wont install it.
It Appears the the only solution is to create two DLL, one for the
server and another for the .Net clients.
Thanks in advance.
Juan Zamudio
Jun 30 '07 #1
0 1159

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Patrick | last post by:
Following earlier discussions about invoking a .NET class library via ..NET-COM Interop (using regasm /tlb) at...
3
by: Robert | last post by:
We have several serviced components written in .NET 1.1. Using Visual Studio, we have an installer project that creates an installer for them. The components are installed properly into the GAC...
5
by: jason | last post by:
i have a c# class library that is being compiled with the "Register for COM Interop" flag set to "True." it compiles just fine. however, when i go into the Component Services administrative tool...
2
by: Stan | last post by:
I wasn't sure what would be the best ng to post it. We have ASP.NET app that uses serviced component to perform all database writes and updates (there are separate components sitting on the web...
9
by: Stan | last post by:
Here is my scenario: Web server ------------ Framework 1.1 Application proxy for the serviced component Component server ------------------- Framework 1.0
2
by: Ansari | last post by:
hi all, I want to use serviced component in ASP.NET any walkthrough or link to a resource. I have tried a lot but serviced component could be initialized in ASP.NET page. However I can...
4
by: Pete Wittig | last post by:
Hello, I am creating an app using Serviced Components and I am exposing them using the Enterprise Services SOAP service. Here is my problem: I have one COM+ application with several serviced...
0
by: =?Utf-8?B?QkY=?= | last post by:
I am trying to work on Serviced Component in .NET 2.0 environment. I don't see much information about serviced component in .NET 2.0 environment. I worked on serviced component 2 years ago with...
2
by: =?Utf-8?B?QkY=?= | last post by:
I am currently working on moving our business objects into COM+ serviced components. But in the process, there are too many changes such ComVisible and serviced component does not support...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.