.NET     Console.WriteLine( "All Things .NET" );
.NET Nerd Blog Home
11.30.2004

 
Icon Browser Utility
Cool simple icon browser utility that will extract a given icon out of a resource DLL, etc.

Comes with .NET source code.

Kenny Kerr - Code Corner - Tools - Icon Browser


 
Regular Expression Cheat Sheet
I may have another Regular Expression (RegEx) entry on the blog somewhere, but here's a decent site, with a "cheat sheet" for quick reference.

RegExLib.com Regular Expression Cheat Sheet (.NET Framework)


11.25.2004

 
Datatips in Debugger for Custom Classes
I knew how to do this in VS6, but haven't taken the time to figure it out in VS.NET. Here it is -- how to describe what should show up in the tooltip when you mouse over an object of on of your own types in the debugger.

Debugger Tooltips for Classes


11.24.2004

 
Connection Pooling and "Timeout Expired" Exception FAQ
MSDN blogger entry talks about this problem -- we've seen this a few times at work.

Connection Pooling and "Timeout Expired" Exception FAQ - article here

In general, looks like some decent ADO.NET articles on this guy's blog.


 
Open Command Pompt as Given User
Granted this sample is using C# 2.0, but interesting to start seeing the new features. Open a command prompt as a given user.

C# sample to open command prompt for other than currently logged on user


 
Thread Abort During ExecuteReader Corrupts SqlConnection Pool
Working on some multithreaded SQL calls, and came across this.

Looks like this is an old problem, probably ok in .NET 1.1. Confirmed that my version of System.Data.dll is later than the one shown here.

FIX: Thread Abort During SqlCommand.ExecuteReader Corrupts SqlConnection Pool

Bottom line - trying to determine the ramifications of the following:
An app with a background thread is working on a long query. The user wants to close the app, but can't stop the thread cuz it's on a blocking SQL call (ExecuteNonQuery for example). The App Domain is unloaded, since all the "foreground" threads are gone. The background thread is killed (Abort is called). What happens to the SQL connection, query, etc. ??

From Thread.IsBackgroundProperty docs.
A thread is either a background thread or a foreground thread. Background threads are identical to foreground threads, except that background threads do not prevent a process from terminating. Once all foreground threads belonging to a process have terminated, the common language runtime ends the process by invoking Abort on any background threads that are still alive.





11.22.2004

 
Allow POST & GET for Web Services
(updated 6/28/05 to reflect latest 1.1 security info)

If desired, you can tweak a config file to tell IIS / ASP.NET 1.1 to allow POST and GET protocols for receiving web services calls.

Check out the <protocols> section of MACHINE.CONFIG. It shows the possible protocols that are allowed by the web service engine. By default, only SOAP is allowed. HttpPostLocalhost is added by default to allow you to test the web service with IE from the localhost.

Best way to change this is by overriding the settings in the web.config of your particular web service (so you won't affect all web services on the machine). You do this by adding or removing protocols from the list.

The default setup in MACHINE.CONFIG has HttpPost removed, and HttpPostLocalhost enabled. You can allow remote clients to use IE and do HTTP POST with the following:
<webServices>
<protocols>
<add name="HttpPost"/>
</protocols>
...
Obviously, POST or GET is non-standard for xml based web services, so use at your own risk outside of testing.

see article here

protocols config element reference is here.


11.04.2004

 
ASP.NET Apps and Web Project Nuances
Small rant by Fritz Onion (Pluralsight) about web projects in ASP.NET and their reliance on the http://localhost/ web directory.

Just sheds some light on some of the details of how these projects are setup.

ASP.NET Applications without Web Projects


11.01.2004

 
Licensed Applications using the .NET Framework
Overview of licensing for applications and controls. MSDN site only shows how to call a couple functions, doesn't give the big picture. Looks like this one does.

CodeGuru: Licensed Applications using the .NET Framework



Powered by Blogger