开发者

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

开发者 https://www.devze.com 2023-04-07 08:08 出处:网络
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

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

精彩评论

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