Questions tagged [iprincipal]

The System.Security.Principal.IPrincipal interface defines the basic functionality of a security object. It is most commonly used by applications written for the Microsoft.NET framework.

The System.Security.Principal.IPrincipal interface defines the basic functionality of a security object. This object represents the security context of the user on whose behalf the code is running, including that user's identity (IIdentity) and any roles to which they belong.

129 questions
0
votes
0 answers

asp.net check Context.User confirmed

The project is C# asp.net 4.5 (not MVC). When in my master page, or an aspx/ascx page, you can tell if a user is in a role: <% if(Context.User.IsInRole("the role to check")) { blaw blaw } %> Is there a similar way to check if a user has 'confirmed'…
Robert Achmann
  • 1,986
  • 3
  • 40
  • 66
0
votes
1 answer

Approach for replacing forms authentication in .NET application

My question is about an approach, and I am looking for tips or links to help me develop a solution. I have an .NET 4.0 web forms application that works with Forms authentication using the aspnetdb SQL database of users and passwords. A new feature…
Ash Machine
  • 9,601
  • 11
  • 45
  • 52
0
votes
1 answer

Access ApiController User in class library

I have a Web API 2.2 application and want to filter data based on the current user that is accessing the Web API. The User property on the ApiController has the information that I need. But how can I get that information to my service class? Of…
0
votes
1 answer

ASP.NET MVC - Custom IIdentity or IPrincipal with Windows Authentication

I am working on an intranet site with Windows Authentication for logins. However, I want to extend the IPrincipal to have other properties. For instance, I'd like to get the user's FirstName in @User.FirstName or…
justiceorjustus
  • 2,017
  • 1
  • 19
  • 42
0
votes
1 answer

Shopping Cart in IIdentity IPrincipal

I am delevoping an order management system for my customers. And in this system, I decided to use IPrincipal instead of IIdentity. I have been thinking for a long time about where I should store customer's cart data. Finally I decided to store in…
senjizu
  • 103
  • 12
0
votes
1 answer

IPrincipal cannot be found in dnxcore50

I try to use IPrincipal in dnxcore50. Although it works fine on Windows, I get the following error when running dotnet restore on OS X: Unable to resolve System.Security.Principal (>= 4.0.1-rc3-23829) for DNXCore,Version=v5.0 (osx.10.11-x64). My…
Ramon de Klein
  • 5,172
  • 2
  • 41
  • 64
0
votes
2 answers

Not seeing roles on Principal in ASP.NET MVC 2 Application

I am writing an ASP.NET MVC 2 application and don't want to use ASP.NET Membership. I do want to use the Authorize attribute on the Controllers. What I have done so far is ... Web.config
abarr
  • 1,140
  • 3
  • 13
  • 28
0
votes
1 answer

StructureMap: How to inject IUser into constructor

I have an ASP.NET MVC 5 website and I would like to access current user info from my own class (that has no idea of http context). How can I inject it into that class? Apparently, I can't even inject IUser into a MVC controller either. It throws…
Null Head
  • 2,877
  • 13
  • 61
  • 83
0
votes
1 answer

Get custom "IIdentity and IPrincipal" client from WCF Service

I have a custom IIdentity called MyIdentity, and custom IIprincipal called MyPrincipal. These classes are used in three different projects: ASP.NET MVC ASP.NET WebForms Windows Forms These three projects get information from a WCF Service. It is…
JaimeCamargo
  • 353
  • 1
  • 3
  • 14
0
votes
1 answer

Keep an object for the time the connection is running in ASP.NET

I'm developing a web service with ASP.NET, is not an .asmx or WCF, it's a custom one, so I'm working with the Http classes (context, request, response, etc..). Session is disabled. I'm working with my own handler and module. I'd like to keep a…
vtortola
  • 34,709
  • 29
  • 161
  • 263
0
votes
1 answer

How do you override the WCF AuthenticationService IsLoggedIn() method?

I have three current thoughts on how to do this: re-implement AuthenticationService, which uses lots of internal constructors and internal helpers, implement custom IIdentity and IPrincipal types and somehow hook these into…
user29439
0
votes
1 answer

understanding IPrincipal in mvc

I'm trying to understand the purpose of IPrincipal and IIdentity or just Principal objects in general. From what I've been reading from MSDN. IIdentity describes the user that is authentication and any information about them. and IPrincipal is the…
dbarnes
  • 1,803
  • 3
  • 17
  • 31
0
votes
0 answers

Master page doesn't show extension method over IPrincipal

I am having a problem and I can't find a solution. I have a module with some extension methods for IPrincipal: _ Public Function CanCallGhostbusters(ByRef activeUser As IPrincipal) As Boolean Dim…
0
votes
1 answer

WCF PrincipalPermission Authorization

I'm trying to setup role authorization on each wcf web method. Maybe I'm doing something wrong but I just can't get the authorization to take place. I have a UserNamePasswordValidator that authorizes the user access to the service. An authorization…
JIbber4568
  • 839
  • 4
  • 16
  • 33
0
votes
1 answer

What is the best way to pass security token to non IIS services

Is there a way to manually and safely serialize Session Security Token? I am setting up a web application that authenticates with Azure ACS. I have got the claims and principals ok. Now I need to pass that whole thing to back end services. What's…
Alwyn
  • 8,079
  • 12
  • 59
  • 107
1 2 3
8
9