D
DJ Miller
There's got to be an easier way to do this.
We are building a new web application in .Net that has ASP.Net pages that
call COM+ objects (written in VB.Net), which in turn call other COM+ objects
(VB.Net), which use ADO.Net to talk to a SQL Server. Many of the components
inherit a common interface. At least, that's our goal.
At the moment, everything is in one single solution. This makes things very
inconvenient, because when one developer wants to add a project (like a new
object), they must check out the solution file, which only they have access
to; and no other developer can add projects to the solution until that file
is checked back in.
The objects also don't seem to be able to call each other when in COM+. The
projects are set up for lazy registering (Inherits ServicedComponent) for
ease of debugging, except that the moment one object tries creating another,
the other does get registered into COM+ but the first claims it can't create
the second. (All objects are created with zero security, to run as the
"Interactive User", and on our dev boxes, that means local administrator.)
Also, stepping through the code won't step into code for objects in COM+.
We currently have the "Inherits ServicedComponent" line commented out, so
COM+ is not getting used. (Every object is strongly named by referencing a
common .snk file; does each object require its own .snk? From what I've
read, the answer is no, and I hope that's right, because there is already a
series of tedious steps for creating a new object. Also, every object has
EventTracking enabled.)
Also, it seems odd that, as I create an object that references another, I
have to set a reference to that other's project, and the "Copy Local"
property must be set to True. Thus, when I build my project, I notice that
my BaseData component's dll file exists in its bin folder, the bin folder of
all objects that call it, the bin folder of all objects that call those
objects, and so forth. While I suppose it might make some sense in the
non-COM+ world (which I suppose is where I am now), why is this required
even when COM+ is used? (If I try setting that to False when referencing my
"entry" COM+ component, I get errors trying to create it.) Is it because I
haven't figured out how to get COM+ working correctly (previous paragraph)?
Speaking of COM+ problems, I can't create a constructor method to use
construction strings. If I "Enable object construction", I get an error
that no constructor method was found. Examples I found say one must
overload the public method Construct(or?), but I get an error in the IDE
saying the Construct method is Protected, not Public.
Also, is there a way to segregate the objects somewhat? Right now, if I
make a change to an object three levels deep, even if the interface doesn't
change, the IDE recompiles that object and all objects that call it. Why is
that even necessary? Isn't one of the primary points of COM that one can
simply replace a single component without having to re-distribute the entire
app?
This is just a quick summary of the more immediate concerns we've had
developing in .Net. We haven't even gotten to the step of deploying this
thing on a common web server for testing, which I'm sure will have its own
set of questions.
Where can I get answers to these questions? This is really rather painful,
even if the actual coding part of it isn't.
We are building a new web application in .Net that has ASP.Net pages that
call COM+ objects (written in VB.Net), which in turn call other COM+ objects
(VB.Net), which use ADO.Net to talk to a SQL Server. Many of the components
inherit a common interface. At least, that's our goal.
At the moment, everything is in one single solution. This makes things very
inconvenient, because when one developer wants to add a project (like a new
object), they must check out the solution file, which only they have access
to; and no other developer can add projects to the solution until that file
is checked back in.
The objects also don't seem to be able to call each other when in COM+. The
projects are set up for lazy registering (Inherits ServicedComponent) for
ease of debugging, except that the moment one object tries creating another,
the other does get registered into COM+ but the first claims it can't create
the second. (All objects are created with zero security, to run as the
"Interactive User", and on our dev boxes, that means local administrator.)
Also, stepping through the code won't step into code for objects in COM+.
We currently have the "Inherits ServicedComponent" line commented out, so
COM+ is not getting used. (Every object is strongly named by referencing a
common .snk file; does each object require its own .snk? From what I've
read, the answer is no, and I hope that's right, because there is already a
series of tedious steps for creating a new object. Also, every object has
EventTracking enabled.)
Also, it seems odd that, as I create an object that references another, I
have to set a reference to that other's project, and the "Copy Local"
property must be set to True. Thus, when I build my project, I notice that
my BaseData component's dll file exists in its bin folder, the bin folder of
all objects that call it, the bin folder of all objects that call those
objects, and so forth. While I suppose it might make some sense in the
non-COM+ world (which I suppose is where I am now), why is this required
even when COM+ is used? (If I try setting that to False when referencing my
"entry" COM+ component, I get errors trying to create it.) Is it because I
haven't figured out how to get COM+ working correctly (previous paragraph)?
Speaking of COM+ problems, I can't create a constructor method to use
construction strings. If I "Enable object construction", I get an error
that no constructor method was found. Examples I found say one must
overload the public method Construct(or?), but I get an error in the IDE
saying the Construct method is Protected, not Public.
Also, is there a way to segregate the objects somewhat? Right now, if I
make a change to an object three levels deep, even if the interface doesn't
change, the IDE recompiles that object and all objects that call it. Why is
that even necessary? Isn't one of the primary points of COM that one can
simply replace a single component without having to re-distribute the entire
app?
This is just a quick summary of the more immediate concerns we've had
developing in .Net. We haven't even gotten to the step of deploying this
thing on a common web server for testing, which I'm sure will have its own
set of questions.
Where can I get answers to these questions? This is really rather painful,
even if the actual coding part of it isn't.