I am trying to do HttpWebRequest on http://<mysite>/_vti_bin/owssvr.dll?CS=65001.

I am sending Authorization, cookie and Data like

Request = Cmd=UpdateView&List=<listGuid>&View=<viewName>&ViewStyle=<viewStyleID>;

I am writing the data using StreamWriter. I am sending Request digest and Latest ViewState as well.

But still it is not working. Giving

404 Not Found error.

  • Did you activate "Minimal Download Strategy" or MDS feature on your site features. This doesn't really work with items such as the Publishing Portal, Enterprise WIKI and Project Web App. – userAZLogicApps Mar 10 '16 at 7:07
  • I am trying to use this RPC call in sharepoint 2010 server. In sharepoint 2010 MDS feature is not present. – Vaibhav Taunk Mar 10 '16 at 7:11
  • I am trying to do something similar. I want to set the view style back to Default on many libraries. I haven't been able to get it to work yet. Have you had any luck? – Lance Oct 18 '16 at 15:40

So, I was able to figure out the issue. The problem was with Data I was Posting.

postData = String.Format("{0}={1}", System.Web.HttpUtility.UrlEncode(ViewStyle), System.Web.HttpUtility.UrlEncode(Default));

Request = postData;

Your Post data should be UrlEncoded & post data should also contain hidden values of page like __REQUESTDIGEST, __EVENTTARGET, __EVENTARGUMENT, __VIEWSTATE, __EVENTVALIDATION, Cmd=UpdateView, List="ID", View="ID" and etc(Whatever data you want to send).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.