1
저는 HelloWorld처럼 간단한 서비스를 만들려고합니다. 그러나 AppHost을 던지고있다 :간단한 서비스에서의 ServiceStack 예외
Method 'Add' in type 'ServiceStack.ServiceHost.ServiceRoutes' from assembly 'ServiceStack, Version=3.9.4.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
코드 :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.SessionState;
using ServiceStack.WebHost.Endpoints;
using Funq;
namespace Eagle
{
public class Global : System.Web.HttpApplication
{
public class TestAppHost : AppHostBase
{
//Tell Service Stack the name of your application and where to find your web services
public TestAppHost() : base("Test Web Services", typeof(TestService).Assembly) { }
public override void Configure(Container container)
{
//register user-defined REST-ful urls
Routes
.Add<Test>("/test")
.Add<Test>("/test/{Name}");
}
}
protected void Application_Start(object sender, EventArgs e)
{
try
{
new TestAppHost().Init();
}
catch (Exception ex)
{
}
}
}
}