开发者

ASP.NET - error 403 returns IIS html page instead of response text

开发者 https://www.devze.com 2023-03-15 02:36 出处:网络
I am implementing OAuth on ASP.NET and I have the following trouble. The following code from IHttpHandler implementation:

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开发者_C百科.

Any ideas?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号