Does Glimpse work on actions that return JsonResult?

回眸只為那壹抹淺笑 提交于 2020-02-21 05:52:46

问题


I've got an app where most of the heavy lifting is in actions that each return a JsonResult. They're called by jQuery from a simple view.

The requests show up in the Ajax tab in Glimpse, but as each request completes it gets scored through and greyed out. I'd like to inspect each of those ajax requests and see the Glimpse information for them -- the MVC routing, execution, binding, trace output, etc. Is that possible?

(I'm using Glimpse v0.81)


回答1:


By default Glimpse data is only generated for certain content types. (text/html)

In the section of your web.config you can add application/json (or whatever content type you are returning) and Glimpse will begin to provide all of the server metadata you are looking for.




回答2:


Normally Glimpse supports AJAX requests but FireBug and Developer tools in Google Chrome seems a better suited tools for inspecting them.



来源:https://stackoverflow.com/questions/6062352/does-glimpse-work-on-actions-that-return-jsonresult

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!