Re: aspnet_wp.exe and COM+
- From: "Willy Denoyette [MVP]" <willy.denoyette@xxxxxxxxxx>
- Date: Wed, 10 Jan 2007 18:34:47 +0100
"MP" <mmahangare@xxxxxxxxx> wrote in message news:1168435893.069246.228060@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,
1) We call this method from Asp.net in the folowing manner.
This is the Save method inside our business object that calls the
previously posted code:
public void Save() {
using(TransactionScope scope = new TransactionScope()) {
using(SqlConnection cn = new
SqlConnection(DatabaseConnection.MyConnection)) {
cn.Open();
if(this.IsDeleted) {
//do db delete work
}
else {
if(this.IsNew) {
//do db insert work
}
else {
//do db update work
}
if(this.IsNew) {
mEventId =
(int)cm.Parameters["@eventId"].Value; //if this was an insert get the
id
bool isFolderCreated =
EmailFolderCreator.CreateEventEmailFolder(mEventId);
if(isFolderCreated == false) {
throw new
BusinessLayerException(ResourceStrings.GetResourceString("EmailFolderNotCreated"));
}
}
}
}
scope.Complete();
}
}
2) For releasing the interface i am not sure what you mean by, Can
please clear a bit more on this point. I believe right now we are not
releasing the interface.
3) I belive this is a server application. For more details you can
refer to following links http://www.15seconds.com/issue/030930.htm
Oh I see, you are using COM+ services without Components, a COM+ 1.5 feature which allows you to get (some) COM+ services without deriving from ComponentServices. Such components do run "in-process", that means they run in the security context of the caller, so here the caller is allowed to call LogonUser() (which I suppose you do in your Impersonate method) and the CreateEventEmailFolder Method doesn't need distributed transaction services either. I suggest you to drop this ServiceDomain completely and make it a simple "regular" method that only impersonates in order to create/delete a folder.
Willy.
.
- References:
- aspnet_wp.exe and COM+
- From: MP
- Re: aspnet_wp.exe and COM+
- From: Willy Denoyette [MVP]
- Re: aspnet_wp.exe and COM+
- From: MP
- aspnet_wp.exe and COM+
- Prev by Date: Re: making a generic data access class wrapper for underlying classes
- Next by Date: Re: Static methods slower?
- Previous by thread: Re: aspnet_wp.exe and COM+
- Next by thread: Trying To Load A Child Form From a Child Form
- Index(es):
Relevant Pages
|