Troubleshooting Team Foundation Server 2008 Installation

Posted by: Imar Spaanjaars at Sunday, October 26, 2008 1:57:51 PM in: TFS
I have been trying to install Microsoft Team Foundation Server 2008 on a Virtual PC for a presentation I'll be giving in a couple of weeks. I must say, the installation process is not as easy as you'd hope. If you follow the installation guide to the letter there's a fair chance you can get things up and running on your first attempt to install TFS. If you can't make it work, there are many useful posts on internet forums on TFS that can help you out. However, in my case I wasn't having so much luck....
Read on ...

I have received an MVP Award!!

Posted by: Imar Spaanjaars at Wednesday, October 01, 2008 10:20:43 PM in: Imar's Blogs
I was really pleased when I received the following e-mail today:

Congratulations! We are pleased to present you with the 2009 Microsoft MVP Award! This award is given to exceptional technical community leaders who actively share their high quality, real world expertise with others.

...

The Microsoft MVP Award provides us the unique opportunity to celebrate and honor your significant contributions and say "Thank you for your technical leadership."

Toby Richards
General Manager
Community Support Services

Read on ...

Creating ASP.NET Users Programmatically

Posted by: Imar Spaanjaars at Sunday, September 28, 2008 5:52:51 PM in: ASP.NET 3.5
One area in ASP.NET I see a lot of developers struggle with it deploying their sites. Compiling the application and then FTP-ing your files to a remote host is pretty easy. Then you need to set up a database. Often this is done by your ISP so you don't have to worry about that a lot either. But then you need to move your initial data from your development system to the remote server. By using the Database Publishing Wizard - now an integral part of Visual Studio 2008 - this is usually straight forward. You export the data to T-SQL Create and Update scripts and then execute those against the production database. While this works for most of your data, it doesn't always work correctly for the Membership and Roles data that is stored in your database. When it's not working, you typically do see your regular data in your application, but you can't seem to log in with the accounts you created on your local machine using the Web Site Administration Tool.
Read on ...

Storing Images as Serialized Strings in Code Instead of in Resource Files

Posted by: Imar Spaanjaars at Tuesday, September 16, 2008 6:42:24 PM in: ASP.NET 3.5
A colleague of mine and I were working on a template for My Generation the other day. (In case you didn't know, My Generation is a very cool Code Generation tool). One of the nice things about My Generation is that it allows you to use standard WinForms code to define the look and feel for the form where users can input their data (e.g. select the database, tables, specify output folders, language choice and so on). My colleague recently added a menu to this WinForm for often used commands to save and restore the form's state like Open, Save and so on. I thought it would be really fancy if the menus had a little menu icon as well. Normally, with .NET WinForms, adding such a menu icon is as simple as selecting a file. However, with My Generation templates, it's not so easy.
Read on ...

Protecting Sections of your Web.Config File

Posted by: Imar Spaanjaars at Saturday, September 13, 2008 12:26:02 PM in: ASP.NET 3.5

I recently got a couple of e-mails from people asking why I was storing unencrypted data in my web.config files for applications as the ones used in my N-Layer design examples.

The main reason is: I don't have much to hide. First of all, the web.config doesn't contain a lot of sensitive information. For example, I use Integrated Security in my database connections, so I don't have a need for clear text passwords. Secondly, the config files are stored on my machine in a safe way as only the Administrators group and the accounts used by the web server can access them. Finally, IIS and ASP.NET work together to block users from downloading the web.config file. (To see what I mean, try downloading this file: http://imar.spaanjaars.com/web.config. The file really exists on disk, but you get a 404 Not Found error nonetheless.)

But of course, your mileage may vary. Maybe you're afraid your client changes things they shouldn't change in the web.config file. Or maybe some of your co-workers can access the server through FTP to update the site but you don't want them to be able to change the settings. Or maybe you're afraid an employee of your ISP can read your sensitive data when your site is hosted in a shared hosting environment. In those cases, it's good to know it's very easy to encrypt sections of the web.config file.

Read on ...

Watch Out When Setting the ID of a Master Page Dynamically

Posted by: Imar Spaanjaars at Sunday, September 07, 2008 11:11:42 AM in: ASP.NET 3.5

It's not uncommon to set the ID of a Master Page in ASP.NET Programmatically. This is particularly useful when you have multiple master pages and want to have your CSS or JavaScript target specific control IDs in your code.

Without setting the ID property of the master page, a client side control ID may end up like this:

<input type="submit" name="ctl00$ContentPlaceHolder1$Button1" value="Button" 
id="ctl00_ContentPlaceHolder1_Button1" /> 

The ctl00 prefix on the id and name attributes represent the auto generated ID of the master page. Even if your page uses a different master, you may end up with the same prefix. Setting the server side ID of the master programmatically allows you to control the full control ID, making IDs predictable and thus more useable in client side code. For example, the following code in the code behind of the master page:

protected void Page_Init(object sender, EventArgs e)
{
  this.ID = "Master1";
}
will result in the following HTML for the same button control:
<input type="submit" name="Master1$ContentPlaceHolder1$Button1" value="Button" 
id="Master1_ContentPlaceHolder1_Button1" /> 

This way you can assign a predictable master ID that your client side CSS and script can use.

If you use this trick, you have to be aware of when exactly to set the ID. Do it too late and you'll get in troubles.

Read on ...

Wanted: Input for the Next Version of my N-Layer Architecture Articles!

Posted by: Imar Spaanjaars at Saturday, September 06, 2008 7:33:57 PM in: Imar's Blogs
It's been more than one and a half year since I released the first version of my articles on N-Layer Design. Since then, the three articles combined have been read well over 200,000 times. Besides generating a lot of page views, the articles also attracted a lot of comments from you, my readers, with great feedback and requests.
Read on ...

What Others Are Saying About Beginning ASP.NET 3.5 in C# And VB

Posted by: Imar Spaanjaars at Saturday, September 06, 2008 3:32:43 PM in: Imar's Blogs
It's been more than six months since my latest book, Beginning ASP.NET 3.5 in C# And VB, has been released, so it's a good time to look back a little, see how the book has been received and what people think about it.
Read on ...

Passed My MCPD Web Exams Today

Posted by: Imar Spaanjaars at Tuesday, August 05, 2008 9:39:16 AM in: Imar's Blogs
Today I passed the exam 70-528, part of the MCPD training.
Read on ...

Spaanjaars.Toolkit.ContentRating: Version 1.1

Posted by: Imar Spaanjaars at Wednesday, July 16, 2008 6:29:00 PM in: ASP.NET 3.5

Ever since I wrote the initial version of my ContentRating control back in 2006, I received a massive amount of feedback, both as comments below the article and as private e-mails. Not surprisingly, if you consider the article has been read over 19,000 times and has been rated 444 times (at the time of writing).

Besides getting a lot of "thank you's" from people who liked the control, I also got a lot of requests for a real-world example of a test site using the control. The test site that shipped with the control used fake data stored in ViewState to simulate a real backing store which obviously didn't cut it for a lot of people.

Also, a reader called vgt pointed out a bug in the control where an existing cookie would be overwritten by a new one one, effectively allowing you to vote for the previous item again.

Finally, I had a few requests of my own: I didn't like the default data source of 5 integers if you didn't supply a data source yourself. I also didn't like it that the control didn't raise an exception when you tried to data bind it without a valid data source.

So, enough reasons to fire up Visual Studio and get my hands dirty on some control fixing.

Read on ... 12345678910111213141516171819202122232425262728293031