PC Review

Thread Tools Rating: Thread Rating: 1 votes, 5.00 average.

Pass Principal Object To Web Service

Posts: n/a
      1st Jul 2005
I have a custom Principal (implements System.Security.Principal.IPrincipal
interface) that I need to access from a WebService. My web application has
the Thread.CurrentPrincipal set to this new Principal object, as well as
HttpContext.Current.User. But when I access either Thread.CurrentPrincipal
or HttpContext.Current.User from the Web Service, they are not the same as
those set in the Web Application (and I can see why). My question is, how
can I make the Principal from the Web Service be the same as the one from
the Web Application? If I have to pass the Principal to the Web Service,
that is fine...but I seem to not be able to do this.

In our security system, it has fills the roles collection and creates a new
custom Principal instance (along with the Identity). This principal is used
by our business logic layer to check the user's permissions/roles. The Web
Service calls the methods on the business logic layer and all calls fail
because the Principal object doesn't contain the correct Roles.

So, how can I do this? I need to access the same Principal object on the
Web Service as the one that's created on the Web Application.


Reply With Quote

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to cast object of type 'System.Security.Principal.GenericIdentity' to type 'System.Web.Security.FormsIdentity'. adupuis@dublin.ie Microsoft ASP .NET 2 31st Aug 2007 01:51 PM
Cannot pass arguments from .NET Web Service Client to a Java Web Service bobik72 Microsoft Dot NET Framework 0 21st Mar 2006 04:02 PM
How to pass Principal and Identity objects across .NET Remoting GnanaPrakash.R Microsoft C# .NET 0 3rd Dec 2003 10:54 AM
"Service Principal Name" Errors Ryan Microsoft Windows 2000 Active Directory 3 9th Nov 2003 07:17 PM
RE: Error: A Service Principal Name (SPN) could not be constructed stevta [MSFT] Microsoft Windows 2000 Active Directory 0 8th Oct 2003 06:17 PM




All times are GMT +1. The time now is 01:17 PM.