Sharepoint lead is a place where you can read about interesting topics related to sharepoint, and you can also post comments and suggessions.

Sunday, January 6, 2013

System.ArgumentException: Exception of type 'System.ArgumentException' was thrown. Parameter name: encodedValue

I was configuring one of our clients farm which required FBA on different web applications (around 5) and he wanted each web application should have separate user store. That was too tricky since you just need to set up Application property of the membership provider and you are done.
After completion of these settings, all of my applications were having a common exception either in log out or login to the web application. Here was the exception.
System.ArgumentException: Exception of type 'System.ArgumentException' was thrown.  Parameter name: encodedValue    at Microsoft.SharePoint.Administration.Claims.SPClaimEncodingManager.DecodeClaimFromFormsSuffix(String encodedValue)     at Microsoft.SharePoint.Administration.Claims.SPClaimProviderManager.GetProviderUserKey(IClaimsIdentity claimsIdentity, String encodedIdentityClaimSuffix)     at Microsoft.SharePoint.Administration.Claims.SPClaimProviderManager.GetProviderUserKey(String encodedIdentityClaimSuffix)     at Microsoft.SharePoint.Utilities.SPUtility.GetFullUserKeyFromLoginName(String loginName)     at Microsoft.SharePoint.ApplicationRuntime.SPHeaderManager.AddIsapiHeaders(HttpContext context, String encodedUrl, NameValueCollection headers)     at Microsoft.SharePoint.ApplicationRuntime.SPRequestModule.PreRequestExecuteAppHandler(Object oSender, EventArgs ea)     at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()     at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
After checking all my steps right through starting. After getting all the other exeptions cleared the above exception was the only exception that I was getting. That was resolved using "Exception of type 'System.ArgumentException' was thrown" got error when i have signout from webapplication in sharepoint 2010?.
I hope this will help to you if you are getting same error due to a silly custom property of a custom web part for registration!

Update - 5/19/2014

There are several solutions that I tried:
The same error also encountered again reported by client when he tries to enable intranet through internet explorer settings. Disabling detection of intranet from internet options solves that issue but you are forced to enter username password every first visit of the site even in intranet as well!

Update - 5/25/2014

This is a SharePoint bug also found some discussion here: https://sharepoint2013fba.codeplex.com/workitem/9 

Hope this helps


  1. Hey how are you !!

    I am facing exactly the same problem with my sharepoint 2013 server , I have configured fba and I am using sharepoint fba pack 2013 for managing authentication and authorization , but can you please help me out how can i fix this bug !! because the fba pack is not using user creating wizard there is a "userCreatepage" that handles this task , thanks !!!

  2. It tried many solutions at various places and finally got it working while re-applying all the user permissions which are domain-controller\username with i:0#.f|providerName|loginname kind of string. Started it from Central Admin, web application permissions.

    1. Can you please provide the path to do this action in central admin Please :)

    2. I have updated the post by adding updates below it. I still have problems when user is having intranet detection enabled through internet options, but for everything else, its working fine...

  3. Admiring the time and effort you put into your blog and detailed information you offer!.. SharePoint Intranet