Last post Jul 21, 2017 12:01 PM by hkholakiya
Jul 19, 2017 07:16 AM|mnmhemaj|LINK
I’ve developed one web application to modify a custom list under sharepoint site.
This application works well from my localhost but not from our server.
I am getting “ clientcontext.executequery() 401 unauthorized “ error. Please help.
Jul 19, 2017 01:00 PM|hkholakiya|LINK
How you creating "clientcontext" using username & password?
Can you please send me that?
Jul 19, 2017 05:30 PM|mnmhemaj|LINK
No, I have not used username & password
Jul 20, 2017 03:21 AM|Eric Du|LINK
According to your description, as far as I know, you need to add the application into trusted apps of the Sharepoint farm. About how to implement this, please check the step 28 of the following tutorial:
Step by Step approach to create a Provider Hosted Application in SharePoint 2013:
Jul 21, 2017 12:01 PM|hkholakiya|LINK
why don't you try once using below code:
request = DirectCast(System.Net.WebRequest.Create(fileurl), System.Net.HttpWebRequest)
Dim credential As New System.Net.NetworkCredential(SharepointUsername, SharepointPassword)
request.Credentials = credential
request.Timeout = 10000
request.AllowWriteStreamBuffering = False
response = DirectCast(request.GetResponse(), System.Net.HttpWebResponse)
Dim stream As Stream = response.GetResponseStream()
Hope it will solve your issue.