When I am trying to access(view) a sharepoint image from asp.net application I am getting 401 Unauthorised error.
I am using following code: Dim webReq As WebRequest Dim webRes As WebResponse
webReq = WebRequest.Create("imageUrl") webReq.UseDefaultCredentials = True webReq.PreAuthenticate = True webReq.Credentials = CredentialCache.DefaultCredentials
P.S I: I am able to view the image in the .net application from development server. Issue is when i hosted application to QA server. QA server is the Sharepoint server where image resides.