Can I use the ServiceStack web service with .net 3.5

Can I use the ServiceStack web service with .net framework 3.5 web forms ?

Is it possible to have a small example, because I tried to go through https://github.com/ServiceStack/ServiceStack/wiki/Your-first-webservice-explained and stopped at "Let's look at the AppHost configuration method" and I did not know what to do ?

How did I read this as a web API, and since ServiceStack works under 3.5, so I guessed that I could use it, or did I get it wrong?

Update: The answer was that I needed to create an AppHost and add it to Application_Start :

 public class Global : System.Web.HttpApplication { public class HelloAppHost : AppHostBase { //Tell Service Stack the name of your application and where to find your web services public HelloAppHost() : base("Hello Web Services", typeof(HelloService).Assembly) { } public override void Configure(Container container) { //register user-defined REST-ful urls Routes .Add<Hello>("/hello") .Add<Hello>("/hello/{Name}"); } } //Initialize your application singleton protected void Application_Start(object sender, EventArgs e) { new HelloAppHost().Init(); } } 

Link and FULL example can be found here: http://servicestack.net/ServiceStack.Hello/

+4
source share
2 answers

ServiceStack supports .NET 3.5. You can check the assemblies in the NuGet package, they are compiled in .NET 3.5. It has nothing to do with the web API, you can create a web service from an empty ASP.NET application.

+2
source

http://www.servicestack.net/

Yes, it supports 3.5

ServiceStack binaries only: Minimum ServiceStack installation containing only core binaries (.NET 3.5+)

+1
source

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


All Articles