Sharepoint 2010 custom WCF service - wcf

I am trying to create a custom WCF service and to host it in Sharepoint 2010. I found a howto on how to do that here:
http://msdn.microsoft.com/en-us/library/ff521581.aspx
the problem is the attribute "BasicHttpBindingServiceMetadataExchangeEndpointAttribute" which should be in Microsoft.Sharepoint.Client.Services.
But I could neither find the dll file nor the attribute. On the internet there is not much information about that.
Does anybody know from where I can get this dll or does anybody have a link to a good howot or tutorial on how to create WCF services on Sharepoint?
Thanks in advance.

Ya ran into that problem too. The answer is in the tutorial but I missed it.
To add a reference to Microsoft.SharePoint.Client.ServerRuntime, which contains the service factories that are provided by SharePoint Foundation, use the Browse tab of the Add Reference box to navigate to the Microsoft.SharePoint.Client.ServerRuntime.dll file within %Windows%\assembly\GAC_MSIL\Microsoft.SharePoint.Client.ServerRuntime, select the DLL, and click OK.
Then you need a using Microsoft.SharePoint.Client.Services;
above the attribute.
I don't have a reference to this namespace just a using statement. Also make sure you have the microsoft.sharepoint.client and microsoft.sharepoint.client.serverruntime references
I got stuck after deploying myself. Got 404 errors and couldn't add the service reference to test it. If you find a fix please email me at
mondo at shaw.ca
thanks and good luck!

Related

How to integrate sharepoint web part?

I am new to SharePoint development.
I have download a '.wsp' file which resides in C:\SlideShow.wsp I want to use this file in my site as web part. I searched over the internet to integrate it and found many solution to do so through power shell script using the command.. Add-SPSolution -LiteralPath but it is not working in my case.
I executed this commannd `Add-SPSolution -LiteralPath "C:\SlideShow.wsp" but it gives error..
How do I integrate it?
Please help.
Go under the Page where you want to add it: Settings->Site Settings->Solutions->Upload Solution
Or with Powershell
Make sure:
Started SharePoint 2010 Manangement Console
Started it as Administrator
For Farm solutions use:
Add-SPSolution C:\SlideShow.wsp
For Sandbox solutions use:
Add-SPUserSolution C:\SlideShow.wsp
As Mark says you have to enable web part from Site collection Features , But it should be automatically enabled , FYI whenever creating a web part in VS2010 please check that you are referencing your web part to SP2010 site other wise SP will not consider it in its trusted zone(Safe Control) , If you are still unable to locate your web part register your DLL in GAC . Sharepoint will consider it as a Safe control .
--Sorry for short answer ,,Please let me know if it works .

sharepoint workflow solution not working

i have made a sequential workflow in visual studio 2010.
the workflow is working fine on me local machine. i have packaged it to a solution and uploaded it to our intranet. using site settings solution and then add solution and activate it. when i go to site features i don't see me solution and it's not working on the list i have made it for. anyone knows how to fix this ? i'm using sharepoint2010 foundation.
the language i have made it in is english and the site where im trying to install it is Dutch.
thanks in advance.
Check that the workflow is published.
This link may also be of help. There is a slight chance your problem might have to do with localization issues.

creating web service in VB.NET

I have just little background in web and I need to do this task by myself so I will be most grateful for your help
this is what my boss told me to do (as far as I understand) - I have to write a web service server which gets some parameters, check their validity and then insert/update them in a database. All the parameters are delivered together as a packet written in SOAP - WSDL file. I have to do it using vb.NET in Visual Studio 2010. I read a bit about it and if I understand correctly .NET takes care already of the SOAP an WSDL issue, it is transparent to me, isn't it? or should I install or implement anything concerning that? I saw some examples in the net that all you have to do is to implement web_method in the asmx file, is it so? if yes, which parameters will my method get - the whole bunch of 20 parametres supposed to be in the packet? anything I need to declare or to update in order to connect to the DB? Any help will be appreciated - uf the answer is too long I will be happy just to get a pointer to some relevant material I can read and learn.
Thanks a lot
Try reading this MSDN article: it describes how to write a simple Web service by using Visual Basic .NET
Here are the main steps from the linked MSDN article:
Start Visual Studio .NET or Visual Studio.
Create a new Active Server Pages (ASP) .NET Web service project. Name the Web service MathService and point the location to an
appropriate Web server that is running ASP.NET if necessary.
Change the name of the Solution file to MathService for consistency.
Change the name of the default Web service that is created from Service1.asmx to MathService.asmx.
Click Click here to switch to code view in the designer environment to switch to code view.
Change the name of the class from Public Class Service1 to Public
Class MathService.
Define methods that encapsulate the functionality of your service. Each method that will be exposed from the service must be flagged with
a WebMethod attribute in front of it. Without this attribute, the
method will not be exposed from the service.
Click Build on the Build menu to build the Web service.
Browse to the MathService.asmx Web service page to test the Web service. If you set the local computer to host the page, the URL is
http://localhost/MathService/MathService.asmx.

How to use SOAP 1.2(request and response) in windows forms

I have never worked with SOAP but now i need to use it to get a XML file or CSV file with a lot of products.
I have searched the internet for some examples and found some but i still don't understand how to use it.
Am i wright that it just sends a XML file to a server and you get back a XML file with the data.
Do i really need to install this so that it works: http://www.microsoft.com/en-us/download/details.aspx?id=11413
And i need to implement it in a windows forms application.
Hope someone can help me with a good tutorial.
You don't need to manually write all the code to do the SOAP communication yourself. The .NET framework and visual studio provide tools to automatically build custom client classes that mimic the interface of the SOAP service, and perform all of the SOAP communication for you. You don't need to install anything special, you just need to right-click on your project in the IDE and choose to add a Web Reference, or a Service Reference.

pollingDuplexHttpBinding problem

I am using pollingDuplexHttpBinding and it is working fine as long as i copy paste the web.config from msdn article :- MSDN article
However when i try to manually configure my service using WCF configuration editor, it doesn't work. The option pollingDuplexHttpBinding doesn't show up under endpoints in Binding drop down box. How do i solve this problem? I already have a reference to the required assembly of pollingduplexhttpbinding.
Thanks in advance:)
Just because it doesn't show up in config intellisense, doesn't mean that the binding won't work when you run your application. Make sure that you have the latest version of Silverlight Tools for Visual Studio installed; Even then, it may still not show up (config intellisense unfortunately always seems to be an afterthought at Microsoft, especially for server-side config for Silverlight scenarios).