2

我正在尝试让 RegistrationFeature 与 twitter 和 facebook auth 一起工作。Twitter 和 Facebook 正在运行,但 RegistrationFeature 似乎不想玩。

这是我得到的回复:

响应状态
错误 CodeRequestBindingExceptionmessageUnable to bind requeststack Trace at ServiceStack.WebHost.Endpoints.RestHandler.GetRequest(IHttpRequest httpReq, IRestPath restPath) at ServiceStack.WebHost.Endpoints.RestHandler.ProcessRequest(IHttpRequest httpReq, IHttpResponse httpRes, String operationName)

这是我在 ConfigureAuth 中的代码:

var appSettings = new AppSettings();

Plugins.Add(new AuthFeature(
    () =>
        new AuthUserSession(),
        new IAuthProvider[] {
        new CredentialsAuthProvider(),              
        new TwitterAuthProvider(appSettings),      
        new FacebookAuthProvider(appSettings),
        new GoogleOpenIdOAuthProvider(appSettings)
    }));


Plugins.Add(new RegistrationFeature());

var mongoClient = new MongoClient("mongodb://192.168.0.17");
var server = mongoClient.GetServer();
var db = server.GetDatabase("Sonatribe");

container.Register<IUserAuthRepository>(c =>
    new MongoDBAuthRepository(db, true));

有什么我想念的想法吗?

4

1 回答 1

2

也发生在我身上。原来是大摇大摆没有传递整数,因为我的变量中有空间:

 [ApiMember(Name = " TrackingItemId", ......

(注意变量前的空格!)

于 2014-01-31T21:42:26.577 回答