Advertisement
Guest User

Untitled

a guest
Oct 30th, 2014
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. public async void OnActionExecuting(HttpActionContext actionContext)
  2. {
  3. var response = actionContext.Request.CreateErrorResponse(HttpStatusCode.BadRequest, "Something went wrong.");
  4. actionContext.Response = response;
  5. }
  6.  
  7. builder.Register(c => new CheckFilter())
  8. .AsWebApiActionFilterFor<UtilsController>(c => c.GetErrorCodes())
  9. .InstancePerRequest();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement