Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 664169
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T23:34:12+00:00 2026-05-13T23:34:12+00:00

I’m trying to implement my own GenericIdentity implementation but keep receiving the following error

  • 0

I’m trying to implement my own GenericIdentity implementation but keep receiving the following error when it attempts to load the views (I’m using asp.net MVC):

 System.Runtime.Serialization.SerializationException was unhandled 
 by user code Message="Type is not resolved for member 
 'OpenIDExtendedIdentity,Training.Web, Version=1.0.0.0, 
 Culture=neutral, PublicKeyToken=null'."
      Source="WebDev.WebHost"

I’ve ended up with the following class:

[Serializable]
    public class OpenIDExtendedIdentity : GenericIdentity {
        private string _nickName;
        private int _userId;

        public OpenIDExtendedIdentity(String name, string nickName, int userId)
            : base(name, "OpenID") {
            _nickName = nickName;
            _userId = userId;
        }
        public string NickName {
            get { return _nickName; }
        }

        public  int UserID {
            get { return _userId; }
        }
    }

In my Global.asax I read a cookie’s serialized value into a memory stream and then use that to create my OpenIDExtendedIdentity object. I ended up with this attempt at a solution after countless tries of various sorts. It works correctly up until the point where it attempts to render the views.

What I’m essentially attempting to achieve is the ability to do the following (While using the default Role manager from asp.net):

User.Identity.UserID
User.Identity.NickName
... etc.

I’ve listed some of the sources I’ve read in my attempt to get this resolved. Some people have reported a Cassini error, but it seems like others have had success implementing this type of custom functionality – thus a boggling of my mind.

  • http://forums.asp.net/p/32497/161775.aspx
  • http://ondotnet.com/pub/a/dotnet/2004/02/02/effectiveformsauth.html
  • http://social.msdn.microsoft.com/Forums/en-US/netfxremoting/thread/e6767ae2-dfbf-445b-9139-93735f1a0f72
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T23:34:13+00:00Added an answer on May 13, 2026 at 11:34 pm

    I’m not sure if this is exactly the same issue, but I’ve run into the same issue when trying to create my own identity implementation.

    This blog solved my problem.

    It seems that the problem is there’s an issue with identity serialization in Cassini, but you can get around it by deriving your class from MarshalByRefObject:

    [Serializable]
    public class MyUser : MarshalByRefObject, IIdentity
    {
        public int UserId ... 
    

    You can’t inherit from GenericIdentity then, of course, but you can still implement the IIdentity interface that GenericIdentity implements, so you can use the thing in most places that expect an IIdentity at least.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.