开发者

asp.net MVC3 App_Offline.htm : possible to return application/json header?

When you want to put your site offline.

Almost everything in our application (API) is J开发者_开发百科SON. I think it might be better to return JSON, as the programs build on top of this API expects a JSON response on all of the methods.

Is it possible to return JSON instead with the correct content type in the App_Offline.htm?


Have you tried removing the ContentType header and adding it after :

http://i2.iis.net/ConfigReference/system.webServer/httpProtocol/customHeaders

I have never done that with app_offline.htm but might work.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜