ServiceStack 3.9. * Until 4. *

I am trying to change ServiceStack in my service from 3.9.43 to 4.0.9.

I had to change a few things in my code and basically followed the release notes for this .

There were a few strange things for me, such as the fact that I did not find anything that could replace ServiceStack.WebHost.Endpoints or AppHostHttpListenerLongRunningBase, but I was able to verify these things and was able to compile my code.

The problem is that when I run my code, I get this exception at the very beginning, and it just kills the service:

The method 'ExecuteMessage' in type 'ServiceStack.Host.ServiceController' from the assembly 'ServiceStack, Version = 4.0.9.0, Culture = neutral, PublicKeyToken = null' has no implementation.

I get this when I hit the base:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ServiceStack;
using ServiceStack.Text;
//using ServiceStack.WebHost.Endpoints;
using ServiceStack.Web;


namespace ThisService {
    public class AppHost : AppHostHttpListenerPoolBase { //AppHostHttpListenerLongRunningBase {
        public AppHost(int wthreadMax)
            : base("This Service " + VcsInfo.ChangesetId, wthreadMax, typeof(ThisService).Assembly) {
        }
 ...

: ServiceStack (4.0.9.0); ServiceStack.Client; ServiceStack.Common; ServiceStack.Interfaces; ServiceStack.Text

, - , 4. * , Execute, , . , ?

, : get json → math + stuff → return json.

, , , 3.9.43 4.0.9 ( , , ), , .

+3
3

v4.10

ServiceStack v4.10, NuGet , . NuGet .


NuGet, , , , , ServiceStack, :

PM> Install-Package ServiceStack -Version 4.0.9

, :

<package id="ServiceStack.Client" version="4.0.3" targetFramework="net45" />
<package id="ServiceStack.Common" version="4.0.3" targetFramework="net45" />
<package id="ServiceStack.Interfaces" version="4.0.3" targetFramework="net45" />
<package id="ServiceStack.Text" version="4.0.3" targetFramework="net45" />

. , ServiceStack , , .

, ServiceStack , , NuGet NuGet Package :

PM> Update-Package

v4.02 ServiceStack ( ) ServiceStack.Interfaces Web.config, , . .

+4

. v4 Nuget .

, , 4.0.4:

install-package servicestack -Version 4.0.4

4.0.5, , -

Method not found: 'Void ServiceStack.Web.IResponse.set_Dto(System.Object)

4.0.6 , , RGPT.

, 4.0.4, - , , . ServiceStack , ;)

: ServiceStack, , . mythz . nuget , web/config/app.config, , - bindRedirects - , :

+2

. , -, . , Beta , .

NuGet , . , ServiceStack v4.0.x , - ( ).

What I did to solve it:

  • Remove all ServiceStack dependencies from solution via NuGet
  • Removed the Nuget Solution folder / packages and re-import it using NuGet Package Recovery.
  • Re-added ServiceStack links through NuGet and checked "packages.config" for the correct versions
0
source

All Articles