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 8656051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:11:03+00:00 2026-06-12T15:11:03+00:00

I am randomly getting a base 64 encoding error when browsing my mvc3 azure

  • 0

I am randomly getting a base 64 encoding error when browsing my mvc3 azure web role. I am using WIF with passive authentication to authenticate against my ADFS server. I have not be able to isolate where this is coming from, but I have an idea and am hoping for some feedback/help.

From the call stack it looks like it’s coming from a bad cookie. The “FedAuth” cookies from wif/adfs are the only thing that show up when i look at my cookies from the chrome developer console. So I am thinking that somehow these cookies are getting corrupted or have invalid characters in them. I am working on verifying this but since the error happens randomly it’s taking some time. Has anyone experienced anything similar or have any inclinations as to what could be causing this? Any help is appreciated!

Here is the exception:

The input is not a valid Base-64 string as it contains a non-base 64 character, more      than two padding characters, or a non-white space character among the padding characters.
[FormatException: The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or a non-white space character among the padding characters. ]
   System.Convert.FromBase64String(String s) +0
   Microsoft.IdentityModel.Web.ChunkedCookieHandler.ReadInternal(String name, HttpCookieCollection requestCookies) +613
   Microsoft.IdentityModel.Web.ChunkedCookieHandler.ReadCore(String name, HttpContext context) +174
   Microsoft.IdentityModel.Web.CookieHandler.Read(String name, HttpContext context) +133
   Microsoft.IdentityModel.Web.CookieHandler.Read(HttpContext context) +59
   Microsoft.IdentityModel.Web.CookieHandler.Read() +65
   Microsoft.IdentityModel.Web.SessionAuthenticationModule.TryReadSessionTokenFromCookie(SessionSecurityToken& sessionToken) +84
   Microsoft.IdentityModel.Web.SessionAuthenticationModule.OnAuthenticateRequest(Object sender, EventArgs eventArgs) +119
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +80
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +270

I’ve been doing some more testing on my cookies and I can see that with every request that my fedauth cookie gets bigger and bigger. This could be part or all of the problem. Eventually, and randomly something is appending some bad characters. The token ends with these closeing tags “”. I can see that it fails when some extra characters show up after the security context token close tag. The extra characters are different every time the error happens.

  • 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-12T15:11:04+00:00Added an answer on June 12, 2026 at 3:11 pm

    Figured it out. Opps… programmer error…

    When users first log into my application I pull some role information from my database and create claims for them. I was re-adding these claims every time, so my session token was growing… and growing… eventually this was causing the token to split over 2, 3, 4, 5, 6 cookies and eventually something was just choking on this. I am no longer adding the claims every time. No longer seeing this issue.

    Thanks for all your help.

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

Sidebar

Related Questions

I keep getting this error randomly: System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: Server was unable to process request.
We keep getting this error randomly in our web application. System.Data.SqlClient.SqlException: A network-related or
Im getting this error randomly in the web application which does the XML-XSL transformation.
I am getting this error randomly on an asp.net web application I have deployed.
Randomly im getting the following error from xcodebuild (iOS 5.0 SDK - Apple LLVM
my app is getting force close randomly. And every time error can not be
Okay this is werid, i keep getting the error, randomly. ValueError: matrix must be
I keep getting this error randomly when trying to read ARSTECHNICA RSS feed. I
I keep randomly getting this error within my Drupal site. Only way to resolve
Im getting this error message randomly: Index was outside the bounds of the array.

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.