protected override void DenyAuthorization(ICommunicationContext context) { base.DenyAuthorization(context); var header = new BasicAuthenticationRequiredHeader(realm).ServerResponseHeader; context.Response.Headers["WWW-Authenticate"] = header; }