I am running ServiceStack 3.9.37 on Mono. I only use it as a webservice (no views etc).
I have a custom auth provider.
When authentication fails due to invalid credentials, ServiceStack redirects the response to login.aspx.
The authentication is configured like so
this.Plugins.Add(
new AuthFeature(
() => new AuthUserSession(),
new IAuthProvider[] {
new UserProfileCredentialsAuthProvider(),
new AdminUserCredentialsAuthProvider()
}
)
{
ServiceRoutes = new Dictionary<Type, string[]> {
{ typeof(AuthService), new[]{"/auth", "/auth/{provider}"} }
},
HtmlRedirect = null
}
);
This is basically the same question as When ServiceStack authentication fails, do not redirect? but I am running on Mono and do not have any Membership stuff at all.
EDIT:
Forgot to mention that I am calling my service using the Chrome extension "Simple REST client", and I am using application/json as Accept and text/json as Content-Type.