Hello Roland,
U mean that the same code works different in the separate webSites?
RM> Situation has changed a bit; this problem does only occur for one
RM> website:
RM> RM> There are 2 websites (lets say "A" and "B") based on the same code
RM> of a
RM> project just with other custominzing etc.
RM> Both .net framework 2.0!
RM> I deploy the code to the same server but the code exists in 2
RM> seperate directories and 2 IIS webs. So far so good.
RM> RM> There is a client component that loads data asynchronly from a
RM> webservic
RM> e on that server, with SSL encrypted!
RM> After the asynchon callback another method uses
RM> Thread.CurrentPrincipal
RM> to check some roles. (The roles are set after the user logged in to
RM> the
RM> client component).
RM> The problem now is: consuming the webservices in "A" works fine and
RM> the
RM> check for the roles in Thread.CurrentPrincipal works also in the
RM> callback of an asynchron method.
RM> But not with "B"! There the roles are emtpy and i don't know why.
RM> I have checked nearly everything (web.config, filesystem, iis config
RM> etc) but i cannot find a difference.
RM> My question on you is: what can cause that the roles are empty/not
RM> transmitted during an asynchon method call? Can this be a thing in
RM> IIS? Or even a bug in framework? Or some issue with SSL?
RM> RM> Michael Nemtsev schrieb:
RM>
Hello Jon Skeet [C# MVP],
I had the same thoughs, but being experimenting a bit with new thread
and async calls found nothing strange.
Roland need to give more extending source code to determin the reason
J>
Thus why code below works fine? Threads are different, but
Principal is the same
J> <snip>
J> J> Hmm. I have no idea. I suspected that the principal was copied
for
J> newly created threads, but it appears to work for
QueueUserWorkItem
J> too. Maybe it's okay for *some* kinds of callbacks, but not all.
(For
J> instance, does it work with Socket.BeginAccept? No idea.)
J> J> There must be *something* copying the principal though... I
believe
J> that when you start a new thread, the principal is copied when you
J> call Start. I don't know about the other situations though.
J> ---
WBR,
Michael Nemtsev :: blog:
http://spaces.msn.com/laflour
"At times one remains faithful to a cause only because its opponents
do not cease to be insipid." (c) Friedrich Nietzsche
---
WBR,
Michael Nemtsev :: blog:
http://spaces.msn.com/laflour
"At times one remains faithful to a cause only because its opponents do
not cease to be insipid." (c) Friedrich Nietzsche