Quick ADO.Net Tip

If you need to stop a datareader in the middle, instead of at the end, you have to call cancel on the command object. Calling the Close() method will result in a timeout exception.

using (SqlCommand cmd = new SqlCommand(sql, conn))
{
          XmlReader reader = cmd.ExecuteXmlReader();
          reader.Read();

while (!reader.EOF)
{
            if (this.Cancel)
            {
                cmd.Cancel();
                reader.Close():
                break;
            }
            holder = reader.ReadOuterXml();
}
}
Posted: Monday, November 10, 2008 4:47:04 PM (Eastern Standard Time, UTC-05:00)  #    Comments - Trackback
.Net 2.0

Getting Started with WCF and REST

Now that WCF has support for REST in .Net 3.5, it's time to get learning....

WCF REST Starter Kit

A Guide to Designing and Building RESTful Web Services with WCF 3.5

A bunch of screencasts by Aaron Skonnard

WCF and REST from the PDC

Dan Rigsby - REST support in WCF

Posted: Tuesday, November 04, 2008 12:58:09 AM (Eastern Standard Time, UTC-05:00)  #    Comments - Trackback
.Net 3.5 | WCF

Out of the blue....

I posted my Day of .Net presentation (PowerPoint slides) on SlideShare. Apparently they have an editorial board that picks presentations to highlight on their home page, and they picked mine! I had no idea they even did this. I tried a new presentation format (thanks to Josh Holmes), and apparently it's working out well.

[Originally posted at http://www.dotnetjunkies.com/WebLog/davetrux/archive/2008/10/23.aspx]

Posted: Thursday, October 23, 2008 3:56:07 PM (Eastern Standard Time, UTC-05:00)  #    Comments - Trackback
Speaking

Day of .Net Presentation Resources

Thanks to everyone who attended my talk! Here's some links related to the talk:

My PowerPoint Presentation hosted on SlideShare

Debugging Tools for Windows web site / download WinDBG

IIS Resource Kit (TinyGet)

LogParser for querying IIS log files

FireBug

YSlow

John Robbins' book on .Net 2.0 Debugging

 

Good blog posts on WinDBG

A Big List of Debugging Resources

Getting Started with WinDBG Part I

Getting Started with WinDBG Part II

Debugging Demos

 

[Originally posted at http://www.dotnetjunkies.com/WebLog/davetrux/archive/2008/10/21/536761.aspx]

Posted: Tuesday, October 21, 2008 3:01:32 PM (Eastern Standard Time, UTC-05:00)  #    Comments - Trackback
Speaking

Speaking at Day of .Net in Ann Arbor, MI

I am giving a talk at the next Day of .Net in Ann Arbor. I am giving a talk entitled "Beyond Breakpoints: Debugging and Troubleshooting". Basically I will be talking about finding bugs and performance problems, looking at techniques that go further than setting a breakpoint and stepping through some code.

Sessions have been posted and registration is open!

 

[Originally posted at http://www.dotnetjunkies.com/WebLog/davetrux/archive/2008/9/29.aspx]

Posted: Monday, September 29, 2008 2:00:31 PM (Eastern Standard Time, UTC-05:00)  #    Comments - Trackback
Speaking

Day of .Net in Ann Arbor

Day of .Net in Ann Arbor this fall is on October 18th:

Day of .Net October 18, 2008 - Be there!
Posted: Monday, September 08, 2008 3:55:49 AM (Eastern Standard Time, UTC-05:00)  #    Comments - Trackback

Snipping Tool - A Vista Enhancement for Developers

Saw a great post about the Snipping tool in Vista: The Blog at the End of the Universe : Why Vista? (Volume 4 -- Snipping Tool). For an old-time Alt+Print Screen guy, this thing is great. But the first time I looked for it, it wasn't there (I'm using Vista Business). I guess by default it isn't always installed, but it is available, there is an article describing how to activate the Snipping Tool at PCWorld.

Posted: Friday, August 08, 2008 1:05:09 AM (Eastern Standard Time, UTC-05:00)  #    Comments - Trackback
Tools

A Cool IE HTML/CSS Trick - Conditional Comments

I am continually humbled by the amount of stuff I don't know in the areas where I generally feel good about my level of knowledge....

Today I learned about conditional comments. This is an IE specific trick, but in my case I'm trying to have different CSS for a certain class so it behaves properly in IE6 and standards compliant browsers. The problem is using .png files that have transparency. IE6 totally botches .png files. But it turns out there is an IE-specific filter (progid:DXImageTransform) that causes IE6 to render a .png properly. An older article at A List Apart describes how to use it, along with conditional comments.

Conditional comments allow IE to display the content between the comments based on an expression. In this case, the expression is testing for the browser version:

<!--[if IE 6]>
<link  rel="stylesheet" type="text/css"   href="ie6.css" />
<![endif]-->

So this code snipped would cause IE 6 to load this custom stylesheet. IE7 interprets the comment correctly and doesn't load the stylesheet. Other browsers interpret this as a comment and ignore it. Very nice.

Posted: Thursday, August 07, 2008 3:49:16 AM (Eastern Standard Time, UTC-05:00)  #    Comments - Trackback
ASP.NET