Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6774891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:50:30+00:00 2026-05-26T15:50:30+00:00

I have developed one WCF application, and it is working as a middle layer

  • 0

I have developed one WCF application, and it is working as a middle layer between the database and my web application. Now my client wants to transfer this WCF to REST-based using ServiceStack.

I have looked around it on GitHub and tried to build a demo. I have created a start up template using NuGet, so it includes a Hello & Todo example.

  1. How can I transfer my logic as object based (DTO)? Because most of the functions I have with different parameters and return the result as a dataset.

  2. How can I make a client in C#? And which reference do I need to add?

  3. When I hosted sample application on IIS after adding the startup template using NuGet, I could not able to find any resources. Is there a specific setting I need to do when I need to host it on IIS?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T15:50:30+00:00Added an answer on May 26, 2026 at 3:50 pm

    If you haven’t already done so go through the Creating REST Services with ServiceStack presentation.

    1) If you’ve seen ServiceStack’s Hello World example it shows you that the only steps needed to do to create a web service is to just provide:

    //1. A Request DTO
    public class Hello : IReturn<HelloResponse> { 
        public string Name { get; set; }
    }
    
    //2. A Response DTO
    public class HelloResponse {
        public string Result { get; set; }
    }
    
    //3. The web service implementation that takes a Request DTO and returns a Response DTO
    public class HelloService : Service
    {
        public object Any(Hello request)
        {
            return new HelloResponse { Result = "Hello, " + request.Name };
        }
    }
    

    The above example shows all the code needed to create the Hello web service.
    You should be able to re-use a lot of your existing type and logic from your WCF method and just copy it in the Any() method.

    2) One of the benefits of ServiceStack is that you don’t need to add a ServiceReference, i.e. you can re-use the same generic Service Client and your DTOs for all your web services. e.g:

    //Using JSON:
    IServiceClient client = new JsonServiceClient("http://localhost/path/to/servicestack");
    
    //Using XML:
    IServiceClient client = new XmlServiceClient("http://localhost/path/to/servicestack");
    
    var response = client.Send(new Hello { Name = "Arun" });
    Console.WriteLine("Received: " + response.Result); 
    

    On the /metadata page there is also a link to your webservices WSDL where you could create generated service clients should you wish. However this is not the recommended approach since it requires much more friction then just using your existing DTOs.

    3) ServiceStack Web Services are already an ASP.NET application, i.e. ServiceStack is just a set of IHttpHandler’s you can configure to run inside of a normal ASP.NET or MVC web application by adding a Web.config mapping to your web applications Web.config.

    Basically you can treat a ServiceStack web service as a normal ASP.NET web application, in fact the Hello World Tutorial shows you how to do this from creating an empty ASP.NET application.

    You may also be interested in checking out The Starter Templates example projects which shows you the minimum about of setup required to configure ServiceStack to run in a variety of different hosting options, i.e. ASP.NET / Windows Service / Console Application, etc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have developed one Web Application which is running in only one server. Now
I have developed a Client/Server application for my current employer and one of the
I have developed one REST WCF and would like to client will use it
I have a web project that I developed where one of the main functions
We have three developers and one tester all working against the same database. We
I came across with this situation. I have one already developed Application in 2.0,
We currently have developed an application using WCF. Our clients make connections to different
I'm working on adding a WCF services layer to my existing .NET application. This
I have developed a WCF Service Application hosted in IIS 7.5 targeting .NET 3.5
i have developed one windows (desktop) based application which sends pdf as an attachments.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.