.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

How to Deploy WCF service(developed using VS2010) on IIS7.0 as a RESTful Service.

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :SharePoint

Hi Guys,


I am new to WCF development, and i just developed a WCF service using VS2010 as per my client's urgent requirement. They need a RestFul service , which reads data from an Publishing ShraePoint Library which has anonymous access. Intially i tried using the sharePoint built in restful service (LISTDATA.SVC), but as it looks for authentication, it is failing to provide data.

Coming back to the problem, I have developed the wcf service and its working well on wcfclient. I need to deploy this on IIS7.0 as a restful service.

Any guidence and leads would be helpful. This is a bit urgent too.




Ashish, MOSS Learner

View Complete Post

More Related Resource Links

Publishing a WCF service in VS2010 and IIS7

OK, there is probably a really simple answer to this, but I have the flu and can't think straight.I am taking advantage of being out sick by downloading VS2010RC and playing around with it.I created a simple WCF service (my first in this foundation, but not my first service).  Its a redo of an existing asmx service I created a while ago.  I commented out all the processes, and am simply trying to publish the service to my local IIS7 to see the discovery working.I have setup a new site to host the service ( I tried using Default as well, with the same results).  I right click the project in VS and select publish.  It is prompting me for a login even though the site is setup for anonymous access.  If I try to use WebDeploy, it can't find my site, and if I use FileSystem, it give me a simple "Publish failed" with no details.Can someone point me to a tutorial or something that describes the publish process in VS2010 or give me some leads as to what setup needs to happen either in VS or ISS to let me publish?  Thanks. 

Service Station: Building RESTful Clients


This column how to build clients applications based on the REST architecture using HTTP AP1s. The article describes how to address the question of autogenerated types and code.

Jon Flanders

MSDN Magazine October 2009

Service Station: An Introduction To RESTful Services With WCF


We discuss some of the basic tenets of REST as well as present an implementation of a RESTful service using WCF.

Jon Flanders

MSDN Magazine January 2009

Web Service Workflows: Deploy Distributed Business Processes With Windows Workflow And Web Services


Due to the distributed nature of a business process it makes sense for a workflow to be deployed as a distributed application. See how Windows Workflow and Web Services hold the key.

Israel Hilerio

MSDN Magazine October 2006

VS2005 calling VS2010 asmx service returns empty string


Anyone have any experience with this?

We are using VS 2005 for the front end, and vs 2010 for the web services part (asmx), not wcf yet.


Web service works just like the vs2005 when run locally, no problems.


Connecting to it from a test app returns an empty string. Connecting to a 2005 app doesn't!

Anyone run into this before or have a suggestion? Surely vs 2005 can connect to web services from a later version?






Cannot get service reference for Net.tcp service hosted in IIS7

HiI've got a service that I want to host in IIS7. The service runs over net.tcp (currently without security), but I am unable to create a service reference to it, or call it, using the net.tcp protocol. My event log is populated with lots of errors related to ASP.NET and System.ServiceModel, relevant services are installed and running (net.tcp port sharing service and net.tcp listener adapter).O/S : Window7 RTMDevStudio: 2008I publish the webservice to IIS7 and I get a valid page when navigating to the published .svc file (which tells me to use svtutil.exe and point it at the net.tcp endpoint).For that, I get this error :    The message could not be dispatched because the service at the endpoint address 'net.tcp://gedm-desktop.profiledc01.appdevelop.local/ManageAVMEP/ManageAVMAgent.svc/mex' is unavailable for the protocol of the address.Googling the problem leads me down several blind alleys :(I cannot determine what is causing the net.tcp listener to keep stopping? Everything is fine if I use the wsHttpBinding.Any tips or pointers to a course of action would be appreciated.ThanksGed My event log is full of errors (here is a sample) :-------An error occurred while trying to listen for the URL '/LM/W3SVC/1/ROOT/ManageAVMEP'. This worker process will be terminated. Sender Information: net.tcp Exception: System.ServiceModel.WasHos

How to create simple web service in VS2010, NOT WCF service

How to create simple web service in VS2010 Professional (trial version). There is no template to do this.  I am not trying to create WCF service here.

RESTful WCF Workflow Service

Folks,   I'm in the middle of building a service (.xamlx) that is basically going to support a document submission workflow. Via the web service, I want clients to be able to POST a big ol' XML file into my system. This is going to kick off a big, long-running, persistable, AppFabric-managed workflow. Clients will be able to poll this (or another) service to get the status of the document processing.   My issue right now is that it appears as though, out of the box, what I get is straight-up WSDL-style services that use standard web service tactics. I was wondering if there was something I could do, either via web.config or via the workflow designer, that would allow me to have my WCF-hosted workflow AND have the endpoint be a RESTful (or even REST-ish... i'm not picky) one. In other words, I want to be able to POST an arbitrary blob of XML to my workflow service (complete with authentication tokens in custom HTTP headers). Is this possible? If so, how?The .NET Addict - http://dotnetaddict.dotnetdevelopersjournal.com

How to add XML documentation to generated Schema for a RESTful service

I'm using the RESTful Starter Kit which automatically generates a Service help page. For each method there is a link to a Request Schema. How can I add documentation/comments for each DataMember in the DataContracts so that the description/comment shows up in the generated xml schema?

Need help with Restful WCF service and tester

Greetings,  I need a simple restful service to upload an image.   I am new to restful services and this is my attempt to create a simple service and tester.  I cannot get this to work.  Like I said I am new and I would appreciate any help.  Thanks. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using System.Net; using System.ServiceModel; using System.ServiceModel.Web; namespace ImageTester { [ServiceContract] public interface IImageTestService { [OperationContract, WebInvoke(Method = "POST",UriTemplate = "File/{fileName}")] bool UploadFile(string fileName, Stream fileContents); } [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall)] public class ImageTestService : IImageTestService { public bool UploadFile(string fileName, Stream fileContents) { return true; } } class Program { static void Main() { Uri baseAddress = new Uri("http://localhost:8889/TestImage"); WebServiceHost host = new WebServiceHost(typeof(ImageTestService), baseAddress); try { host.Open(); Console.WriteLine(host.BaseAddresses[0].AbsoluteUri + " running.\n"); Console.WriteLine("hit a key to send image&quo

Deploy XBAP application with WCF Service Reference into multiple environments

Hi, we have a multiple environment setup (local, Development servers, QA servers, prod servers, etc.) and we are building an XBAP application that uses WCF Services to connect to databases.  We code and unit test everything locally and then deploy to our Development servers for more thorough unit testing.  The issue that we are having is that we don't see how to update the deployed XBAP application to use the Development server deployed WCF Service.  The only way we've been able to do this is by having to change the reference on my local machine, complie, and redeploy the XBAP.Question:  How do we configure a deployed XBAP's Service Reference to point to the same service on a different server than what it was originally compiled/deployed with?  (Like in some configuration file...NOTE: but we also don't see a config file after deploying the XBAP.)  We don't want to have to update the Service Reference for QA, Prod, Training, Stage, etc. on our local machines, compile and redeploy every time we need to migrate the application to a new environment.Thanks!

RESTful WCF Service endpoint not being found by client


I created a RESTful WCF service which I plan to call from a client app (a custom toolpart in a Sharepoint web part), but while I can access everything just fine from a browser the client throws this error:

EndpointNotFoundException: There was no endpoint listening at http://mymachine:3217/Services/CtmsService.svc that could accept the
message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
---> System.Net.WebException: The remote server returned an error: (404) Not Found.

My service's contract looks like this:

public interface ICtmsService
  [WebGet(UriTemplate = "/GetAllSites")]
  Dictionary<string, int?> GetAllSites();
...and the configuration looks like this: (which is more complicated due to needing dependency injection via Spring.NET to work)


deploy a WCF service, hosting in Windows Service with NamedPipe binding


Hi, I developed a wcf service, hosted in Windows service with Namedpipe binding, and  a client application that were both in .net 4.0

both work well in my development computer, in Win 7
when i deployed both service and client in another computer. the service works, but the client cannot access the service.

with EndpointNot Found exception
when I changed binding to wsHttpBinding, the client failed to call the service with SecurityNegotiationException



VB WCF Workflow Service Application - WcfTestClient.exe different to C# in VS2010



I was following the simple introduction to WWF at http://msdn.microsoft.com/en-us/netframework/ff802403.aspx and I've noticed that a new C# WCF Workflow Service Application project created will then compile and run WcfTestClient.exe.  If I create the VB Version of that same project I get a Browser web page, not the WCF client. Is this a bug in the VS2010 VB bits?  How do I change the project to correctly execute WcfTestClient.exe manually in my VB Project?

Jamie Clayton http://www.jenasysdesign.com.au

Hosting WCF Service with netTcpBinding on IIS7

The article Hosting WCF Service with netTcpBinding on IIS7 was added by malav_rajendra on Saturday, September 25, 2010.

Web.Config should have following configuration settinggs to hosting WCF service on IIS7(WAS): bindings> netTcpBinding> binding name="tcpbinding" portSharingEnabled="true"> security mode="None">/security> !

Metadata publishing for this service is currently disabled Problem under IIS7



I am struggling with an issue that I haven't seen before, at least not without a simple resolution. I have seen numerous articles about this issue but I haven't found one that actually gives a solution that works and its really becoming a royal pain.

I am getting the message, "Metadata publishing for this service is currently disabled" when attempting to host my service in IIS7 on windows 7. I have only seen this problem since I migrated to VS2010 using the .NET 4 Framework.

I have adjusted my web.config file in effort of resolving the problem but to no avail. Anyone here able to help me out on this one? I am totally exhausted on going in circles for this issue.

Here is my code:

<?xml version="1.0"?>
    <compilation debug="true" targetFramework="4.0" />
        <behavior name ="MapServiceBehavior">
          <serviceMetadata httpGetEnabled="true"/>

Deploy Web Service On Different Subdomain


We have deployed a web service (ASP.NET 3.5) on http://abc.domain.com and I now want to deploy it instead on http://xyz.domain.com.  Should I be able to just copy the published files from abc.domain.com and copy them to xyz.domain.com, and then change the identity section in the webconfig for the dns value? 

Is there something else that needs to be configured if we wanted to have both web services deployed?


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend