Debugging .NET Applications With Fiddler

If you want to debug a .NET application with Fiddler, you can force the application to proxy through Fiddler by adding this section to the application’s web.config or app.config:

<!-- The following section is to force use of Fiddler for all applications, including those running in service accounts -->  <system.net>
 <defaultProxy>
  <proxy autoDetect="false" bypassonlocal="false" proxyaddress="http://127.0.0.1:8888" usesystemdefault="false" />
 </defaultProxy>
</system.net>

Fiddler listens on port 8888 by default, but if you are on a shared system, you might run into a situation where that port is already in use by other users who are also using Fiddler.

In this case, you can easily change the port that your Fiddler is listening on under TOOLS | OPTIONS | CONNECTIONS tab:

fiddler_options

If you change the port, be sure to also change it in the proxyaddress URL in the configuration above.

For reference, here’s the relevant Fidder documentation page for this topic:

https://docs.telerik.com/fiddler/Configure-Fiddler/Tasks/ConfigureDotNETApp

 

Improving unit test coverage with NCrunch

My team has been doing a lot to improve unit test coverage lately, and one of the tools we rely on is NCrunch.

NCrunch provides real time feedback on your unit tests and coverage by running your tests in the background while you edit your code.

This provides a near instantaneous view of which lines of code are covered and what tests are failing and which lines are causing them to fail.

Check it out, it’s a great tool!

WinDirStat Utility

Is your hard drive getting full?

Ever wonder where all that space is being used?

Wonder no more! WinDirStat will show you exactly which folders contain the files that are taking up the most space on your drive.

WinDirStat Screen Shot

This is a great tool to use whenever you want to clean up your drive. It will display a sorted list of your folders and show you what percentage of space each one is using, then you can drill down into the folders to find the larger files and optionally delete them.

Great program! Check it out!

http://windirstat.info

 

Mixed Content in Internet Explorer

I spent a significant amount of time today tracking down a problem on one of our web applications.

One of our customers complained about seeing the infamous This Page Contains Both Secure and Nonsecure Items warning every time they viewed any of the site’s pages with Internet Explorer.

This page contains both secure and nonsecure items

This error occurs when you are viewing a web site over an SSL (HTTPS) connection, but there are one or more nonsecure items on the page.

In the end, our particular manifestation was due to having numerous iframe objects embedded in our pages with their src properties set to either javascript:void(0) or nothing at all.

The fix was to change all of these to use javascript:""; for their src property.

I found several resources online that were helpful in getting to the bottom of this problem:

The first is EricLaw’s excellent blog posting on the subject.

The other is this checklist for ruling out the possible causes.