I'm getting this error when using CSOM in a FBA web application that is configured agains't a custom FBA provider. I'm getting this error when site is configured for Forms, if a disable forms with windows auth I can get web url. Probably would be a configuration error if anyone can helpme...

I'm getting the error when Forms is configured:

Server was unable to process request. ---> Could not retrieve the IIS Settings. Parameter name: context

Here is my CSOM code:

using (ClientContext context = new ClientContext(""))
context.AuthenticationMode = ClientAuthenticationMode.FormsAuthentication;
context.FormsAuthenticationLoginInfo = new FormsAuthenticationLoginInfo("carles", "test");
Web web = context.Web;


2 Answers 2


Try to use the correct protocol for the webservice (http,https) and also try with the SPClaimsUtility.AuthenticateFormsUser method from Microsoft.SharePoint.IdentityModel namespace

Also Check to see if your passwords are stored in the database as hashed passwords.

Here is a thread for you to take a look at:


  • Alo see this thread for your information rachufour.org/alida/2015/01/07/… Feb 18, 2015 at 11:31
  • I'm attached to process and debugging my custom assembly and authentication is going on, matches ok the password and authenticates ok. I've seen this link before asking, seem that this is not the solution. Feb 18, 2015 at 11:49

I've the solution... hope helps someone in the future. It was a silly thing.

CSOM calls internal if FormsAuthentication mode is set a web service Authentication.asmx to authenticate request in forms mode...

I noticed that in the server machine connecting to http://localhost:41443/_vti_bin/Authentication.asmx?op=Login from explorer worked. So it was simply, from client I was calling the api (using CSOM) by its ip and replacing ip for the host name of the site worked.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.