Thursday, March 27, 2014

Fiddler and Asp.Net

Ran across this today, just a handy item to know.  I use Fiddler a lot of debugging web programming.  Today I needed to use to to debug some Web.Request conversation.  For the most part I write everything out to log files and it contains what I need.  But, I was dealing with a tech support organization who really wanted Fiddler output.


http://weblog.west-wind.com/posts/2009/Jan/14/Monitoring-HTTP-Output-with-Fiddler-in-NET-HTTP-Clients-and-WCF-Proxies

So, even though I have libraries to man-handle the Web.Requests the following entry in the web.config file allowed Fiddler to see the conversation.  No code change!

  <system.net>
    <defaultProxy>
      <proxy
              usesystemdefault="False"
              bypassonlocal="True" 
              proxyaddress="http://127.0.0.1:8888"              
              />
    </defaultProxy>
  </system.net>
 
If you forget and don't have Fiddler running, you can get the following error
System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:8888
 
 


Thursday, March 13, 2014

Handy App Pool info - 32bit vs 64 bit

We process a lot of huge document so to be able to run in 64 bit mode and use more than 4GB of memory is kind of important.

Trying to figure out which app pools are actually running in 32-bit mode

appcmd list wp

Then go into Task Manager, show processes for all users. If the PID doesn't show up then View | Select Columns | check PID

The processes that have a *32 next to the name are the ones running in 32 bit mode.

So, w3wp.exe *32 is running in 32 bit mode

How to solve that...

Go into the IIS Manager, find the Application Pools, right click | advanced settings | Enable 32-bit application = False.

You must compile your application in 64 bit mode or AnyCPU.  Here is a really good explanation for
moving-asp-net-web-application-from-32-bit-to-64-bit