.net - WCF set Thread.CurrentPrincipal via IHttpModule -


i have wcf + rest web service aspnetcompatibility = "true". provide custom authentication wrote asp.net http module : ihttpmodule. code pretty simple: assign principal thread.currentprinicpal property.

during method execution still 'empty / default' principal value of thread.currentprincipal. noticed there different thread ids (thread.currentthread) in module , operation execution. have suggestion wcf provide new thread execute operation, haven't found proofs.

so question: correct? wcf allow control behavior? i'm confused here because creating new thread automatically move principal new thread. hence wcf 'clean' them..

the same issue principalpermissionmode="none".

i appreciate ideas!

cheers!

imo - thread receive principal when run thread sat one.

wcf manage threads in own way (partially controlled instancemode - percall, persession, ...). not propogate thread details.

may should consider use model authentication. see post more details custom authentication: http://blogs.msdn.com/b/astoriateam/archive/2010/07/21/odata-and-authentication-part-6-custom-basic-authentication.aspx


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -