我正在尝试使RegistrationFeature与Twitter和Facebook Auth一起使用。 Twitter和Facebook正在工作,但是RegistrationFeature似乎不想玩。
这是我得到的答复:
响应状态
错误CodeRequestBindingExceptionmessage无法在ServiceStack.WebHost.Endpoints.RestHandler.ProcessRequest(IHttpRequest httpReq,IHttpResponse httpRes,字符串operationName)处绑定ServiceStack.WebHost.Endpoints.RestHandler.GetRequest(IHttpRequest httpReq,IRestPath restPath)的请求堆栈跟踪
这是我在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));
有什么想法我想念的吗?
最佳答案
也发生在我身上。原来是因为没有在变量中留有空格,所以才没有通过整数:
[ApiMember(Name = " TrackingItemId", ......
(注意变量前的空格!)
关于c# - Servicestack RegistrationFeature无法绑定(bind)请求,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/18213620/