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

  • SEARCH
  • Home
  • 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 9149981
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:33:05+00:00 2026-06-17T11:33:05+00:00

My application uses the UserPrincipal class to determine what groups a user belongs to

  • 0

My application uses the UserPrincipal class to determine what groups a user belongs to and then uses that information to determine if a user is authenticated to use my application. Things worked just fine for while, but recently I’ve started getting an exception

Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)

When calling UserPrincipal.FindByIdentity. It seems like the call is succeeding and the exception is being handled properly, but it makes me nervous that authentication is going to break suddenly in the future. I’m not explicitly creating the GUID anywhere, so I have no idea where the exception is coming from.

  • 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-06-17T11:33:06+00:00Added an answer on June 17, 2026 at 11:33 am

    It’s most likely that an exception is being thrown somewhere deep in the Framework code that’s trying to initialize some sort of security descriptor from an invalid GUID value. If the framework is catching it and handling it internally I wouldn’t worry about it.

    Tracing through the Framework code, here is one likely place that it happens:

    protected static bool IdentityClaimToFilter(string identity, string identityFormat, ref string filter, bool throwOnFail)
    {
      if (identity == null)
        identity = "";
      StringBuilder filter1 = new StringBuilder();
      switch (identityFormat)
      {
        case "ms-guid":
          Guid guid;
          try
          {
            guid = new Guid(identity);
          }
          catch (FormatException ex)
          {
            if (throwOnFail)
              throw new ArgumentException(ex.Message, (Exception) ex);
            else
              return false;
          }
    ...
    

    Notice that it tries to create a new Guid, and if it fails, an exception is thrown, but the code swallows it and just returns false

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

Sidebar

Related Questions

My application uses MS access database to save some sensitive information. Though that information
My application uses a lot more memory than I think it suppose to use,
Our application uses a XML configuation file. I thought that it would be nice
My application uses an MDI form, and there are instances where the end user
My application uses a remote service to play audio. I do this so that
My web application uses a pre-authentication method. By the time that the request reaches
My application uses a table that is populated by a dynamic xml feed. I
My application uses Google to search for information and retrieves it. After a few
I have an application that uses ActiveDirecotry authorisation and it has been decided that
Our application uses the MapMaker class from Google collections, and we're getting the exception

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.