2

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.

Community
  • 1
  • 1
Pingvinen
  • 65
  • 1
  • 5
  • I have the same issue - did you get anywhere with this? – gregpakes Mar 27 '13 at 08:46
  • No. For the time being we detect failed login by inspecting the error properties on the response. – Pingvinen Mar 27 '13 at 12:45
  • Hi - I asked on the ServiceStack forum and they said its a bug. See here: http://stackoverflow.com/questions/15654994/servicestack-basic-authentication-htmlredirect-is-not-respected-by-mvc-servicest – gregpakes Mar 27 '13 at 13:02

0 Answers0