1

I am implementing OAuth on ASP.NET and I have the following trouble.

The following code from IHttpHandler implementation:

response.Write("XXX); response.StatusCode = 403; response.ContentType = "text/plain";

should return "XXX" with status 403. Instead I get default IIS 403 error page in html format.

Both IIS7 and Cassini have the same issue.

Any ideas?

bh213
  • 6,343
  • 9
  • 43
  • 52
  • possible duplicate of [IIS7 Overrides customErrors when setting Response.StatusCode?](http://stackoverflow.com/questions/434272/iis7-overrides-customerrors-when-setting-response-statuscode) – Eric J. Dec 06 '14 at 19:34

0 Answers0