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();