Thursday, 21 March 2013

Debugging Multithreaded C# Applications

You need:

Debug -> Windows -> Threads.

Note that the Threads Debug window is not available in Visual Studio Express Edition.

Does Python have any place in the .NET programming maelstrom?

Good for prototyping on paper; reasoning things out - especially very complex or mathematical algorithms - good short and clear syntax. Best language for algorithm expression. But for mainstream development, stick to C# (or C++ for specific purposes).

System.Threading.ManualResetEvents

Implement blocking waits

Used to notify one or more threads that an event has occurred.

WaitOne(timespan) - blocks current thread until it receives a signal within the timeout interval.

Resharper and Visual Studio Shortcuts

Find Usages

What's the FASTEST way to do "Find Usages" in Visual Studio?

Shift F12 (Resharper)
Cntrl-K Cntrl-R (Visual Studio shortcut)

MSVC shortcut is quicker. You can type: Cntrl K and Cntrl R, or just Cntrl-K-R (3 keypresses).

Go to next member

Alt-UP, Alt-DOWN (Resharper)

Find Type 

Cntrl-T (Resharper)

Find File or Folder  

Cntrl-Shift-T (Resharper)

Duplicate a Line

Cntrl-D

Tuesday, 19 March 2013

IIS 7s Managed Module Architecture

IIS 7 (and above) has its functionality divided into managed modules (a.k.a. assemblies). The assembly can contain .NET code or Win32 code ("native code"). Functionality can be extended by creating custom managed modules.

The Future of ISAPI in IIS version 7.0 and Above

ASP.NET applications now run completely in IIS 7.0 without using ISAPI extensions that run in an "ISAPI process" - although this is still supported when running a web application  in "Classic Mode" (rather than "integrated pipeline" mode). "Classic Mode" can be used for compatibility with older applications.

Good Books to learn Microsoft Web Technology

"ASP in a Nutshell" (published in 2000 by O'Reilly) is a good introduction to the "pre-.NET" web programming era. Certainly it is worth reading just to know the concepts that led to more fancy ASP.NET and all the other technologies that followed.

"Professional IIS 7.0" (published in 2008 by Wrox) is an awesome introduction to the new features in IIS 7.0 and what sets this ground-up rewrite apart from previous versions of Microsoft's flagship web server product.