Re: BizTalk Orchestration and Generic Principal
- From: "Tomas Restrepo \(MVP\)" <tomasr@xxxxxxxx>
- Date: Wed, 27 Jul 2021 17:41:13 -0500
Anthony,
> We use a set of .Net assemblies to provide us with logging and monitoring
> capabilities. The logging works by calling a method which uses the
> current
> thread WindowsPrincipal to log information about the user. This all works
> fine when we are running our own assemblies under iis (we have a
> httpmodule
> that assigns these details to the thread that iis creates).
>
> Is it possible to do something similar when running bts orchs i.e. assign
> the generic princiapl to the current thread thereby alowing our logging
> assembly
> to see it and log details?
>
> I have a trusted iosolated host receiving SOAP messages and the windows
> user
> information is passed into the message box in the message box.
You might be able to do it, but it would likely have to be done very
carefully. The main problem here is that orchestrations don't run beginning
to end in the same thread, so you certainly can't create the principal and
attach it to the thread at the start of the orchestration and just hope it
is always there (except in very particular scenarios like on a fully atomic
transaction or something).
The second problem is that we really have no information on the
implementation details of the orchestration engine; thus, we can't reliably
tell whether the engine itself might use the thread's principal for any
particular task, and whether it might get confused if you change it.
My only suggestion here would be to use a GenericPrincipal you instantiate
from the SOAP.UserName property, and just try to minimize the time it is
attached to the thread. For example, when calling the external components
temporarily attach your custom principal to the thread at the start of the
Expression shape, call your component, and then immediately restore the
original principal before exiting the expression shape. And, test this *a
lot* to ensure no problems occur.
--
Tomas Restrepo
tomasr@xxxxxxxx
http://www.winterdom.com/
.
- References:
- BizTalk Orchestration and Generic Principal
- From: Wor Tony
- BizTalk Orchestration and Generic Principal
- Prev by Date: Server didnt recognize HTTP Header SoapAction.
- Next by Date: Re: Server didnt recognize HTTP Header SoapAction.
- Previous by thread: BizTalk Orchestration and Generic Principal
- Next by thread: Thanks for your patiente. SOAP Error with the WS publishing wizard
- Index(es):
Relevant Pages
|