Tuesday 15 September 2015

Returning HTTP 403 substatus from Asp.Net WebApi controller -


I want to return HTML 403 errors to my ASP.Net WebApi controllers when the user is not allowed to do anything < / P>

However, I want to use one on this to give more information about the error with error message.

For the moment, what do I get

  read HTTP / 1.1 403 use forbidden   

but what I would like to see

  HTTP / 1.1 403.2 Read the prohibition of access   

This code that I am currently using:

  [HttpGet] public Nomination Detail Details (Internal ID) {var Nomination Deposit = _context.GetEnrollmentDetail (ID); (Nomination Decree.) (New HTTPSPassemption Message (New HTTPPresPermess Message (HTPTatus Code. Forbidden) {Regeneration = "Access to Access"}}} Return Nomination;}   

I am not getting any information, where to add these sub-positions to the reaction. Can anyhow be done with the underlying classes? If not, then the custom HttpException Write What is a way of doing this for me?

That's because sub-conditions HTTP is not part of the device and should not be used. If you want to send more details about your problem, take a look at

No comments:

Post a Comment