We've got a lot of COM+ objects that were developed in VB and which can be happily 
called from C# assemblies outside of COM+. I've got a problem where an exception is 
thrown indicating that a method cannot be found. The IL shows that the method is to be 
called, and I've confirmed that the method exists in the COM+ package. All GUIDs look 
ok (ie, Component Services listings match what I see through OleView). Following is 
the beginning of the IL for the C# method (SaveModelOptions) that makes a call on the 
COM+ object db_Models.ModelsClass's GetModelInfo method.

.method public hidebysig instance void  SaveModelOptions() cil managed
{
  // Code size       187 (0xbb)
  .maxstack  5
  .locals init ([0] class [Interop.db_Models]db_Models.ModelsClass oModels,
           [1] class [ADODB]ADODB.Recordset rsModel,

Does anyone have any ideas?

Thanks,
 Bob

-----Original Message-----
From: Chad Yost [mailto:cyost@;CHARTER.NET] 
Sent: Wednesday, October 02, 2002 11:07 AM
To: [EMAIL PROTECTED]
Subject: [ADVANCED-DOTNET]


Before I ask my questions, here is a little background on
our application.

We have a large Web Application written in VBScript that
talk to a COM based middle tier that communicates with
(non-SQL) legacy data.  One of the requirements of the
middle tier is that when a user logs on to the system, a
new process needs to be started.  This process is where
all the COM objects reside.

This is accomplished by creating an LOCAL_SERVER object
(webstate) that resides in the EXE and is marked with REGCLS_SINGLEUSE (causing a new 
EXE to be created whenever the object is instantiated).  This webstate object has 
methods to create other objects via progid (as Server.CreateObject does).  This is all 
necessary because the company I work for would loses large amounts of revenue when a 
user is dropped from the system, and we don't want one user who did something that 
caused our code to crash to effect another user on the system.

We are also not using the state management built into ASP, since we need custom 
functionality that it does not support.


Now we are in the process of porting portions of the COM
middle tier to C#, and portions of the ASP to ASP.NET with
C# and need to allow this requirement to continue...

1) Is there a way to create a .NET object remotely that
will start a new AppDomain in a new Process, create the
object in that process, and create the proxy (as in the REGCLS_SINGLEUSE attribute for 
local com servers)?  I have tried to remove the requirement of a separate process by 
trying to explain AppDomains, but to no avail.

2) If not, can we get the Default AppDomain from a
process?  I can easily create a new process using the System.Diagnostics.Process 
class, have the process Bind with the CLR to create an AppDomain, but how do I get 
either get the remote AppDomain in ASP.NET, or create an object in the Default 
AppDomain of the newly created process...

3) Is there, without removing this requirement, to do the
same thing.  Reminder, this info is per *user*, not per
*request* or per *web application* and therefore things
like IIS process isolation, Web Gardens, etc. don't fit
the bill.


Thanks in advance

Chad Yost

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to