Saturday, March 31, 2012

When App_Offline.htm does not work as advertised

If you ever have had to do maintenance on a public web site, you have probably used the App_Offline.htm feature at least once.  For those of you who are not aware of the App_Offline.htm feature, it is a feature introduced with ASP.Net 2.0 to essentially shut down your website and prevent it from accepting requests (perfect for performing maintenance tasks and updates on your site).  This was originally described by Scott Guthrie in this blog post:

However, I encountered an issue with the use of this feature that did not conform to expectations.  I was specifically using the App_Offline.htm to capture all requests to my website while I was performing an upgrade.  As you can guess, the upgrade involved an overhaul of the website including numerous changes to assemblies in the bin directory.

Since my site is hosted by a 3rd party hosting provider, I was uploading the content via FTP.  Well, unfortunately, uploading the bin directory containing all of the new assemblies introduced compilation errors into the website.  I also had customErrors turned off in my web.config file.  Therefore, even though my App_Offline.htm file was present in the root of my website, the compilation errors introduced into my website through uploading the bin directory continued to display the various compilation error messages rather than the "Under Maintenance" message I had created in my App_Offline.htm file!

Even when I turned on customErrors in my website, I simply got the generic customErrors message regarding an error in the website.

Of course, once I had completed uploading all of the content on my website that resulted in a successful compilation, my App_Offline.htm file once again performed as expected and displayed the "Under Maintenance" message.

Therefore, if you are making drastic changes to your publicly hosted website, it is better to simply shut down the website and rely on some other type of maintenance message (perhaps through an IIS redirect) rather than completely relying on the App_Offline.htm file to display your Under Maintenance message.

Friday, March 30, 2012

Error when using New-SPConfigurationDatabase command

I was recently setting up a fresh SharePoint 2010 SP1 (with all the latest CUs) development environment and since I had no use for a domain controller, I simply used the New-SPConfigurationDatabase PowerShell command ( in the SharePoint 2010 Management Shell to create my SharePoint 2010 Configuration Databases.

Unfortunately, when entering the local account credentials, I only entered the local user name and password rather than fully qualifying the user name and password in the format [COMPUTER NAME]\[UserName].  So, of course, I got the following error message: "The user does not exist or is not unique"

Well, I simply tried to then fully qualify the user name and password again using the fully qualified credentials--NO LUCK!!  Even though the error message occurred, the databases were created in SQL Server, but with INCORRECT/INVALID credentials.  Of course, as you can guess, this renders the databases completely UNUSABLE.

Ok, so I thought I would try again by deleting the existing SQL Server databases and re-running the command with the proper credentials.  Unfortunately, SharePoint STILL THINKS those databases exist even though I have deleted them off the SQL Server.  Even after closing down the SharePoint 2010 Management Shell and opening it a subsequent time, I could not rid myself of the error.  I even re-started my SQL Server to see if that had any effect and it also had no effect whatsoever.

The solution???

I simply re-booted my entire server and then re-ran the New-SPConfigurationDatabase command with the local account credentials in the format [COMPUTER NAME]\[UserName].  That seemed to do the trick!!  Apparently the SharePoint Services on the machine cache the database credentials and configuration information, thereby requiring a re-start of the various SharePoint Services, or more simply, re-booting the server.

Express Reporting Services with SharePoint Integration

As you may already know, SQL Server Express with Advanced Services ships with the Reporting Services feature as well.

Since I was setting up a development SharePoint 2010 environment with integrated SQL Server Reporting Services, I thought that I would just go ahead and install Express Edition with Advanced Services.  The most appealing thing about Express Edition is that Microsoft always ships updated releases to include the Service Pack integration.  With all other editions of the software, Microsoft requires manual integration through slipstreaming rather than simply offering an integrated version available for download through MSDN.  Ugh...

In any case, I began installing SQL Server 2008 R2 Express with Advanced Services (with SP1) on my installation and when the screen got to the Reporting Services feature, I naturally selected the option for SharePoint Integrated mode.

Well, this is the error message that I received:

Apparently, even though the feature is available for selection as part of the SQL Express installation process, I can't use it!!

So, after all, I was forced to use the full Developer/Enterprise edition of SQL Server 2008 R2 in order to support SharePoint Integrated mode.

Therefore, if you are trying to build a development SharePoint environment and you need SQL Server Reporting Services Integrated with SharePoint, you will have to spend the necessary time to install a full version of SQL Server 2008 R2 (and apply the service pack).

If you are interested in slipstreaming your own instance of SQL Server 2008 R2, there is a good MSDN blog post on the process here:

Sunday, March 25, 2012

Renaming an instance of SQL Server

If you have ever renamed a host computer AFTER installing SQL Server on the machine, you may encounter some issues with connectivity to the database server after the host rename.

If you are simply using it as a development box, most .Net development connection strings will use something like (local) OR (local)\SQLExpress.  However, products like SharePoint 2010 do not support the use of (local) for database connectivity.  Therefore, you have to use the actual host name of the SQL Server when establishing database connections.

Well, unfortunately, applications like SharePoint generally use the following query to determine the actual SQL Server host name: "SELECT @@SERVERNAME".

Well, if you have recently renamed your computer, then the result returned by this query will return the old host name rather than the new host name.

Therefore, you will need to follow the directions described in this MSDN article to resolve this issue:

Once you have done that, applications such as SharePoint 2010 should now properly recognize the SQL Server host name during the installation process.

Understanding Visual Studio Item and Project Template Categorization

If you are creating your own Visual Studio Item or Project Templates, it is worthwhile to understand how Visual Studio itself categorizes its content.

Interestingly enough, there is actually nothing in the .vstemplate file which explicitly forces the categorization of the content into the appropriate navigational structure when you Add a New Item or create a New Project.  Instead, the categorization is based solely on folder structure!

Therefore, the best way to get an understanding of the required folder structure for your own Item and Project Templates is to look at the way that Visual Studio internally utilizes its folder structure.

If we look at the Item Template folder structure, we can see that the top level folder structure is categorized based on the various project types.  Some are categorized by the actual language such as CSharp or VisualBasic, while others are categorized by their actual project type such as Test or Web.

If we dig a little deeper into the actual folder structure for a particular language such as CSharp, we will see the following folder structure:

For the language, we see the various project types mapping to the project categorizations we normally see when we create a New Project within Visual Studio or Add a New Item within Visual Studio.

The only major confusing project type that arises is the use of the Web project type.  As you noticed from the earlier screenshot, Web is a project type at the root of the folder hierarchy as well as residing beneath the CSharp folder structure.

As it turns out, the Web folder residing at the root of the folder structure corresponds to Web Sites, while the Web folder beneath the CSharp directory corresponds to Web Applications.  Therefore, the languages for CSharp and VisualBasic actually reside beneath  the Web folder structure when creating Web Sites.

Other than that, everything else in the folder structure should be pretty self explanatory!

Hopefully this gives you a little bit more insight when creating your own Item and Project Templates for use within your own organization.  As long as you are able to follow this folder structure for your own Item and Project Templates, you should have no trouble getting your Items and Projects to appear in the correct locations in the Visual Studio Installed Templates Navigation Tree!

Friday, March 23, 2012

Slipstreaming SharePoint 2010--The "Easy" Way

If you look at any number of articles on SharePoint slipstreaming (, you will probably notice that they require you to have all of the contents extracted onto your hard drive first, and after doing so, you will then have to burn the resulting media back to DVD media or compile into an ISO image.

Well, that is a bit of a tedious process and usually a waste of disk space as well.  Since the actual slipstreaming process associated with both Office and SharePoint really only involves placing the patches and updates into an Updates folder, it does not make a whole lot of sense to put everything onto the hard disk and then re-creating the media.

Therefore, I usually just follow these steps instead:

  1. Download and install an ISO media editing tool such as UltraISO:  There are numerous ISO editing tools available for download, but I have personally had the best experience and results with UltraISO. NOTE: The trial version of UltraISO only supports a 500 MB ISO image, therefore, if you like it, it is most definitely a worthwhile purchase.
  2. Download the appropriate SharePoint 2010 media in the form of an ISO image from MSDN.
  3. Now, extract any updates or language packs that you need to integrate into the SharePoint media.
  4. You can then open the SharePoint 2010 ISO image using UltraISO.
  5. Once the ISO image has been opened, you can then either drag and drop the content from Windows Explorer view directly into the appropriate Updates folders.  Otherwise, you can either use the Add Files option from the Actions menu to add the appropriate content.
  6. After the files have been successfully added to the media, and click on the Save icon.  This should recompile and save your resultant integrated ISO media.
  7. Voila! You now have an integrated SharePoint ISO image that you can use for mounting using ISO Image mounting software, mount to virtual machines or burn to DVD media!!

Wednesday, March 21, 2012

New releases of IIS Express

Microsoft recently released a new version of IIS Express (IIS 7.5 Express) which can be downloaded from here:

This release does not include a 64-bit release.  However, Microsoft has also recently released a beta version of IIS 8 Express which also includes a 64-bit release:

Monday, March 19, 2012

Visual Studio 11 vs. Expression Blend 4

I have seen several comments regarding the similarities between Visual Studio 11 and Expression Blend 4. 

Personally, I have spent very little time inside of Expression Blend since Microsoft released Silverlight support for Visual Studio.

In any case, I decided to open up Expression Blend 4 for myself to see what differences were present (if any).

The first thing I noticed upon opening a new project was that Expression Blend 4 (while similar) does not look THE SAME as Visual Studio 11.

While Expression Blend 4 is not nearly as colorful as Visual Studio 2010 or any of the other Expression Studio 4 products, it still applies selective use of color

Below is a screenshot from Expression Web 4:

Notice that though the IDE uses black and white, several elements continue to use color throughout the User Interface.

Below are some screenshots from Expression Blend:

So as you can see from the screenshots, Expression Blend is far more extreme in removing the use of color, but it continues to intersperse color throughout the IDE.

Some of the notable points where it continues to use color are the following:

  1. New project icons continue to use color
  2. The content pane and the icons surrounding the content pane continue to use color
  3. The toolbox items also continue to use color
  4. Some of the tool panes also continue to intersperse color through the use of various icons
Overall, though both Expression Web and Expression Blend cannot be deemed as "pretty IDEs", they certainly can be considered functional and usable.  Working with them seems reasonably comfortable and natural, so Ido not feel like I am straining my eyes just to distinguish content.

Of course, as you can tell, this is a very different tack than what was used with Visual Studio 11.  Instead, of using some color well placed throughout the IDE, they have followed a much more extreme approach of removing nearly all of the color in the IDE!  (

Even the new project and item templates no longer have color in Visual Studio 11!!

So, if Microsoft chooses to follow the path that they followed with the Expression Studio suite, I would be OK with that, but the current state of the IDE just seems far, far too extreme to me.

Saturday, March 17, 2012

Installing SharePoint 2010 with SQL Server 2012

Now that SQL Server 2012 has been officially released, I wanted to refresh my installation of SharePoint 2010 with SQL Server 2012 instead of using the built-in installation of SQL Server 2008 Express that ships with the standalone installation option.

Before you install SharePoint 2010 in conjunction with SQL Server 2012, you MUST have an installation of SharePoint 2010 SP1.  You can download integrated SharePoint 2010 with SP1 media directly from MSDN or else you can create the slipstreamed media yourself by extracting the SP1 contents and sticking it in the Updates folder.  If you want guidance on how to accomplish this, you can find additional information here:

Of course, since SP1 introduces numerous problems of its own, you will want to also apply the latest SharePoint 2010 Cumulative Updates to ensure you have a working environment:
Once you have the appropriate SharePoint installation media, as many SharePoint Administrators already know, if you do not use the Standalone installation of SharePoint 2010, you are forced to use a Server Farm installation.  In this scenario, the SharePoint Configuration Wizard prompts for domain credentials.

Of course, setting up a domain controller is a particularly time consuming operation and I just did not need that functionality for my development environment.

So, instead, after installing SQL 2012 on my machine, I utilized the PowerShell command New-SPConfigurationDatabase to pre-create my Server Farm using local account credentials.

After my Server Farm was set up, I simply continued with my Server Farm installation as if I were installing SharePoint 2010 on a domain controller.  The SharePoint Configuration Wizard happily believes that it is part of a domain after running the New-SPConfigurationDatabase, so it was a snap after that!

Setting up a SharePoint Farm with Local Account credentials

If you have ever tried setting up a SharePoint 2010 Farm with local account credentials, you probably know that this cannot be done any longer as was the case with SharePoint 2007. 

Fortunately, Microsoft provided a back door to the limitation of the GUI interface courtesy of our very good friend PowerShell.

The PowerShell command is New-SPConfigurationDatabase.  This command will set up the configuration database for you and even prompt you for the necessary local account credentials.  Once the Configuration database has been created, you can proceed with the Server Farm installation by connecting to an existing Farm.

Here are some good articles that include screenshots on just how to accomplish this:

NOTE: Since the SharePoint 2010 Management Shell does not work on Windows Server 2012, you will have run this script in PowerGUI.  Below is a sample PowerShell script to do this.
Set-ExecutionPolicy Unrestricted

$userName = "Administrator"

$password = "mypassword"

$SPPassword = "mysppassword"

$FarmPassword = ConvertTo-SecureString -String $password -AsPlainText $true

$Passphrase = ConvertTo-SecureString -String $SPPassword -AsPlainText $true

#Write-Host $FarmPassword

#Write-Host $Passphrase

#Create the Farm credential object

$FarmCredential = New-Object System.Management.Automation.PSCredential $userName, $FarmPassword


#Create the new SharePoint Configuration Database

New-SPConfigurationDatabase -DatabaseName "SharePoint_Config" -DatabaseServer "WIN2012SP2010" -FarmCredentials $FarmCredential -Passphrase $Passphrase

If you want the SharePoint People Picker to work with the local user accounts, make sure you run this PowerShell Script (

Set-ExecutionPolicy Unrestricted


$peoplePicker = New-Object ("Microsoft.SharePoint.Administration.SPPeoplePickerSettings")

Write-Host $peoplePicker.AllowLocalAccount

$peoplePicker.AllowLocalAccount = $true

Write-Host $peoplePicker.AllowLocalAccount

Friday, March 16, 2012

Team Foundation Server is going Free!

Team Foundation Server Express will be released as a free version of Team Foundation Server with many of the same features that are offered in the full release version of Team Foundation Server. 

I imagine that Microsoft is doing this as part of their strategy to get rid of their existing Visual SourceSafe user base.  Microsoft has already announced that they will not be supporting Visual SourceSafe in the near future and there will be no future development progress on this platform, so now is as good a time as any to begin adopting the Team Foundation Server Platform.

You can read some more details about Team Foundation Server Express edition here:

You can download Team Foundation Server Express edition from here:

Identity and Access Tool for Visual Studio 11

Microsoft is finally making it easier to support Claims-based identity in all of the applications that developers are creating in Visual Studio 11.  They have recently published an extension for Visual Studio 11 to the Visual Studio 11 Gallery that supports various supports of Web Applications including ASP.Net MVC and WCF Services:

Too bad it only supports these features for .Net 4.5....

Wednesday, March 14, 2012

Dealing with Self-Signed Certs in IIS 7/IIS 7.5

Here is a great article on dealing with the issues associated with Self-Signed Certificates in IIS 7/IIS 7.5:

Of course, if you need the DNS entry to match the website so that you do not get the dreaded certificate mismatch error, you can either use SelfSSL from the IIS 6 Resource Kit (which requires IIS 6 compatibility) or SelfSSL7 which works natively on IIS 7 and above!

You can read more about using SelfSSL7 here:

Creating a Sandboxed-compatible Visual Web Part

One of the things about installing the SharePoint Power Tools from the Visual Studio Gallery ( is that it states that you can now create a Sandboxed-compatible Visual Web Part, however, it provides no direction on how to accomplish directly from the Visual Studio Gallery site.

If you have created Visual Web Parts in the past, you probably know that the Visual Web Part project is offered directly as a SharePoint Project Template, therefore, when you look for the Sandboxed-compatible Visual Web Part Project Template, you will not find one.

Instead, the Sandboxed-compatible Visual Web Part ships as an Item Template instead.  This means that you have to create an Empty SharePoint Project as a Sandboxed Solution and then add a Visual Web Part (Sandboxed) to the solution.

It would have been much nicer if Microsoft had directly shipped a Sandboxed Visual Web Part as a Project Template, but it is what it is...

Here are the steps to create a Sandboxed-compatible Visual Web Part for those that are interested:

If you want to save some time and you also have a copy of Visual Studio 2012 on your machine, you can optionally follow these steps to get it to work in Visual Studio 2010 as well:

Deploying SharePoint 2010 with SQL Server 2012

Microsoft has recently published an MSDN article on installing SharePoint 2010 with SQL Server 2012 to be able to leverage and use the new features and integration capabilities that come with SQL Server 2012:

Most importantly, you need to install SharePoint 2010 SP1 prior to running the SharePoint Configuration Wizard for connecting to the SQL Server 2012 instance.  Of course, if you have read my previous article on SharePoint 2010 SP1 (, you probably already know that you will have to install AT LEAST 1 Cumulative Update after the application of SP1 to get everything to work correctly.

Tuesday, March 13, 2012

Where can I find the Pubs and Northwind databases?

As some of you may already know (or have recently discovered), is that Microsoft is no longer using the Pubs and Northwind databases as their standard sample databases for versions of SQLServer 2005 and greater.  Instead, all sample databases beginning with SQL Server 2005 have moved over the new AdventureWorks database.

Unfortunately, some books and manuals continue to use the Northwind and Pubs databases as part of their samples and exercises.  Therefore, if you want to follow along with these books, you will need to be able to download a copy of the Northwind and Pubs databases to attach to your local installation of SQL Server.

You can download the Northwind and Pubs database samples here:

After downloading the MSI, you can simply execute the MSI which will effectively extract the database MDF and LDF files to your C:\ drive.

After obtaining the extracted database files, you can simply attach the databases through the Attach Database command in SQL Server Management Studio.

Monday, March 12, 2012

Viewing Installed SharePoint 2010 Hotfixes and Service Packs

If you are currently administering SharePoint 2010, you may or may not have installed SharePoint 2010 on the server.  In these cases, at some point in time, you will probably need to figure out what exactly has been installed on the server in terms of Hotfixes/Cumulative Updates and Service Packs.

The easiest way to do this is through Central Administration.

  1. Open Central Administration
  2. Under the Upgrade and Migration heading, click on "Check product and patch installation status"
  3. This should then display a screen with all of the currently installed Hotfixes and Service Packs

Unable to authenticate using SharePoint 2010 SP1 and ADFS

I recently encountered an issue whereby I was unable to authenticate against my SharePoint 2010 SP1 installation with ADFS v. 2.0. 

I had followed each and every single step to properly configure my ADFS v. 2.0 installation in conjunction with my SharePoint 2010 SP1 installation, but I continued to receive an "Access Denied" error message. 

I could verify that the authentication process was being redirected to ADFS v. 2.0 since I was getting the ADFS v. 2.0 authentication prompt and when I hit my SharePoint site, I saw that it was receiving the Claims from ADFS in the form my configured e-mail address.

So, after spending several hours on the phone with Microsoft support, we were able to determine that my User Policy screen did not look correct.  It was missing the "SAML Provider" option amongst the list of available Claims providers!

This is how the User Policy screen SHOULD look like:

Therefore, based on some further investigation, Microsoft determined that I needed to apply the June 2011 CU (minimally) to resolve this issue.   Apparently, even though SharePoint 2010 SP1 can be downloaded directly from MSDN, this version is insufficient to have a completely working installation using Claims-based Authentication.

You can download the June 2011 CU (and later cumulative updates) from here:

Needless to say, after applying the SharePoint Foundation 2010 and SharePoint Server 2010 June 2011 CU, my SharePoint site was able to successfully authenticate using ADFS!!

Interestingly enough, I just recently found this article which describes this issue (of course, after I have already solved the issue with MSDN Support):

So, if you are setting up an installation of SharePoint 2010 for the first time, make sure that you install AT LEAST 1 Cumulative Update after the application of SP1 or you will probably face the same problem I encountered!

Sunday, March 11, 2012

Convert VB6 to VB.Net/C# for Free!

If you still have some left over VB6 Applications left in your organization, you will probably be glad to hear that Artinsoft (the maker of the original VB6 Upgrade Wizard included in Visual Studio) is offering a free version of their Visual Basic Upgrade Companion Tool.

You can read more about the free offer from MSDN here:

The Artinsoft direct link for the free license is here:

Unfortunately, the free version is limited to a VB6 conversion of 10,000 lines.  If your application is greater than 10,000 lines, you will need to consider purchasing a version of Visual Basic Upgrade Companion to convert your application.

Pricing information for Visual Basic Upgrade Companion is here:

Since the licensing is PER APPLICATION, the pricing for the tool may get out of hand very quickly depending on the number of applications you need to convert.

Another potential conversion alternative is VB Migration Partner.
Unfortunately, their pricing information is not available on their website, thus making it difficult to assess how much it is going to cost without directly contacting them.

Converting VB.Net to C#

If you are working at a company which has been developing .Net applications for any length of time, odds are that you have at least 1 VB.Net Application in your organization.  

If you are like most C# developers, you probably prefer to work in C# rather than continue to maintain the application in VB.Net.  

One of the main problems that I have found in working with VB.Net applications has been that it supports many of the constructs of Visual Basic 6 (VB6).  Therefore, if your VB.Net application was upgraded from VB6 at some point in time, there is probably a lot of leftover Non-.Net type of code interspersed throughout the code base.  Rather than continue to maintain these remnants of VB6 within the code base, it is usually much better to migrate to a complete .Net solution.  One of the best ways to achieve that is to convert it completely over to C#.

There are numerous code converters on the web which offer to translate content from VB.Net to C# for you.  Probably the most well-known VB.Net to C# converter is the online version maintained by Telerik:

However, if you are attempting to convert a reasonably sized VB.Net project, converting on a file-by-file basis is probably not sufficient.  Instead, you will probably want to utilize a tool that can convert an entire Visual Studio Solution or Visual Studio project for you.

Two of the more affordable VB.Net Converter utilities I discovered are:
  1. VBConversions:
  2. Instant C#:
The main limitation with the VBConversions tool is that it is unable to convert Web Site projects.  It is only able to convert Web Application projects that are associated with a .vbproj file.  This limitation alone was sufficient for me to choose the alternative Instant C# for my conversion needs.

Instant C# supports all types of solution and project conversions.  The overall accuracy of the conversion is excellent and whenever I encountered issues with aspects of the conversion process, the support staff was extremely helpful in resolving the issues and providing me with an updated version of the tool for download (sometimes within a matter of hours or days).

Overall, I have had great success with converting my VB.Net to C# projects using Tangible Software Solutions' Instant C# product and I will very likely continue to utilize it for all of my future VB.Net to C# conversion needs.  

If you have an upcoming VB.Net to C# conversion project, you should definitely give Instant C# a spin and see if performs as well for you as it did for me!

Saturday, March 10, 2012

SQL Server 2012 Management Studio--First Look

If you take a look at the new SQL Server 2012 Management Studio, one thing will be immediately obvious from the color scheme--it looks just like Visual Studio 2010!

Amongst the newly revamped User Interface to more closely match the Visual Studio 2010 IDE, the Intellisense has been much improved over the earlier releases of SQL Server 2008.  The Intellisense seems to be much faster and much more responsive (similar to Visual Studio 2010 Intellisense).

Unfortunately, one of the things that they DID NOT CHANGE in the SQL Server 2012 IDE is providing default support for Team Foundation Server.  Even though Visual SourceSafe will no longer be further developed nor supported, SQL Server 2012 Management Studio still has not added built-in support for Team Foundation Server as they did with the Visual Studio 2010 IDE.  I guess the SQL Server teams and the Visual Studio teams still need some more ongoing communication...

Visual Studio 11 Solution Compatibility

If you have started using the Visual Studio 11 Beta, you may not know this, but Microsoft has finally decided not to change the solution and project compatibility of Visual Studio 11 files!!

So what does this mean?

Well, it means that you can now develop using Visual Studio 11 Beta and if you decide that you do not like it after all, you can seamlessly revert to using Visual Studio 2010 to edit the solution and project!  Yup, absolutely no conversion required!!

From a business perspective, however, the best part of this change is that it allows developers to easily interact with a solution even while working on different versions of the IDE.  If you have developers that wish to use Visual Studio 11 to develop certain features and functionality or wish to use some of the new project templates or debugging features, they can continue to use Visual Studio 11, while developers who want to continue using Visual Studio 2010 or are unable to upgrade (such as overseas developers) can all collaborate on the same solution and project files with no perceptible difference.

What an amazing concept!  Development teams no longer have to scramble to get each and every developer on the same version of the IDE!  Each individual (or development group) can migrate to the new version of the IDE at their own pace or comfort level.

NOTE:Compatibility between solutions and project files will only be maintained if the development team is on Visual Studio 2010 SP1.  Visual Studio RTM will still require a conversion.

Now, if Microsoft can just do the same thing with supporting older versions of Visual Studio Extensions....

SQL Server 2012 Books Online is now truly online!

If you install a copy of SQL Server 2012, you will notice that a copy of the documentation (Books Online) no longer ships with the installation media.  Instead, you need to go through the Help Manager in SQL Server to browse the online documentation.  Alternatively, you can download each of the individual SQL Server Books Online modules through the Help Manager as well.

If you do not want to download the help documentation module-by-module, fortunately, Microsoft also provides a complete download of Books Online here:

SQL Server 2012 RTM now available on MSDN

You can download all of the latest RTM editions of SQL Server 2012 if you have a currently active MSDN Subscription.

You can read more about the new features in SQL Server 2012 here:

Security Token Visualizer Control for Visual Studio 2010

If you are working with Windows Identity Foundation and you are using Visual Studio 2010, you won't be able to readily find any reference or mention to using the Security Token Visualizer Control for Visual Studio 2010 on any Windows Identity Foundation related websites.

Interestingly enough, Microsoft DID release a newer version of the Security Token Visualizer Control for Visual Studio 2010, but it is associated with Windows Azure! 

You can find out how to use the Security Token Visualizer Control for both Windows Identity Foundation and Windows Azure applications here:

The source code for the Visual Studio 2010-compatible Security Token Visualizer Control can be directly downloaded here:

Existing Design Patterns in Microsoft.Net

You may not know it, but if you have been working with the Microsoft.Net platform for any length of time, there are numerous Design Patterns which have been implemented natively by the Microsoft.Net Framework.

Here are just some of the common Design Patterns:

  1. If you have ever worked with creating a Collection and then looping through it using a foreach loop, you have used the Iterator Pattern.
  2. If you have ever used a StringBuilder to build strings (hence its name), you have used the Builder Pattern.
  3. If you have ever used Serialization of objects using XML Serialization attributes or DataContract Serialization attributes for WCF, you have used a form of the Decorator Pattern.
  4. If you have ever used Web Services (ASMX or WCF), you have used the Proxy Pattern.
  5. If you have ever worked with a static class constructor, you have used the Singleton Pattern.
  6. If you have ever worked with the DbFactory class in ADO.Net, you have used the Factory Method Pattern.
  7. If you have ever worked with DataBinding expressions in ASP.Net or just plain old XML, you have used the Interpreter Pattern.
  8. If you have ever written extension methods, you have used the Bridge Pattern.
  9. If you have ever worked with a SqlDataAdapter object, you have used the Adapter Pattern.
  10. If you have ever worked with a SqlCommand object, you have used the Command Pattern.
  11. If you have ever used the Copy or Clone methods on a DataSet, you have used the Prototype Pattern.
  12. If you have ever worked with Events (such as a Button Click event), you have used the Observer Pattern.
  13. If you have ever worked with templated controls in ASP.Net such as the Wizard control or the various ASP.Net AJAX Controls, you have used the Template Method Pattern.
  14. If you have ever worked with a State Machine Workflow in SharePoint, you have used the State Pattern.
  15. If you have ever worked with any of the various Providers such as MembershipProvider, RoleProvider, ProfileProvider or SiteMapProvider, you have used multiple Design Patterns:
    • Strategy Pattern
    • Factory Method Pattern
    • Singleton Pattern
    • Facade Pattern

So if someone ever asks you if you have ever worked with Design Patterns, you HAVE!

Thursday, March 8, 2012

Unintended side effects of debugging with Fiddler

If you use Fiddler to debug your web-based applications, there may be an unintended side effect of using Fiddler that you may not know about.

First of all, the way in which Fiddler works is by intercepting the traffic that is normally sent between your client browser and the target server.  How does it do that?  By inserting itself as a proxy between itself and the browser!

You can verify this for yourself by checking the proxy settings of your Internet Connection through Internet Explorer:

  1. Open up Internet Explorer
  2. Click on Tools-->Internet Options
  3. Click on the Connections tab
  4. Click on the LAN Settings button
  5. You should see a checkbox next to "Use a proxy server for your LAN"
  6. If you click on the Advanced button, you should now see the proxy server settings that Fiddler uses:
    • HTTP Proxy Address: Port: 8888
    • Secure Proxy Address: Port: 8888
Well, one of the unintended side effects of this is that you may not be able to get to content on the Internet if Fiddler is not running!  This will particularly occur if you are working on a virtual machine that is configured to use a static IP address rather than a DHCP Bridged or NAT IP Address.

Of course, the solution to this is to simply remove the proxy settings from Internet Explorer's Internet Connection properties, but if you have not encountered this before, you may be wondering what just happened to your Internet Connectivity!

So hopefully if you stumble across this situation in the midst of one of your debugging sessions, now you will know how to resolve it quickly and efficiently!

Wednesday, March 7, 2012

Things to know about SharePoint 2010 Claims-based Authentication

If you are configuring SharePoint 2010 with Claims-based Authentication for the first time, there are several things you should know before beginning to set up your environment to support Claims-based Authentication:

  1. If you are using Active Directory as your user repository, attributes such as E-mail Address will not be available unless you are using Microsoft Exchange within your organization.  Active Directory does not natively support the E-mail Address attribute, therefore, if your organization uses an alternative Mail Server such as Lotus Notes, you will have to figure out alternative methods to populate this attribute.
  2. Claims-based Authentication and Windows NTLM Authentication (Classic Mode Authentication) for a SharePoint 2010 Web Application are not interchangeable within the Central Administration GUI interface.  If you are performing all of your management activities within the GUI interface and you accidentally configure an NTLM-based Web Application, you will have to delete it and re-create it in order to select Claims-based Authentication.
  3. If you are working with PowerShell in conjunction with using SharePoint Central Administration, you can still convert an NTLM-based Web Application over to Claims-based Authentication. ( Of course, this is a one-way conversion.  If you later decide you really want NTLM Authentication, you will have to once again delete the Web Application and create it.  The PowerShell command to convert a Classic Mode Authentication Web Application (NTLM) over to Claims-based Authentication is the following (
    $ConvertApp = Get-SPWebApplication "http://<web application name>"
    $ConvertApp.UseClaimsAuthentication = "True"
  4. You will need SSL Certificates on your SharePoint Server and your Security Token Service (or on ADFS if you are using ADFS). If you do not purchase 3rd party SSL Certificates, you will either need to use an internal Certification Authority server or issue Self-signed certificates. Of course, using internal or Self-signed certificates may result in a browser security certificate warning when end users browse to your SharePoint website.
  5. If you are planning on setting up an Identity Provider for Claims-based Authentication (such as ADFS), you can provide BOTH Claims-based Authentication using Windows Integrated Authentication as well as Identity Provider authentication.  This allows you to continue to access SharePoint even while configuring or troubleshooting issues with using the Identity Provider authentication and authorization process.
  6. If you are using Claims-based authentication with the NTLM vs. using an Identity provider (such as ADFS), you will get a DIFFERENT set of Claims between the 2 authentication mechanisms.  This will either require you to map Claims to each other or to simplify things simply using a single Claims authentication provider such as your Identity Provider.
  7. You can set up different authentication mechanisms based on different Urls for a SharePoint Web Application.  For example, you may want to support NTLM authentication for all users accessing your web site via the Intranet, while supporting Forms-based authentication for all users accessing your web site via the Extranet or Internet.  
  8. After setting up Claims-based Authentication, you will have to click on the User Policy tab in Central Administration in order to add one or more users with the appropriate permissions to log into the site using Claims Authentication credentials.  
  9. If you are using Claims-based authentication with load balancing, you will need to set up Affinity/Sticky Sessions for your load balancing:
  10. In order to speed up the Claims Authentication process, you may want to DisableLoopbackCheck in the registry as described in this article:

Installing SharePoint 2010 on a Domain Controller

If you are setting up your own test or development environment (particularly in a virtual machine), there is a good chance you will have to install all of the required SharePoint components into a single virtual machine. 

If you are using Windows Integrated Authentication or Forms Authentication with SharePoint 2010, you probably are fine with doing a Single Server installation of SharePoint 2010.  This installation is pretty straightforward since it installs SQL Server Express for you as sets up a default configuration of SharePoint 2010 for you.

However, if you need to work with Claims-based Authentication and your organization is using ADFS (Active Directory Federation Services) v. 2.0,  you will definitely need to set up a domain controller on your virtual machine since ADFS v. 2.0 does not function without a domain controller.

Unfortunately, once you set up a domain controller on your virtual machine and then attempt to install SharePoint 2010, you will quickly realize that you are no longer able to install a Single Server installation.  Instead, when you run the SharePoint Configuration Wizard, you will be forced to install a SharePoint Farm installation.

Below are some of the steps required to install a SharePoint 2010 Farm installation on a domain controller:

  1. Since the Server Farm installation will no longer install SQL Server 2008 Express as part of your installation, you will have to download SQL Server 2008 or SQL Server 2008 R2 separately and install it.  Since you are installing SQL Server 2008 into a single server virtual environment, SQL Server 2008 R2 Express SP1 is probably suitable.  Not only is it a quick(er) installation than the full version of SQL Server 2008 R2 (Developer or Enterprise Edition), it also has a smaller memory footprint (limited to 1 GB) and it includes the installation of SP1.  The Developer and Enterprise Editions of SQL Server 2008 R2 will still require you to install SP1 separately.  I would recommend installing the version with SQL Server Management Studio (WT--With Tools) or you can alternatively install the version with Advanced Services which also includes SQL Server Reporting Services.  You can download SQL 2008 R2 Express from here:
  2. Once that is complete, you can now start the SharePoint 2010 Products Configuration Wizard
  3. After launching the Configuration Wizard, you can click on the Next button to proceed with the installation.  If you are prompted to re-start IIS, click Yes to proceed.
  4. As stated earlier, SharePoint 2010 will require a Farm installation rather than a Single Server installation, therefore, you will want to select the option to "Create a new server farm"
  5. Depending on how you configured your SQL 2008 R2 Express instance, you can enter the database host name credentials here.  NOTE: The SharePoint 2010 Configuration Wizard does not accept nor recognize host names such as (local), therefore, you will have to enter the ACTUAL server host name.
  6. For the Database Access account, enter the name of a Domain User Account.  Since this is simply a test or development environment, it is probably acceptable to utilize the default Administrator account, however, this is DEFINITELY NOT RECOMMENDED for production system installations.  After entering this information, click on the Next button.
  7. You will now be prompted to enter a Passphrase for the SharePoint Farm.  Enter an appropriate Passphrase and click the Next button.
  8. You can now specify a port for SharePoint Central Administration.  If you are configuring SharePoint for use with Team Foundation Server,  you will probably want to specify the port as 17012.  However, if you are not using it with Team Foundation Server, you can accept the default port configuration and click the Next button.
  9. The SharePoint Configuration Wizard will then display the Configuration Settings dialog.  You should either take a screenshot or printout of this information for future use in case you ever forget any of the settings at a later point in time.  You can then click the Next button to proceed with the configuration process.
  10. If everything goes well, you should finally see the Configuration Successful dialog.  Clicking Finish will close the Configuration Wizard and launch a Web Browser to proceed with the configuration of the SharePoint Farm.
  11. Once the Web Browser launches, you will have the option of starting a wizard to begin configuring the SharePoint Farm or to manually configure all of the options.  You will want to click the button for "Start the Wizard".
  12. On the following screen, you will be able to configure the various SharePoint Services for the Farm as well as a Managed Account to run all of the various services.  Once again, it is recommended that you create a separate managed account for production systems, but for development and testing purposes, it is acceptable to continue using the Administrator account.  Click on the Next button to continue.
  13. Once the Service Configuration is complete, you should see a screen that allows you to create your SharePoint Top-Level Web Site.  
  14. You can then enter a Title and Description for the Web Site.  In addition, depending on your needs, you can create the Web Site at the root of the site, as a My Site, or under the /sites collection.  
  15. You can then select a template for the site such as a Team Site or one of various other built-in SharePoint Site Templates.  If you wish to upload your own custom template with custom branding, you can upload that at a later time and simply create a Blank Site or a Custom Site.
  16. After entering your options, click on the OK button to continue creating the SharePoint Top-Level Web Site.
  17. After the Web Site has been successfully created, you should finally see the Farm Configuration completion screen.
  18. Click on the Finish button to return to Central Administration.

CodeRush Xpress Developer Productivity Tool

If you are looking for a free add-on to Visual Studio 2008 or 2010 that significantly extends the capability of Visual Studio, CodeRush XPress is definitely worth a look.

Some of the features that you can get from CodeRush XPress are listed here:

To download CodeRush Xpress, you can go to this website:

Tuesday, March 6, 2012

Installing SharePoint 2010 Prerequisites without an Internet Connection

If you have ever tried installing SharePoint 2010 on a machine that does not have an Internet Connection, you will soon realize that the default installation is impossible in this manner.  Even using the DVD ISO media from MSDN, not all of the content that is required to install SharePoint 2010 is present on the ISO image. 

Microsoft has increasingly moved towards providing web-based or online installers.  Unfortunately, if you are installing a server or a virtual machine without an Internet Connection, that makes life very difficult.

Fortunately, Microsoft has documented the various prerequisites that are required to install SharePoint 2010 and provided links to them in this article for Developers:

However, this does not list all of the potential Prerequisites that you may need to install on a server platform, therefore, you may need to refer to this more comprehensive list:

Unfortunately, however, these links are scattered all over the article, making it difficult to locate each one of them and install them in turn.  Therefore, I have provided the links for you below in a convenient list (for Windows Server 2008 R2 and Windows 7 Users):

  1. WCF Hotfix:
  2. ADO.Net Data Services Update for .Net 3.5 SP1:
  3. Microsoft Sync Framework:
  4. SQL Server Native Client:
  5. Windows Identity Foundation:
  6. Chart Controls:
  7. SQL Server Analysis Services-ADOMD.Net:
  8. SQL Server 2008 Hotfix: OR SQL Server 2008 SP3:
  9. Microsoft Server Speech Platform:
  10. Speech recognition language for English:
  11. SQL 2008 R2 Reporting Services SharePoint 2010 Add-In:
If all of the prerequisites were installed successfully, you should see the Installation Complete dialog when attempting to install the software prerequisites for SharePoint 2010!

Installing and configuring ADFS v. 2.0 for Developers

In order to configure and install ADFS v.2 0, you will first need to set up a domain controller just as you did with ADFS v. 1.0.

For instructions on how to set up a domain controller in a virtual machine, you can check out this earlier post:

After you have set up and configured your domain controller, you will need to download the following components:

  1. ADFS v. 2.0 RTW:
  2. ADFS v. 2.0 Update Rollup 2:
  3. Windows Identity Foundation Runtime:
Once you have downloaded the necessary components, you will need to install them.  Since Windows Identity Foundation Runtime is a prerequisite for ADFS v. 2.0, you need to install this PRIOR to installing ADFS v. 2.0.

Many of these steps are similar to what has been described in this article:

However, I have made some slight modifications for testing/development purposes.

  1. Instead of using a 3rd party SSL Certificate, simply create a Self-Signed Certificate from within the IIS Manager Console and assign the SSL Certificate Bindings to the Default Web Site.  Alternatively, if you do not want to deal with error messages about the SSL Certificate in the browser, you can instead use SelfSSL7:
  2. Instead of creating a New Federation server Farm, simply create a Stand-alone federation Server.
  3. When proceeding through the Active Directory Federation Server Wizard, you will be allowed to select or view the Website with the SSL Certificate that you just configured.
  4. If you will also be installing SharePoint 2010 on the same machine as ADFS, you will need to look at this article:  Since the SharePoint site will also need to be on a secured IIS Web Site, you will have to assign it a different host header name than the server's name.  If the loop back check has not been disabled, you will be unable to render the SharePoint site using the different host name.
  5. If you are planning on using ADFS in conjunction with SharePoint, you may also want to look at the advice in this article:
  6. If everything works correctly, you will have successfully installed and configured ADFS v. 2.0!

If you are planning to now use your ADFS v. 2.0 installation for a server installation of SharePoint 2010, you can follow the instructions outlined in this article:

If you are considering using Windows Server 2012 for your ADFS v. 2.0 deployment with SharePoint 2010, you can follow this article:

Saturday, March 3, 2012

Visual Studio 11-Draining all of the colors out of the IDE

If you have not yet installed the Visual Studio 11 Beta, you probably have not seen the drastic change they have made to the IDE.  In the Visual Studio 11 Developer Preview, Visual Studio 11 closely resembled the Visual Studio 2010 IDE with many of the same color schemes and the vivid, bright colors we have come to expect with Windows 7 and the Aero interface.

However, Microsoft has decided to take a completely different approach with Visual Studio 11 Beta.  Instead, of refreshing and updating the color scheme to reflect a new Visual Studio 11 IDE, all of the colors have been "drained out" of the interface.  Instead, one is left with an IDE that is a mixture of shades of grays and black in a manner very similar to looking at a black and white TV.

Below is a screenshot of the Visual Studio 11 Interface using the Light Theme:

Here is the screenshot of the Visual Studio 11 Interface using the Dark Theme:

Even though the Dark Theme is slightly easier to view than the Light Theme, they are both nothing like what we have come to expect from prior releases of Windows and the Visual Studio IDE.  Whereas Microsoft Windows and Visual Studio seemed to be emulating the look and feel of Mac OS X in earlier releases, this version looks like they are trying to copy the "good old days" of black and white televisions or the old green screen monitors of long ago!!

It seems that all the project icons when creating a New Project are pretty much the same shade of  gray as well:

Personally, working with icons that are all of the same color regardless of the file type, does not make it as easy to distinguish content as in earlier releases of the IDE.  Even though all of the icon images differ based on the file type, it is just not the same.

Thankfully, Microsoft did not take away our syntax highlighting when we open up a code file!

Microsoft seems to believe that this is a positive change and an overall improvement in terms of developer productivity:

I don't believe the color scheme in Visual Studio 2010 ever impacted my productivity in any sense whatsoever (at least not in a manner noticeable to me).  When I look at the Visual Studio 2010 User Interface (as shown below) and compare it side by side with the Visual Studio 11 User Interface, I seem to automatically find it much easier to look at.  I can easily distinguish my folders from my standard files by the use of color.  Since the folder icons look like the folder icons I am used to seeing all the time in Windows Explorer, it makes it that much easier.  With either the Light or Dark Themes, it feels like I have to closely examine my Solution Explorer window to figure out what I need to open.

It just does not seem natural, especially considering that this is the only product that is following this path.  If you look at the new SQL Server Management Studio that ships with SQL Server 2012 (, you can see that they have continued to follow the Visual Studio 2010 look and feel.

Interestingly enough, Microsoft still feels that color is important in regards to fast and easy recognition (particularly menu items) in Visual Studio 11:
Even Expression Blend and Expression Web do not follow the removal of color design associated with this most recent release of Visual Studio: (

We already know that SharePoint 2010 and Office 2010 are rich with color, so why single out Visual Studio???  


What do you think?  Did Microsoft make the right decision with this "no color scheme" approach?  Did they move forward or did they take 2 steps backward in designing the UI for the Visual Studio 11 IDE?

UPDATE: The RC release has some very minor improvements to the color scheme:

If you have any comments or feedback for Microsoft, you can provide them on their Visual Studio User Voice site:

These feedback items are directly related to the color scheme and theming of Visual Studio 2012 RC: