Hot answers tagged

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

I get it after few days of googling and testing. The solution is very easy and you don't have to do anything in your development excepting use a factory on your service. This link explain what factory use depending on the service type: WCF Services in SharePoint Foundation 2010 So, the solution to my problem is to modify the "svc" file and add the factory ...


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

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.


5

One of the restrictions of sandboxed solutions is that you cannot call WCF web services. There is no way around this, other than calling a web service from the browser using client side (ie: Javascript) code.


4

We were having this same issue, though with a different service, search instead of managed metadata. The load frequently took 15 seconds. This KB article had the fix for us: http://support.microsoft.com/kb/2625048 . SharePoint 2010 uses SSL to encrypt intra-farm communication. It should work invisibly, but under the right conditions, it can cause problems, ...


4

Unfortunately, the REST API with Javascript will not give you the recurring calendar items. If you want to retrieve the recurring calendar items with client side code, you need to take a look at SPServices: http://spservices.codeplex.com/ Take a look at this thread: http://spservices.codeplex.com/discussions/254560


4

You should put your configuration attributes in the web.config located at C:\inetpub\wwwroot\wss\VirtualDirectories and choose the folder of your Web Application. By the other hand you can use the class SPWebConfigModification to make changes in the web.config file programmatically SPWebConfigModification modification = new SPWebConfigModification("...


4

Heres the sample from the Blog: Generate a class like this: public class CustomMultipleBaseAddressWebServiceHostFactory : Microsoft.SharePoint.Client.Services.MultipleBaseAddressWebServiceHostFactory { protected override System.ServiceModel.ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses) { return new ...


3

The service needs to be AJAX enabled to generate a javascript proxy for you. Lists.asmx is not AJAX enabled. [WebServiceBinding(ConformsTo=WsiProfiles.BasicProfile1_1), WebService(Namespace="http://schemas.microsoft.com/sharepoint/soap/")] public class Lists : GenericService, ISoapServiceLists, ISoapServiceListData, ISoapServiceListSchema, ...


3

You'll need to configure the external content source, the simplest approach is to use SharePoint Designer and externa list, this blog post from the Lightening Tools guys will help: http://www.lightningtools.com/blog/archive/2010/01/05/spd-external-content-type-from-wcf.aspx


3

There's no way to do that. The normal welcome page is provided by the handler which handles .svc requests for ASP.NET. In SharePoint, that handler isn't there. It's replaced by the WCF service host factory you specify and that just doesn't supply that page. So just drop it, or you'll be spending a lot of time trying to find a page which isn't there (and ...


3

Why don't you try to first make a request to the site url, which will authenticate you (I am assuming your .NET Client and the SharePoint site are in the same Network/Forest), and you will be able to get the correct cookies that you can use against your REST service. To use the site url cookies against your REST service: const string siteUri = @...


3

This blog post may help: http://www.sharepoint.bg/radi/post/Custom-WCF-Services-and-setting-Reader-Quotas-in-SharePoint-2010.aspx The following code will set all the quotas to their max value. If you are still getting errors with that quota then you are likely trying to send too much info in one call and its time to split it into multiples. SPWebService ...


3

I think you might need to use the SharePoint provided ServiceHostFactory to create the appropriate endpoints for your service. Look at this tutorial for the Service Host Factories available: http://msdn.microsoft.com/en-us/library/office/ff521581(v=office.14).aspx SOAP = MultipleBaseAddressBasicHttpBindingServiceHostFactory REST = ...


3

You will have to create an external content type in order to get data from external sources. This will give you flexibility such as giving list experience(if needed), remote event receivers, integrating with SP search and etc... You can use SharePoint Designer as well as Visual Studio for this. This is how to do using Visual Studio: Create SharePoint ...


3

I have the same problem on SharePoint 2013. If I create a custom Service factory based on SharePoint factory and override config settings (MaxReceivedMessageSize) the error gone. More info: http://cameron-verhelst.be/blog/2014/10/19/hosting-a-wcf-service-in-sharepoint-with-a-spcontext/


3

Since you seem to get a lot of not so great answers on this question: You can not use the Server Object Model outside of the SharePoint farm. This means that you can not use the Microsoft.SharePoint.dll. Instead you need to use the Client Object Model (CSOM). So you need to convert your code (rewrite it) to CSOM and instead of the Microsoft.SharePoint.dll,...


2

I ran into the same problem and solved it by replacing the String[] by a IEnumerable<StringWrapper>, or in your case IEnumerable<Personal_nameElement>. This could look like: public class Personal_nameElement { public String Value { get; set; } } And in the BDC: <TypeDescriptor Name="Personal_name" TypeName="System.Collections.Generic....


2

Make sure that the paths are valid and accessible. In my case the hostname could not be able to resolved, even I have written the address without hostname. Since I was using a WCF service and deployed in some other server, the metadata link was created with hostname. Even you write the metadata and endpoint addresses with ip, the service might access the ...


2

First thing to look at would be the contents of your solution package (wsp). Perhaps the mapped ISAPI folder is not being included in the package. Within Visual Studio, open the Package.package file. 1.) In the design view, your ISAPI mapped folder should be in the right hand pane (Items in the package) 2.) If you switch to the manifest view, there should ...


2

I suggest you review the Windows Identity Framework SDK for calling a web service using active authentication. Your code needs to contact a configured identity provider, get the token, and present that token to SharePoint. The patterns and practices group has publishing "A Guide to Claims based Identity and Access" and this guide has a section about web ...


2

Follow this steps from this article : http://msdn.microsoft.com/en-us/library/ff521581.aspx By the way, You can choose to have the WCF without the factory. Just supply the configuration in a separate web.config and place it along with your SVC file.


2

As James said, you can either use some client side technology like javascript/jQuery/ECMAScript or the Silverlight to call WCF services. You can build custom actions by creating XML definitions in element files in Visual Studio projects and attach the workflow logic behind them. And, then you can specify where custom actions should appear, such as on the ...


2

Dare i ask why you wouldn't just use SPServices (created by @sympmarc), an open source jQuery plugin that wraps methods in the OOTB SharePoint Web / WCF Services, making the use of these services in JavaScript as simple as the following example: $(document).ready(function() { $().SPServices({ operation: "GetListItems", async: false, listName: "...


2

If your WCF is located under '_layouts' folder and configured correctly you have access to the SharePoint object model as in web parts, application pages, etc. So you can use list.GetItems(spQuery) method to filter items. You can read more about WCF services and SharePoint here. How to configure your service you can find in this post.


2

You should not return a list of SPFile from your web sevice, the SPFile has a reference to SPListItem, which has a reference to SPWeb, ... All of the probably refering to a Site which you accessed (and hopefully disposed) inside RunWithElevatedPrivileges, so serializing the SPFiles are going revitalize these sites, which you aren't allowed to and certainly ...


2

after a detailed research I have figured this out. the link between objects needs to be set explicitly So, the line below sorted it... dataContext.SetLink(obj, "Priority", pri); or ticket.PriorityValue = "Low"; did the same job...


2

Based on the implementation of the Appending Multi-line text field I'd say that it's expected behaviour. Is it what most users want? NO, but that's what you get. The value of a Appending Multi-line text field is in fact only the last added entry. when rendering it SharePoint retrieves the value (and timestamp/user) from previous versions. You can verify ...


2

I had the same issue and got it to work in 2 ways. You have to make the app pool account running the WCF service either an Administrator on the SharePoint Server or make it a Farm Administrator. You also have to give this account rights on the Content Database as well as the SharePoint Config Database. For some reason I am finding out that I also have to ...


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