Dear Expert,
I have create one console application for performing operation on sharepoint online site. but when I try to run exe, I encountered below error.
Console application main function
try
{
string siteURL = "https://xyz.sharepoint.com/sites/Projects/";
string userName = "xyz@xyz.com";
string password = "xyz@xyz";
ClientContext webCxt = new ClientContext(siteURL);
SecureString oSecurePassword = new SecureString();
foreach (Char c in password.ToCharArray())
{
oSecurePassword.AppendChar(c);
}
webCxt.RequestTimeout = System.Threading.Timeout.Infinite;
webCxt.Credentials = new SharePointOnlineCredentials(userName, oSecurePassword);
webCxt.ExecuteQuery();
getAllSubSiteUrls(siteURL, webCxt);
Console.WriteLine("Done");
Console.ReadLine();
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
Console.ReadLine();
}

Kindly advice.