All Questions

566
votes
8answers
175507 views

ASP.NET MVC - Set custom IIdentity or IPrincipal

I need to do something fairly simple: in my ASP.NET MVC application, I want to set a custom IIdentity / IPrincipal. Whichever is easier / more suitable. I want to extend the default so that I can call...
16
votes
1answers
11345 views

using custom IPrincipal and IIdentity in MVC3

I create my own IPrincipal and IIdentity implementation as shown below: [ComVisible(true)] [Serializable] public sealed class CustomIdentity : IIdentity { private readonly string _name; priv...
19
votes
3answers
13218 views

Implementing a Custom Identity and IPrincipal in MVC

I have a basic MVC 2 beta app where I am trying to implement a custom Identity and Principal classes. I have created my classes that implement the IIdentity and IPrincipal interfaces, instantiated th...
4
votes
2answers
4656 views

How to create a CustomPrincipal globally (with and without AuthorizeAttribute)

I have a custom Principal/Identity for my ASP.NET MVC4 web app. I have also created a AuthorizeAttribute to instantiate my custom principal, assigning it to httpContext.User in controllers where I req...
10
votes
2answers
11435 views

Is this Custom Principal in Base Controller ASP.NET MVC 3 terribly inefficient?

Despite the fact that I've been on here for a while, this is my first ever question on SO, so please be gentle with me. I'm using ASP.NET MVC 3 and I want to create a custom Principal so I can store ...
4
votes
2answers
2417 views

RoleProvider dosn't work with custom IIdentity and IPrincipal on server

I'm using a custom IIdentity and IPrincipal in my ASP.NET MVC application via EF 4.3 as expalined here (and follow accepted answer's solution). Also, I have a custom RoleProvider. In local (using IIS ...
10
votes
2answers
3713 views
5
votes
1answers
5724 views

Implementing IPrincipal and IIdentity in MVC with use of custom membership and role provider

I'm stuck with the implementation of a custom iprincpal and iidentity object. I spend a day now for searching how to implement these right and extend it with more informations. I want to extend the I...
18
votes
4answers
32007 views

Custom Identity using MVC5 and OWIN

I trying to add custom properties to the ApplicationUser for a web site using MVC5 and OWIN authentication. I've read https://stackoverflow.com/a/10524305/264607 and I like how it integrates with the...
32
votes
4answers
14095 views

What is the idea behind IIdentity and IPrincipal in .NET

So, what is the purpose for existence of both IIdentity and IPrincipal, and not some IIdentityMergedWithPrincipal? When is it not enough to implement both in same class? Also, to understand purpose, ...

Previous Next