Friday, April 24, 2015

A better way to view and debug ASP.NET Cookies

If you have to write Cookies to the browser using ASP.NET, you may be searching for a better way to debug your ASP.NET Cookies to make sure they are written out correctly and work as expected.

Well, fortunately, all of the major browsers offer an excellent way to easily debug and view these Cookies.

When you install an add-on such as Firebug for Mozilla Firefox and you click on the Network tab, you can view the individual cookies for a particular request:

Similarly, when you click on the Resources tab in Google Chrome's Developer Tools and then navigate to the menu item for Cookies, you can see the individual Cookies for a particular website:

While Internet Explorer's Developer Tools functionality is not nearly as intuitive, it can also be used to view your Cookies by ensuring that you are currently capturing Network traffic and then clicking on Network-->Details:

Now you can easily troubleshoot any issues you encounter with ASP.NET Cookies!!

No comments:

Post a Comment