Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now
14

If you can you should use the Client Object Model (CSOM) - it does not support that many features as the web services but are superior in a number of ways such as: data types batching of commands (more efficient usage of bandwith) optimization of data loaded (more efficient usage of bandwidth) more similar to the server side object model in terms of ...


13

Try these commands if you haven't already, stsadm -o provisionservice -action start -servicetype spwebservice Source Or using PowerShell, $server = "win-lhg69g3kdb2" $service = Get-SPServiceInstance -Server $server | where-object {$_.TypeName -eq "Microsoft SharePoint Foundation Web Application"} $service | Stop-SPServiceInstance -confirm:$false > $...


12

That walkthrough has some, er, issues... I wrote a blog post with an alternate version that you may find a little easier to follow. Walkthrough: Creating a Custom ASP.NET (ASMX) Web Service in SharePoint 2010


11

You actually calling a web service when you use client object model according to this link. Of course use web service is more direct but i dont really care about performance penalty by using Client Object Model. The more concern is productivity improvement by using client object model. But if you more comfortable using web service, you can use it.


11

In your scenario it looks like you have some kind of mobile app running on android or iphone. As you talk about javascript it seems your talking about some kind of webview application (like phonegap). Simplified this is an app that is hosting a browser control. Typical development on the client using native tools for the plattform will work the way you ...


10

How to create Folder (including nested) via CSOM in SharePoint /// <summary> /// Create Folder (including nested) client object /// </summary> /// <param name="web"></param> /// <param name="listTitle"></param> /// <param name="fullFolderPath"></param> /// <returns></returns> public static Folder ...


9

Having the same problem, I found a way. First, I knew a list was broken, based on symptoms reported from other answers in this post (You should also check out this post, as it is quite informative). For one, alirobe's mentioning that /_vti_bin/ListData.svc isn't accessible if a list is broken. When I went to "All Site Content", every list given there did ...


9

You are not allowed to call ANYTHING outside of the Sandbox. A call to listdata.svc is a call outside the sandbox, requiring System.Net.WebPermissions. This is prohibited by the CAS policies on the Sandbox. You basically have three ways to get around this: Use client side code (JavaScript) Use a farm solution Build a Sandbox Full-Trust proxy solution


9

You could user Fiddler. In my experience is the best tools to check what is going on behind the scene when the Browse talks with the SharePoint Server. http://www.fiddler2.com/fiddler2/version.asp Also you could use the Developer Tool (F12) on the Internet Explorer 8+ and in the Script tab you can do some javascript debug. Cheers! UPDATE: This problem ...


8

Versions web service is no use in your case. You need to use Lists web service (http:///_vti_bin/lists.asmx) and Lists.GetVersionCollection Method Returns version information for the specified field in a SharePoint list. So you need to query field by field and as far as I know there is no method to return all field versions at once. Your code could ...


8

By default, code access security denies WebPermission to code running in a sandboxed solution (see Restrictions on Sandboxed Solutions in SharePoint 2010) However, you can create a full-trust proxy operation that will enable you to call the services. (see Sandboxed Solutions in Partnership with Full-Trust Proxies in SharePoint 2010)


8

Yes you can. The contents of a Content Editor Web Part (CEWP) are stored like any other web part - in the web part properties. You can see this if you Export the web parts .dwp file and open in a text editor, you will get something like <?xml version="1.0" encoding="utf-8"?> <WebPart xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:...


8

Try not calling clientContext.Load, for example this works for me: var folder = list.RootFolder; clientContext.Load(folder); clientContext.ExecuteQuery(); folder = folder.Folders.Add("Folder 1"); folder.Folders.Add("Folder 2"); clientContext.ExecuteQuery();


7

Take a look at my answer provided to very similar question: Get meta data from a previous version of a document through webservice in MOSS 2007 Using web service and Lists.GetVersionCollection Method is (as far as I know) only available option. So you need to call it for each field of your item. Client object model is not an option. UPDATED To get all ...


7

The actual answer is: Use Factory="Microsoft.SharePoint.Client.Services.MultipleBaseAddressBasicHttpBindingServiceHostFactory, Microsoft.SharePoint.Client.ServerRuntime, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" in your svc file. The MultipleBaseAddressDataServiceHostFactory one is for REST, where your endpoints are your method (...


6

Why are you deploying your Custom Web Service to the layouts folder at first place? You need to copy the Web service files to the _vti_bin virtual directory Copy the Service1wsdl.aspx file, the Service1disco.aspx file, and the Service1.asmx file to the _vti_bin virtual directory. This is the directory where all default Web services are stored. Copy the ...


6

In SharePoint 2010 , you can install Office Web Applications (marketing link or technical link), that gives you live editing that you are looking for.


6

Concerning the answer with reference to S.Y.M. Wong-A-Ton How to submit the rows of a repeating table in InfoPath to a SharePoint list I managed to succeed in running the code from that article in Infopath 2010 (Sharepoint Online/Office 365) only after I changed CAML template XML file content from given in article: <?xml version="1.0" encoding="...


6

How about something like this: public static Folder EnsureFolder(ClientContext ctx, Folder ParentFolder, string FolderPath) { //Split up the incoming path so we have the first element as the a new sub-folder name //and add it to ParentFolder folders collection string[] PathElements = FolderPath.Split(new char[] { '/' }, ...


6

I found it. The missing DLL was in C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.ServerRuntime.dll But wasn't registered on VS, so you need to manually browse to the file.


6

The query /_api/lists/getbytitle('<list title>')/items?$select=* returns list items for visible fields only (SP.Field.hidden property is set to false). To be more precise the expression $select=* returns: visible fields values (query that returns visible field names: /_api/Web/Lists/getByTitle('<list title>')/fields?$select=InternalName&$...


5

It was probably a problem with one of your lists or list templates. If you have a broken list, then it'll kill the listdata.svc page. See here: http://www.thorntontechnical.com/tech/sharepoint/sharepoint-designer-2010-listlibrary-there-are-no-items-to-show-in-this-view-listdata-svc-woes


5

There are a few ways. The easiest way to have your code call the server directly and then look at the http headers in the response. By default SharePoint includes the "MicrosoftSharePointTeamServices" header that indicates not only that it is running SharePoint but also what version. If that is not an option, look into making an OPTIONS request to the ...


5

Client Object Model was designed to work mainly with list data, so the API is somehow limitted. Working with web services does not always mean parsing XML data, you can use REST API (ListData.svc) that will return JSON output. Some webservices allow to switch between SOAP and JSON response format. So, my advice would be use Client Object Model when suitable (...


5

There are several confusing things in your code. I suppose it is somewhat testing code, but anyway, I'd like to mention some of the mistakes: There is no need for loading anything into the context (with ctx.load(...)) since you're trying just to update an item. Loading into context is supposed for retrieving information from the server side to the client ...


5

Does the list exists in the root of the site collection or in a sub site? If the list is in the root than you can call it with: http://yourserver:port/_vti_bin/Lists.asmx If the list you request is on a subsite you need to call the web service like this http://yourserver:port/SUBSITE/_vti_bin/Lists.asmx


5

There is absolutely no performanve improvement by using the lists.asmx web service over using CAML directly. lists.asmx is just receiving your CAML passing it on to the SharePoint object model, format the result as XML. Sending request/response over the network (even internal on the server) and formatting SOAP messages isn't going to speed up things when ...


5

Activate site feature "Workflows can use app permissions" Site actions > Site Settings > Site features > Workflows can use app permissions


5

your batchElement.innerXml should include a field for ID as it is necessary for identifying the row in the list which the data should be updated. So changing the code as follows would solve the issue if everything else is ok. batchElement.InnerXml = "<Method ID='1' Cmd='Update'>" + "<Field Name = 'ID'>" + prodID ...


5

The method with which you are trying to authenticate is outdated. The SharePoint 2013 Client Object Model has now a class called SharePointOnlineCredentials which abstracts away all the tedious cookie container stuff. Eg: using (ClientContext clientContext = new ClientContext("https://yoursite.sharepoint.com/")) { SecureString passWord = new ...


Only top voted, non community-wiki answers of a minimum length are eligible