June 2004 Blog Posts

Walkthrough: Localizing Web Forms Pages

It took me a bit of MSDN spelunking to find it, so here's a direct link: Walkthrough: Localizing Web Forms Pages

Once upon a time in Mexico, a quick review

The movie sucked. The featurettes are really really interesting (and worth the rental), especially if you have any sort of interest in film-making or the application of technology to the creative process.

VS.Net 2005 May CTP, Membership PasswordRecovery

There is a bug in the May CTP bits of Whidbey that prevents the PasswordRecovery control from properly doing its magic. Specifically, it can't send an email because the SmtpMail class that this control relies on has some broken logic when it comes to reading the name/address of the SMTP server from the config file. The symptom is a COM error relating that the “SendUsing” configuration value is not defined. To fix this problem, make sure you set the value of the SMTP server in your code. (something like SmtpMail.SmtpServer = “localhost”;) Then, things will work like a charm. Of...

VS.Net 2005 May CTP, adding assembly reference to Web project

I couldn't find a way to add an external project reference to my Whidbey web project, so I googled for answers. Instead, I found that Matt Hawley, among others was having the same problem. Well, Matt hasn't looked hard enough! :-) The answer is right there in the Readme: 13.19. The Add Reference button in property pages dialog boxes does not work  Steps to reproduce: Start Visual Studio 2005. Create a new Web site.Right-click the Web project in Solution Explorer and click Property Pages on the shortcut menu.Click Add Reference.Nothing happens.   To resolve this issue   To add a reference to a managed assembly: Create a /Bin...

I hope Whidbey MembershipProvider API changes before release

I started looking closer at the upcoming provider model in ASP.NET 2.0 and found some troubling patterns in current incarnation of the API (as of the May 2004 CTP). One example is MembershipProvider.ChangePassword method with the following signature: public abstract bool ChangePassword( string name,  string oldPassword,  string newPassword); Can anyone spot a problem? I'll give you a hint, look at the return type. Now, without looking at the docs, can you tell me without a shadow of a doubt what that boolean value indicates? I didn't think so. In this case, the API follows the old C convention of returning a boolean value to...

Wesner on the evolution of code editors, part 2

Wesner responded to my previous comment and pointed to an article describing SCID, Source Code As Database concept. I've also taken a look at the old Lutz Roeder presentation (MS PowerPoint) where he is toying with similar ideas. In the end, I think we are agreeing more than we are disagreeing. That is to say, that having the IDE become intimately aware of the code that is being created within it is a great thing. However, and this is a biggie for me and I think is the point where Wesner and I part ways: I want the IDE to use...

Wesner on the evolution of code editors

Wesner Moise wrote a post predicting that code editing capabilities in VS.NET 2005 will be behind the competition by the time it ships. I agree with the premise but disagree with the analysis. Wesner asserts that the advent of macro-less, easily parsable languages like C#, VS.NET, and Java opens the door for IDE's to work with parse trees. He correctly points out the benefits of this that will come through IDE intelligence about code (rather than just text). But then he goes off the deep end predicting that developers will work with a graphical representation of this parse tree directly. I just don't see...

.NET String.Replace() performance uncovered

In a previous entry I ran into some unexpected results with the performance of String.Replace() in .Net Framework 1.1. Upon further digging, it turns out that Replace is only fast when the input string does not contain the string (or character) that is intended for replacement. When the string does contain it, the performance of CleanString class drops, and, as expected, the character array exhibits better perf. So here's an updated bit of code that behaves no worse than original when there is nothing to replace and better than original when there is cleaning to do: ...

Unexpected string performance in .Net 1.1

A project I started recently centered around improving performance of some existing code. My first inclination was to scan the code for obvious low hanging fruit and one of the first methods I hit upon was this: 1: public static string CleanString(string Text) 2: { 3: // cleans a string for fuzzy matching 4: // trims white space, and removes numbers 5: 6: Text = Text.Trim(); 7: Text = Text.Replace("0",""); 8: Text = Text.Replace("1",""); 9: Text =...

Missing VSS menus in VS.NET 2003

I opened up VS.NET 2003 today and realized that the Source Control menus were nowhere in sight. So if that happens to you, quick tip: register the SSSCC.dll and everything will be OK again. First, locate SSSCC.dll on your machine, typically located in the win32 folder of your Visual SourceSafe installation. Then open a command prompt in that folder and run the following command “regsvr32 ssscc.dll”. Restart VS.NET and all should be well. Good luck!