Re: aspnet_wp.exe and COM+



"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.



.



Relevant Pages

  • Re: [PATCH 1/7] async: Asynchronous function calls to speed up kernel boot
    ... called within the caller's context. ... Hence this interface cannot be used to call might-sleep functions from ... will need to pass in the memory for the administration. ... If the callback function can sleep then the caller must be able to ...
    (Linux-Kernel)
  • Re: [UPDATE PATCH] push rounding up of relative request to schedule_timeout()
    ... >>sleeps probably need to use a different interface. ... > Adding 1 is easy enough for the caller and even easier to explain in the ... > instructions (i.e. this call sleeps for X jiffies edges). ... Lots of drivers basically do something like ...
    (Linux-Kernel)
  • Invalid callback object instance
    ... For asynchronous operations I use ... a callback interface to notify the application of completions. ... I receive as the first parameter (caller) is not valid. ...
    (microsoft.public.dotnet.framework.interop)
  • Re: [Lit.] Buffer overruns
    ... interface to getsays that it is the caller's responsibility to supply ... receive an exception if the index is out of bounds. ... You raised a concern that the caller might be "aborted". ... I do not know why you call it irresponsible programming. ...
    (sci.crypt)
  • Return collection interfaces or collection objects???
    ... appropriate interface of the object, ... Create sone specific collection instance, ... dependancy - the caller will be returned an object reference and will ... routine would need to provide (in our case, ...
    (microsoft.public.dotnet.languages.csharp)