Jeff and .NET

The .NET musings of Jeff Putz



My Sites


February 2006 - Posts

Why must Microsoft tools work against me?
Let me say that Visual Studio 2005 is a huge step forward in a lot of ways, especially for Web developers. What still sucks though is database handling quirks.

For example, I just want to open a query window against a SQLEXPRESS database in my Web project and fire off some SQL. You know, the way we did in the old days. I want to create a table from SQL commands, and it tells me, "The CREATE TABLE SQL construct or statement is not supported." Then below that is says the query can't be represented graphically in the diagram and criteria plane. Well no shit, that's why I turned it off.

So then I figured I'd fire up SQL Management Studio and just attach to the database. Yeah right. I try to attach to the file, and the file dialog doesn't let you type in a path, and won't navigate beyond the user name in the Docs/Settings folder (I happen to have the project on a desktop folder).

I eventually went back to the VS IDE and did a mass check-out from source control, and suddenly the table create query runs. That's not surprising since the database is probably read-only while checked-in, but why didn't VS tell me that instead of telling me CREATE TABLE isn't supported?

Nothing annoys me more than fighting the tools for ridiculous amounts of time to do simple things. And that's the way it always is with Microsoft tools. Usually 95% of what you do is powerful and easy, but then you lose all of that saved time with dumb shit like this.
Posted: Feb 25 2006, 02:41 PM by Jeff | with 5 comment(s) |
Filed under:
Unit testing programmatic web.config edits
Perhaps there's some easier way with VSTS's testing, but because I know not everyone has that, I'm trying to write unit tests for the programmatic manipulation of web.config data.

So on one hand, you've got...

System.Configuration.Configuration config = System.Web.Configuration.WebConfigurationManager.

in your configuration editing junk. Works like a champ when you call Save() on that object. The problem is that HttpRuntime.AppDomainAppVirtualPath has no value in a unit test. The weird thing though is that you can call the above code from the test and call it's Save() and it throws no errors. It sure thinks it's saving some config data somewhere, but I can't figure out where.

I know I'm being nutty here, but I really want to be able to test this stuff. Any suggestions?

EDIT: Actually, the test is manipulating web.config in the C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG folder. That's odd.
Posted: Feb 24 2006, 10:55 PM by Jeff | with 5 comment(s)
Filed under:
Really crappy book sales

My publisher tells me that, despite a lot of good press and strong reviews, my book hasn't sold particularly well.

That's so frustrating... because throughout the editorial process there was a lot of relief that a book like this was finally being written. And with all of the people out there that I've interviewed that are in dire need of a book like it, the publisher did a pretty shitty job of getting the word out to them.

It's not about the money. It never was. I quit my job at the time I wrote the book because it wasn't about the money (I was billing huge dollars at the time). I felt that I was doing something that was really going to help people who could learn from my own weird career path.

I suppose this is largely an issue of perspective, or my lack thereof. I've had a ton of e-mail from people that liked the book. The reviews are mostly positive. Headhunters love seeing it on my resume. I suppose I could blame the publisher. I don't know. I'm just really annoyed about the whole thing. It's often hard not to evaluate yourself on some level using external metrics.

Posted: Feb 22 2006, 08:22 PM by Jeff | with 14 comment(s)
Filed under: ,
Due to caching and moderation, it may not be displayed right away.
We have an internal CS blog here at my current gig. You get this when you comment:

"However, due to caching and moderation, it may not be displayed right away."

Am I the only one troubled by this as being generally bad form? In techie circles, sure, whatever, I can deal with that, but would John Q. Pornsurfer care about the technical implementation? And even if they did, why wouldn't the update cache-bust the data anyway?

Maybe one of the Telligent folks can explain the thinking on this.
Posted: Feb 22 2006, 10:36 AM by Jeff | with 11 comment(s)
Filed under:
How do you unit test an HttpModule?
I would think that blasting through Google I could find an answer to this, but I'm not finding anything useful at all. How does one unit test an HttpModule? I can't imagine that it's not possible. I'm not sure how to fire off and test the various events or simulate the request/response lifecycle.
Posted: Feb 21 2006, 04:23 PM by Jeff | with 7 comment(s)
Filed under:
File change behaviour in v2 not so good
As you'll see in this post from Scott, app restarts now occur whenever you add or delete a folder. That's bad news. I know of at least one application that I've written that has to add or remove folders from time to time.

We should be able to turn this off. It seems like an arbitrary and not well thought out change.
Posted: Feb 21 2006, 01:13 PM by Jeff | with no comments
Filed under:
What don't you get about AJAX and Atlas
So if you're scratching your head and wondering what AJAX and Atlas has to do with you, I'm curious to know what it is that you feel you need to learn. There are no wrong answers.
Posted: Feb 17 2006, 02:43 PM by Jeff | with 3 comment(s)
Filed under: ,
Today's "up yours" note to Microsoft

Even though I develop software on Microsoft's platform, I'm still astounded at some of the stupid things they do. Now they're saying that you can't use your Windows license on a new motherboard when you upgrade.

That's stupid. What moron in Redmond thinks this is OK? Since I bought Windows XP, I've had three motherboards. You know what happened to the old boards? They were banished to my closet, where they still sit. You mean to tell me that the software I paid for is now tied to that hardware?

What a joke.

Posted: Feb 16 2006, 01:38 PM by Jeff | with 20 comment(s)
Filed under: ,
More confusion about custom Membership and Profile providers
OK, so help me out here. I was looking at the default system-generated database, and it stores the membership user reference for the profile table as uniqueidentifier. How can it do that if the current Membership provider uses some other data type? As I mentioned in my last post, I don't understand how this can be. MembershipUser.ProviderUserKey is an object, so it can take anything. It's not limited to guid's.
Posted: Feb 16 2006, 01:20 PM by Jeff | with 2 comment(s) |
Filed under:
What happened to
What happened to I decided to post my last blog entry to the forum there, and I can't even scroll down the forum list using Firefox and the fastest currently available Intel CPU. I know Paul mentioned this a few weeks ago, and now I'm seeing the same thing. It won't scroll "like butter" as Steve Jobs would say.
Posted: Feb 15 2006, 03:20 PM by Jeff | with 8 comment(s)
Filed under: ,
More Posts Next page »