0
votes

Here is the below code

string url="\\abc.org\|test1\\test2\\test3\\test4"
using (ClientContext CC= new CC(url))
{
}

getting this exception "value does not fall within the expected range"

1
did you try to escape backslashes? also why you are using backslashes insead normal slashes in something called url ?Selvin
I tried "//abc.org//test1//test2//test3//test4" still getting the same exception. I tied "\\abc.org\\test1\\test2\\test3\\test4" in browser and am able to access the url. @SelvinRajdeep Gupta
That URL does not look valid to me. I'd image it should look something like this: ClientContext context = new ClientContext("https://{site_url}");burnttoast11

1 Answers

0
votes

I don't think this is the correct URL which you are using. Can you please put some different URL like "Https:test1.Microsoftsharepoint.com/sites/sitecollectionName.

If that will work, then modify your site URL.