Hi,
We are getting "The remote server returned an error: (403) Forbidden" suddenly in production environment while using .Net CSOM. We tried to read the production site title with the below code, still facing same issue.
staticvoid Main(string[] args)
{
ServicePointManager.ServerCertificateValidationCallback =delegate { returntrue; };
ClientContext clientContext = newClientContext(@"https://sitename...");
Web site = clientContext.Web;
clientContext.Load(site);
clientContext.ExecuteQuery();
Console.WriteLine("Title: {0}", site.Title);
Console.ReadLine();
The Exception- The remote server returned an error: (403) Forbidden.
We have also confirmed the user is site collection admin under which this above code is running.
After analyzing the response in the debug mode we get the following details
{SPRequestGuid: bac0759b-03c9-4b3f-85e1-93ee7a6505f4
X-SharePointHealthScore: 0
X-Forms_Based_Auth_Required: https://sitename_login/SPORedirectMultiAuthLogin.aspx?ReturnUrl=/_layouts/Error.aspx&Source=%2fsites%2fAAAAA4882%2fAPEX%2f_vti_bin%2fsites.asmx
X-Forms_Based_Auth_Return_Url: https://sitename/_layouts/Error.aspx
X-MSDAVEXT_Error: 917656; Access denied. Before opening files in this location, you must first browse to the web site and select the option to login automatically.
MicrosoftSharePointTeamServices: 14.0.0.7106
X-Frame-Options: SAMEORIGIN
Content-Length: 13
Cache-Control: private, max-age=0
Date: Tue, 11 Feb 2014 04:53:25 GMT
Set-Cookie: spodsession=384799110.47873.0000; path=/
Server: Microsoft-IIS/7.5
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
}
Regards,
Sidd