Tips for posting in the Wrox Forums

Posted by: Imar Spaanjaars at Monday, August 16, 2010 9:06:01 AM in: Imar's Blogs

I am an active contributor to the Wrox P2P forums, where I support readers of my books and other programmers that go there with programming related questions. I try to answer as many questions as I can but I only have a limited amount of time. This means I'll give preference to questions that are the easiest to answer. This is not related to the technical difficulty of the problem discussed, but to the quality of the question. Obviously, if you post a clear and concise question, you increase your chances of getting a useful and quick reply as it takes less time to understand the question and come up with an answer. Unfortunately, I see more and more people posting vague questions, and posting them in the wrong category. To avoid typing the same response over and over again asking for clarification, I decided to write a short blog post with a few tips for proper questions in these forums where I can refer to when unclear questions come up. If you get sent to this page, it's not that people don't want to help you; it's that they can't help you because the question is unclear or posted in an inappropriate location. Follow these tips and you'll improve the chances of getting the answer you're waiting for.

Read on ...

Building a Provider Based File Storage System Using .NET

Posted by: Imar Spaanjaars at Tuesday, August 10, 2010 7:03:55 PM in: ASP.NET 4

Many moons ago, in January 2007 to be exact, I wrote an article about storing files in the database using ASP.NET 2.0 and SQL Server. One of the features of the application I demonstrated in the article was the ability to switch between storing the actual file in the database, or saving it on disk. In both cases, meta data such as the content type and the original name were saved in the database, but by changing a configuration setting called DataStoreType you could determine if the actual file was saved on disk, or stored in an NText column in the database together with the meta data. In February of the same year, Steven Bey suggested to rewrite the application and base it on the provider model that has become a quite popular design pattern since it was introduced for the ASP.NET Application Services that appeared in ASP.NET 2.0. I added Steven's suggestion to my "Things to do when I have the time for them" list. And today is the day I finally found the time to do it. In this article I'll show you how I changed the application using the provider based model so you can switch between different providers, including various flavors of SQL Server and Microsoft Access. Adding support for other data stores then becomes really simple.

Read on ...

Programmatically Managing Application Services in ASP.NET

Posted by: Imar Spaanjaars at Wednesday, August 04, 2010 10:12:37 AM in: ASP.NET General

Since version 2.0, ASP.NET ships with a set of the so called Application Services, including Membership, the Role Manager, Personalization, Profile and the SqlWebEventProvider. To enable these features, you have a few options. The most common way is to just start using one of the features, such as Login control on an ASPX page. The default setup is configured to automatically create a SQL Server database in the App_Data folder of a site with the services already enabled. Another very common way, to get more control over the setup is to use the aspnet_regsql tool. This GUI or command line tool gives you more control over the SQL Server and database you're targeting and the exact features you want to install. The downside of this tool is that you need to run it locally and need the permissions to execute it.

I recently discovered that you can also manage the application services programmatically.

Read on ...

Want to Win a Copy of my Book Beginning ASP.NET 4 in C# and VB?

Posted by: Imar Spaanjaars at Tuesday, August 03, 2010 1:08:42 PM in: Imar's Blogs

I still have a number of copies of my latest book Beginning ASP.NET 4 in C# and VB waiting on my desk for someone to read them. Want to win a copy?

Read on ...

Book Review: Professional Application Lifecycle Management with Visual Studio 2010 By Mickey Gousset et al.

Posted by: Imar Spaanjaars at Sunday, August 01, 2010 2:33:44 PM in: Book Reviews

Ever since it was announced, Professional Application Lifecycle Management with Visual Studio 2010 was high on my list of books to read. I've been using Visual Studio, and team Foundation Server since the first releases of the products, but really needed to dig a little deeper in some of the core concepts. Because the Visual Studio 2010 release is quite large with lots of new features, especially in terms of ALM and TFS, I was on the lookout for a book that showed me what's new, and how to use it. It turned out that this book, by Mickey Gousset and others, is an excellent guide to many of the new features in Visual Studio 2010 and Team Foundation Server 2010.

Read on ...

Using Virtual Restore to Attach Databases Directly from Backup Files

Posted by: Imar Spaanjaars at Sunday, August 01, 2010 1:16:04 PM in: Product Reviews
About a week ago I was introduced to Red Gate's SQL Virtual Restore 2. SQL Virtual Restore lets you mount live, fully functional databases direct from backups without the need for a physical restore.
Read on ...

Follow my Articles About Dynamicweb CMS, eCommerce and Extensibility

Posted by: Imar Spaanjaars at Sunday, August 01, 2010 12:30:26 PM in: Imar's Blogs
You may have noticed that in the past couple of weeks I am posting less frequent on this web site, imar.spaanjaars.com. The reason for the absence of new content is my other, new content project: articles about Dynamicweb CMS and eCommerce.
Read on ...

Making Application Configuration Easier Using the Castle DictionaryAdapter

Posted by: Imar Spaanjaars at Friday, July 30, 2010 12:17:07 PM in: ASP.NET 4
If you've done any development in ASP.NET, you're probably aware of the presence of the <appSettings /> element in web.config that enables you to store centralized configuration settings. You can use that element to store settings such as e-mail addresses and sender names for outgoing e-mail, settings that determine whether or not to send e-mail in certain conditions, default page sizes and a lot more. While this feature greatly decreases the troubles typically associated with configuration settings in multiple deployment scenarios (development versus a production environment for example), you can use an external component called the Castle DictionaryAdapter to make using the appSettings element even easier.
Read on ...

How Do I Make a Full Table Row Clickable Using jQuery?

Posted by: Imar Spaanjaars at Wednesday, July 28, 2010 8:04:14 AM in: JavaScript
Back in 2004, I wrote an article about making a full table row clickable using JavaScript, so you could click anywhere in the table row to browse to a new page. That solution used quite a bit of in-line JavaScript to accomplish that task which adds to the size and complexity of the page. Since then, the JavaScript landscape has changed quite a bit with the introduction of JavaScript libraries such as Prototype and jQuery. Because my initial article is in the top 10 results for "full row select javascript" on Google, I figured it made sense to write a new, cleaner and more modern version of it using one of those libraries: jQuery.
Read on ...

6 Tips to Improve Code Downloads for your Blog

Posted by: Imar Spaanjaars at Thursday, July 01, 2010 1:45:28 PM in: Imar's Blogs

Don't you just hate it? You read an interesting programming related article on the web that comes with source code. You downloaded the source so you can look at it later. When you open the file later, you've long forgotten where you got the file, or which concept it was supposed to demonstrate. Worse, the download contains a gazillion files, making it pretty impossible to find the stuff you're looking for yourself. Rather than two or three files demonstrating the topics originally discussed in the article you read, you're faced with a gazillion ReSharper cache files, useless .suo and .user files, obj folder and more. Take, for example, this article "Using Dynamic Views In ASP.NET MVC 2" (note: I am not picking on the author here personally; it's just an example I ran into recently that shows most of the problems I face with code downloads; it's easy to come up with many other examples). The relevant code is only 18 lines long (7 in the View and another 11 in a controller class), yet when you unpack the zip file you get 79 files. Granted, some are needed to run the example as an MVC site, but with a bit of clean up, the number of files can easily be reduced to 27 plus 1 by following these simple tips.

Read on ... 12345678910111213141516171819202122232425262728