ServiceStack full noob tutorial

I completely struggled with the utility program. I followed a lot of tutorials that I found on google and nobody works, even the simple hellotutorial does not work. Even the servicestack tutorials generate errors in my VS project and do not work at all. In addition, none of the examples deployed in the github servicestack examples work. I am using Windows 8 and I am a complete noob since VS 2012. I have IIS 8 and .Net 4.5 installed. I always get 404 errors or 500 or even parsing errors. I think about documentation that is not being updated, or configurations that change a lot with respect to new versions of the utility. I really do not know. Can a good soul help me establish a simple API to work with the latest version of the service program (4.0.10) and VS 2012?

Anyway, thanks.

+4
source share
1 answer

The easiest way to get the full ServiceStack TODO app:

1) Create a new ASP.NET Empty Web Application

2) Install ServiceStack.Host.AspNet and ServiceStack.OrmLite.SqlServer

PM> Install-Package ServiceStack.Host.AspNet
PM> Install-Package ServiceStack.OrmLite.SqlServer

3) Press Ctrl + F5 to launch the application

4) After playing with the TODO app, browse the page http://localhost:{port}/metadata

5) Play with services, for example http://localhost:{port}/todos

6) Look at the source to see how ServiceStack integrates, the main parts are:

  • App_Start / AppHost.cs (setting ServiceStack AppHost)
  • App_Start/WebServiceExamples.cs ( Hello Todo)

, ServiceStack .

+3

Source: https://habr.com/ru/post/1526945/


All Articles