0

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("http://10.34.116.35:41443"))
context.AuthenticationMode = ClientAuthenticationMode.FormsAuthentication;
context.FormsAuthenticationLoginInfo = new FormsAuthenticationLoginInfo("carles", "test");
Web web = context.Web;
context.Load(web);
MessageBox.Show(web.Url);
context.Dispose();

Thanks

2 Answers 2

0

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:

http://social.technet.microsoft.com/Forums/sharepoint/en-US/0fc2f531-1305-44a5-bbea-9ea192c659e8/is-the-security-token-service-in-sharepoint-2010-broken?forum=sharepointadminprevious

2
  • 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
0

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 that you have read and understand our privacy policy and code of conduct.

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