Fiddler Tool and ASP.Net Applications
I have been working with one project in ASP.Net for quite long time. Most of the time, I see my colleagues fixing some problems by debugging .Net code. It is a very good way to understand application codes and .Net classes and objects. But what I feel is that Asp.net developers should equally try to know browsers they are using. When we come to browser, there comes HTTP protocol, GET/POST methods, headers, session, cache, cookies, content-type, status codes, etc. And we know all these objects are not far from Asp.net web pages or say request and response. If we know and take care of these things while debugging the application, I am sure we can save lots of time to fix the problems.
Fiddler tool can be used to know details of HTTP web request, response and many other objects that are part of web pages and browsers. Fiddler is an HTTP Debugging Proxy which logs all HTTP traffic between your computer and the Internet. But while debugging Asp.net application with Fiddler, one should not use ‘localhost’ as the machine name in the address bar; we have to use computer name or IP address.
One thing that I found very useful about this tool is HTTP response status codes returned for all the requests made. And of course, its capability to show Parent Request, Child Requests and Duplicate Requests of any content-type. One can see from the figure shown below.Fig 1: Fiddler used to capture HTTP traffic
When we look at Result column on the left grid, we may see mostly 200, 204, 301, 404, 501, etc. like numeric codes. These are nothing but HTTP response status codes returned for each content or request type. These status codes have different meaning. I would like to summarize here in brief.
Status Codes Summary to remember:
|1xx Informational||Request received and continuing the process|
|2xx Success||Client request successfully received, understood and accepted|
|3xx Redirection||Generally URL redirection|
|4xx Client Error||Request contains bad syntax, IIS permissions, wrong paths of any content|
|5xx Server Error||Server error when request arrived|
1xx can be 101 or 102. Similarly, 2xx can be 204 or 206. The post fix xx will be always some numbers as recognized by HTTP standard. These results can be really helpful in debugging scenario when web pages have rich contents.
Fiddler tool is very user friendly and one will always like to use it.CodeProject