…it is in the sql server kb folder called kb 914595
October 7, 2006
TreeView Render Speed
Here is a quick tip when doing large updates and adds to the Windows Forms Treeview control. Use the beginupdate() method to “turn off” rendering and then after your changes are complete use the endupdate() method to turn rendering back on which will then render all of your changes.
Sometimes it is necessary to do this for a control that doesn’t have these wonderful methods but no to worry you can easily derive a control, add your own “flag” variable and then just override the OnPaint method and if your variable is set to not render then simply return from OnPaint. I have also added the Begin and EndUpdate methods below for setting the variable. If you want to force the control to repaint then you can call EndUpdate( true ). Here is a sample :
public class FastDrawTreeView : System.Windows.Forms.TreeView
{
private bool _disableRendering = false;
public void BeginUpdate()
{
_disableRendering = true;
}
public void EndUpdate(bool redraw)
{
_disableRendering = false;
if (redraw)
this.Refresh();
}
protected override void OnPaint(PaintEventArgs e)
{
if (_disableRendering)
return;
base.OnPaint(e);
}
}
July 29, 2006
ASP.NET 2.0 where are my references!!!!
ASP.NET 2.0 web projects have references but don’t show them as a ’References’ folder in the project. This might be a preference setting buried somewhere in the options page but for now it is easy enough just to right-click the project and choose the menu item ‘Property Pages’. You will get a screen like below where you can manage both project and web references.

July 27, 2006
Usability and ASP.NET Site Navigation
I recently started looking into ASP.NET Site Navigation and the sitemap controls. Orginally, discounted the sitemap control as something you would drop on a page called sitemap and never touch again but boy was I wrong. Site Navigation is an entire API for controlling site naviation in a consitent and near drag and drop manner. And as usual, the 2.0 team hit another home run witht he Provider model allowing you to drive your Sitemap data from any source (XML out of the box but there are already multiple SQL implementations but my favorite is Jeff Prosise’s found here for MSDN magazine). So what does this have to do with Usability? Well, today I noticed something very related to Usability in the real world and it immediately hit me that we as developers make the same mistake all the time. What cardinal Usability sin am I talking about? Don’t put it there if I am not supposed to use it! I noticed an irate man yanking on a fancy, obvious door ‘pull bar’ and in small print next to it was printed ‘Push’. Sure it makes for a great joke and even a classic Far Side but this really is a design/usability error! Why wasn’t there a flat panel that said ‘Push’ on it? Why the pull bar!!! Ok so what does this have to do with Site Navigation….well, only the coolest feature in my opinion:
ASP.NET 2.0’s site navigation provides a feature called security trimming. When obtaining site map information with security trimming enabled, only those site map nodes that the currently logged on user has authorization to visit are available. That means the site’s TreeView or Menu will contain just those sections accessible by the currently logged in user.
I pulled this from a great series on Site Navigation here
Really all you have to do is turn on SecurityTrimming in the web.config as shown below:
<siteMap defaultProvider=”XmlSiteMapProvider” enabled=”true”>
<providers>
<add name=”XmlSiteMapProvider”
description=”Default SiteMap provider.”
type=”System.Web.XmlSiteMapProvider”
siteMapFile=”siteMapFileName”
securityTrimmingEnabled=”true” />
</providers>
</siteMap>
That’s it! Of course you have the ability to override for certain items but I’ll leave that as an exercise to the reader. Now all we need is a good visual studio Add-In to generate a sitemap file or SQL database script from my current website project…I guess I better get that project started!
July 26, 2006
Web Parts Manager personalization without SQLExpress
Earlier I posted about wanting to put personalization on a separate SQL instance (not local). Well, this gives me a chance to say thanks to the MSDN2 team for making more information available in .NET 2.0. I was a little worried during the BETA because of so many empty pages but MSDN is loaded with good information and plenty of walkthroughs! There is even a MSDN WIKI found here . OK here is the answer I promised:
Personalized settings are not tied to a single browser session. Because they are stored in long-term storage, the application can retrieve a user’s settings each time the user visits a specific page.
Personalization uses an ASP.NET application services database to store personalization data. By default, ASP.NET creates this database automatically in a subfolder named “app_data” when an ASP.NET application first uses personalization or one of the other application services such as roles, membership or profiles. Also by default, ASP.NET creates the database as a single SQL Server Express database file that contains the database schema for all of the application services. Using the Web.config file, you can configure your application so that a separate database file is created for personalization. Further, in the Web.config file, you can specify a SQL Server database to store the application services data instead of using the default SQL Server Express database file.
The mechanism for storing and retrieving personalization data consists of a provider component and a data store. ASP.NET includes a default Microsoft SQL provider and database. You can also create a custom provider and configure it to use any data store. (THANK GOD! gotta love the new provider model)
essentially this is the web.config section you need under <system.web>
(the MSDN entry is here for the element)
<webParts><personalization ><providers>
<remove name=“AspNetSqlPersonalizationProvider“ />
<add connectionStringName=“my_connection_string” name=“AspNetSqlPersonalizationProvider“
type=“System.Web.UI.WebControls.WebParts.SqlPersonalizationProvider” applicationName=“/“/>
</providers></personalization></webParts>
Some of this was information was found in a really good article on personalization here .
technorati tags:asp.net, web parts, personalization, sqlexpress
odd sql 2005 connection error
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 – Error Locating Server/Instance Specified)
If all else looks correctly configured then this might be a control using personalization that uses SQLExpress by default. An example of such a control is the WebPartsManager, this control is a wonderful control in ASP.NET 2.0 and allows for the web part behavior on a page but if you enable the personalization in the properties screen (default is enabled) then this control will attempt to use SQLExpress to store its personalization info. This might be fine for some sites but not everyone wants to run SQLExpress in production so I disabled personalization for now until I can figure out how to point personalization to a SQL Instance on another server. I’ll post that as soon as I figure it out, in the meantime if anyone has the answer please fill me in.
July 20, 2006
Search Engine Optimization and Keyword Choice
I learned a funny lesson today that would seem obvious but might be helpful to repeat. When we create .NET websites especially outward facing, commercial sites we try to squeeze every last bit of Search Engine Optimization in order to get the almighty Google page rank up but is this always the best approach? Case in point, I am creating a site for a local car company from my home town that specializes in Dodge vehicles and the purpose of one page is to attract Dodge Caravan buyers. I worked overtime to get this page optimized for the word “caravan”, perhaps I should have been more specific….

June 13, 2006
Visual Studio Fonts & Colors
I recently re-installed my system and was going to setup my fonts & colors but thought I would do a quick Google to see how other people have setup their Dev environment. I found this link on Roland Weigelt's blog and he even included his settings for download if you want to try them out! Here is the link:
http://weblogs.asp.net/rweigelt/archive/2006/01/17/435736.aspx
My original settings are a little different from this. I prefer the dark interface but I am going to give it a try as I like his use of bold and font choice. I will probably settle for a hybrid but atleast I have a settings file to start from. Remember this settings file will only work for VS 2005 as 2003 used registry settings. Happy Coding!
June 8, 2006
Windows Update Error Solved
Just had this one creep up on me after reinstalling XP:
[Error number: 0x80072F8F]
Your computer’s date and time appear to be out of sync with an update certificate. To fix this:
1. In the Control Panel, open date and Time Properties
2. Ensure that the date and time are correct.
Read more about steps you can take to resolve this problems (error number 0×80072F8F) yourself.
After mucho searching, newsgroups, etc. I found what worked for me so I had to blog about it because it took forever to find! You will kick yourself for not thinking of this one. Check your BIOS clock!!!!! Mine said 2002…only 4 years ago! Apparently the SSL Certificate validation uses an API call or something that ends up checking your BIOS clock and not your Windows clock. I hope this saves someone out there a couple of hours and some gray hairs. Good Luck!
Where is download manager?
I hope I'm not the only person who has ever wondered about this. How do you launch download manager without going back to msdn subscriptions and clicking the resume button? Well, it might not seem like much but I had to post about the answer…
http://transfers.ds.microsoft.com/ftm/LaunchFTM.aspx
This link does it all.