1

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

3
  • 1
    As I remember the IIS user has no privileges on the network by default. Commented Nov 2, 2011 at 9:48
  • 2
    request.Credentials = new NetworkCredential(username, password); Commented Nov 2, 2011 at 9:51
  • @L.B - that worked, I'll mark as answer if you add it.. Commented Nov 2, 2011 at 10:15

1 Answer 1

2

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.