We have a class that Implements IPrincipal
(System.Security.Principal.IPrincipal). We have a business logic class
library assembly that checks the Principal object for role information to
see if the currently logged in user has access to specific roles...

<snip>
Public Class MyBusinessLogic
Inherits ServicedComponent

<AutoComplete()> _
Public Function Fetch() As Schema.MyTypedDataSet
Dim p As Principal = DirectCast( _
Threading.Thread.CurrentThread.CurrentPrincipal, _
Principal _
)

If Not p.IsInRole("My Role")
Throw New SecurityException("Missing access to My Role.")
End If

...
End Function
End Class
</snip>


Now we are trying to implement a web service that calls the Business Logic
class methods, but it fails because in the web service, the
Threading.Thread.CurrentThread.CurrentPrincipal object is not the same as in
the web application doing the calling. How can we get this Principal to be
set in the Current Thread of the Web Service?

Note: The Principal object has a property called Identity which is of type
IIdentity, which cannot be serialized.

Thanks in advance,
Mythran