Search code examples
c#.netintranet

check if image exists on intranet


Im using the answer in this question Test to see if an image exists in C# to find out if images exists.

However I am getting an exception with error: The remote server returned an error: (401) Unauthorized.

The images are on our sharepoint intranet, so how can i test to see if the images do exists?

Thanks


Solution

  • request.Credentials = new NetworkCredential(username, password);