Saturday, February 28, 2015

Available SharePoint Web Templates for AutoSPInstaller

I was recently setting up a SharePoint installation using AutoSPInstaller and when I was looking through the list of available Site Collection Templates, astonishingly enough, I could not find the Publishing site in the list of Available Site Templates to choose from!  In fact, AutoSPInstaller only has a small subset of the total available templates for SharePoint 2013.

If you want the actual list of available Site Collection Templates for SharePoint 2013, you will want to review this article which provides a PowerShell script for listing all of the available templates:

Alternatively, you can run the PowerShell script provided in this article to list out all of the available templates for your own reference:

You can then enter one of the Template IDs in AutoSPInstaller to create the Site Collection using the appropriate Template! 

Friday, February 27, 2015

Understanding Microsoft Windows DNS

If you are unfamiliar with managing Microsoft DNS, it is a bit of a learning curve to get up to speed on exactly what DNS accomplishes and how to use it appropriately in the management of your Microsoft networks.

First of all, a DNS Zone is a set of DNS records used to resolve domain name resources related to a domain (such as or

The types of DNS Records are the following:

  • SOA - Start of Authority:  Holds information about the nameservers that are authoritative for a zone as well as how long the records are cached (the TTL).
  • NS - Name Server: Identifies all the servers that hold records for a specific zone
  • A - Host: Provides Host name to IPv4 address resolution
  • PT - Pointer: Resolves IP Address to Host Name
  • CNAME - Alias: Creates an Alias or alternate DNS for a specified host name
  • SRV - Service Locator:  Points to specific services that are needed within Active Directory
  • MX - Mail Exchanger: Allow mail servers to be able to identify servers that are responsible for handling mail for a remote domain.

In most instances, you will either be creating either A or CNAME records for your Active Directory instances.

If you have a computer/server that has more than IP Address, you will probably need to create an A record to point to that specific IP Address.  This will most likely be needed in scenarios where you are hosting multiple web sites on a single web server and you have a requirement for SSL certificates which require unique IP Addresses.

If you have a computer/server that only has a single IP Address and you simply want to be able to access content on the server from a variety of friendly domain name entries, then you will likely need to create a CNAME record.  For example, if the name of your web server is called DEV, but you want to specify a more user friendly Url to access the website, you might provide a CNAME record such as or  This will allow your end users to understand what type of server they are accessing without having to physically change the name of the server to accommodate this.

Microsoft UserVoice Sites

If you have ever wondered about the full list of Microsoft UserVoice sites that are available for providing feedback for various Microsoft products, here is at least a partial list of the available UserVoice sites (the number of Microsoft UserVoice sites seems to be constantly growing....)

This site includes some additional Microsoft UserVoice sites:

Changing the MAC Address of a VMWare Virtual Machine

If you use VMWare Virtual Machines, you may have created a repository of template VMs that you use as a baseline for any other virtual machines that you create.

Of course, one of the problems with copying over existing virtual machines is that they retain the same MAC address as when the VM was first created!

As you can guess, this causes problems on your network if you have multiple VMs that are all providing the same MAC address to your network switches and routers.  This is also particularly problematic if you are assigning static IP addresses on your LAN based on unique MAC Addresses.

In the past, you would use a tool such as VMWare MAC Changer to accomplish this:

However, this tool is extremely outdated and is no longer necessary.

Instead, you can readily change the MAC address of any of your VMWare Virtual Machine Network Adapters by doing the following:

  1. Click on the VM Settings
  2. Select your Network Adapter
  3. Click on the Advanced button
  4. Notice that you can view the MAC Address of your Network Adapter
  5. Click on the Generate button to generate a new MAC Address.  Alternatively, you can also manually type in your desired MAC Address.
  6. Click on OK to save your changes
  7. Make sure you restart your VM to ensure that the new MAC Address is recognized by Windows.
  8. Your new MAC Address should now reflect in your VM!
  9. If for some reason the new MAC Address is not reflected, you can run the getmac command at the command prompt.  

For some more articles on changing the MAC Address in VMWare Virtual Machines, you can check out these articles:

Thursday, February 26, 2015

Acronis True Image vs. Easeus Partition Master

I have been using Acronis True Image for imaging my computer and cloning my disks for a number of years.  Recently, I was offered a tremendous discount on purchasing Easeus Partition Master, so I decided to purchase it and give it a spin.

As far as overall User Interface, Acronis True Image definitely shines.  However, Easeus Partition Master comes to the rescue when you need it most.

Example, I recently replaced one of the hard drives on my Netgear ReadyNAS device and I wanted to use it on one of my Windows Desktops.

I tried to clone my disk numerous times using Acronis True Image and I repeatedly got the error message: "Clone disk operation failed."  I was never able to get the reason for the error message from the User Interface so I gave up attempting to clone the disk any further using Acronis True Image.

Since I had just recently purchased Easeus Partition Master, I decided to give it a whirl as well.  Not only did Easeus Partition Master clone the drive, but the software also ran on Windows Server 2012 R2!!  I could install Easeus Partition Master on my Server OS and manage my partitions and perform various other operations without having to pay the extremely costly fees for the Server OS supported version of Acronis True Image (Acronis Backup & Recovery).

Overall, for features and functionality Easeus Partition Master is definitely worth the price and I would highly recommend it for anyone looking for a robust and reliable partition management and disk cloning utility.

Cumulative Update available for SharePoint 2013

A cumulative update for SharePoint 2013 was recently released this month and you can download it from here:

To read more about what is included in this Cumulative Update, you can read the release notes here:

Updated release for VMWare Workstation 11

An update to VMWare Workstation 11 was recently released with some new features and fixes.  You can read the Release Notes here:

To download the latest version of VMWare Workstation, you can go here:

Possible return values for ASP.NET Web API IHttpActionResult methods

When reading about ASP.NET Web API 2 and the new IHttpActionResult return type for methods, it is not readily obvious what are all of the different variations of return types for the IHttpActionResult method at first glance.

If you look at the ASP.NET Web API 2 articles closely, however, you will find a reference to the System.Web.HttpResults namespace which contains all of the possible return types as listed in this MSDN article:

The possible return types for an ASP.NET Web API IHttpActionResult method are the following:

  • BadRequestErrorMessageResult
  • BadRequestResult
  • ConflictResult
  • CreatedAtRouteNegotiatedContentResult<T>
  • CreatedNegotiatedContentResult<T>
  • ExceptionResult
  • FormattedContentResult<T>
  • InternalServerErrorResult
  • InvalidModelStateResult
  • JsonResult<T>
  • NegotiatedContentResult<T>
  • NotFoundResult
  • OkNegotiatedContentResult<T>
  • OkResult
  • RedirectResult
  • RedirectToRouteResult
  • ResponseMessageResult
  • StatusCodeResult
  • UnauthorizedResult

Wednesday, February 25, 2015

Visual Studio 2015 and Team Foundation Server 2015

If you haven't checked out the latest new releases on MSDN, they have just released a new version of Visual Studio 2015 (CTP 6) as well as the first release of Team Foundation Server 2015!!

You can check it out here:

AutoSPInstaller requiring the sysadmin server role

I was working with a recent version of AutoSPInstaller to install SharePoint 2013 and after completing the configuration of the AutoSPInstallerInput xml file and running the AutoSPInstaller script, I received the following error message:

"service_name" does not have the sysadmin role!

Well, this error message came as quite a surprise because Microsoft documents in MSDN that only the dbcreator and securityadmin SQL Server roles are required to install and configure SharePoint.

After finding this discussion thread on CodePlex:, I discovered that the PerformancePoint Service was causing AutoSPInstaller to enforce this validation check.

This was basically being enforced for backwards compatibility with SharePoint 2010, so as soon as I removed the section for installing the PerformancePoint Service from the AutoSPInstallerInput xml file, this validation check was no longer enforced!

Could not load file or assembly Newtonsoft.Json exception

I was working with an ASP.NET MVC and ASP.NET Web API solution recently and each time I built the solution, I would get the following exception:

Could not load file or assembly 'Newtonsoft.Json, Version=, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies

I checked in the assembly directory and sure enough the assembly version of Newtonsoft.Json that was being placed into the bin directory was an older version of the assembly!

I then decided to look at the project assembly references to see where that version was coming from and this is what I found:
<Reference Include="Newtonsoft.Json, Version=, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">

Well, after doing a bit of searching on the Internet, I discovered that this was the best solution to resolve these invalid project references across the solution.

From the NuGet Package Manager Console, run the following command:

Update-Package –reinstall Newtonsoft.Json

After doing that, I re-checked all of my project assembly references and this is what I now found:

<Reference Include="Newtonsoft.Json, Version=, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">

That was all that was needed to take care of this annoying problem with mismatched assembly versions!!

Using the Performance and Diagnostics Hub in Visual Studio 2013

If you want to capture performance and profiling information about your Visual Studio application, you can now accomplish this relatively easy in Visual Studio 2013.

The Performance and Diagnostics Hub is available from 2 menus in Visual Studio 2013:

  1. Debug Menu
  2. Analyze Menu

Once you click on the Performance and Diagnostics item, you will get the Performance and Diagnostics Hub as shown below:

To begin your Profiling session, you can then click on the Start button and step through the wizard:

One of the main problems, however, is that once you have profiled your application and you have results such as this:

You will notice that there is no ACTUAL TIMING information!!  Instead, all of the results are captured as ticks rather than timing information in milliseconds or seconds.  Therefore, if you are trying to get a better assessment in terms of how much ACTUAL TIME it takes to run your application, you are out of luck!

If you think Microsoft should add support for actual timing information in the Performance and Diagnostics Hub, you can vote for this UserVoice item here:

Caching with ASP.NET Web API

If you have recently started working with ASP.NET Web API, you may have noticed the lack of support for Caching.

There is currently no estimated timeframe as to when Microsoft will add support for Caching natively to ASP.NET Web API, but fortunately, there are 2 projects which add support for Caching to your existing ASP.NET Web API Projects!

  1. CacheCow:
  2. ASPNetWebAPI OutputCache:
 You can read more about the differences here:

Personally, amongst the 2 solutions, I prefer the ASPNetWebAPI OutputCache solution because it is more intuitive in using attribute based caching similar to how you can use this today in ASP.NET MVC.


Tuesday, February 24, 2015

Digitally Signing a WinZip Self-Extractor Executable

If you are looking for guidance on signing an executable created using WinZip Self-Extractor, unfortunately, WinZip does not provide you with much guidance other than pointing you to Microsoft's Authenticode website:

Fortunately, WinZip Self-Extractor Executables can be readily signed using Microsoft's SignTool executable.

In fact, this process can actually be automated using MSBuild to digitally sign your WinZip Self-Extractor Executables as in the following MSBuild script:
<Target Name="DigitallySignPackage">
    <SignToolPath>&quot;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin\signtool.exe&quot;</SignToolPath>
    <SigningArgs Include="sign" />
    <SigningArgs Include="/f $(CodeSigningCert)" />
    <SigningArgs Include="/p $(CodeSigningPassword)" />
    <SigningArgs Include="/t $(TimeStampServer)" />
    <SigningArgs Include="$(UnsignedExe)" />
  <Message Text="This is the name of the executable: $(UnsignedExe)" />
  <Exec Command="$(SignToolPath) @(SigningArgs, ' ')" />

Monday, February 23, 2015

Location of SignTool.exe installed with Visual Studio 2013

If you are looking for SignTool.exe to use to digitally sign your code and executables, you can find this executable here: 

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin\Signtool.exe

For more about how to use SignTool.exe to digitally sign your code and executables, you can read about it here:

Sunday, February 22, 2015

Google Chrome for Work

If you have downloaded Google Chrome for Work in the past, you may have noticed that they offered both a 32-bit version as well as 64-bit version of Google Chrome.

However, if you check out the latest Google Chrome for Work website, you will notice that they only offer a 32-bit version available for download:

Well, fortunately, the old website that housed both the 32-bit and 64-bit versions of Google Chrome is still available, however, it is buried in links across the web and not so easy to find any more:

Alternatively, you can also find the options for downloading both the 32-bit and 64-bit versions of Google Chrome from the main Google Chrome website here:

The advantage of the 64-bit version of Google Chrome is that it can handle more memory than the limitations imposed by the 32-bit version of Google Chrome.  Since very computers nowadays ship with a 32-bit OS, it is much more beneficial to install the 64-bit version of Google Chrome vs. the 32-bit version of Google Chrome.

Saturday, February 21, 2015

Fixing Invalid TFS Source Control Solution Bindings

I recently copied over some project files from one project to another and attempted to add it to my solution.

As you can probably guess, adding the projects to the solution did not add them to the solution source control bindings!

I went into File-->Source Control-->Advanced-->Change Source Control and reviewed the bindings:

The 2 new projects showed the "Invalid" status next to them.  Unbinding and Rebinding the projects was useless in resolving this issue.

Well, I started digging through articles on the Internet and it seems that this is a very common problem with no clear solution, so I decided to dig through the project and solution files to see if I could come up with a workable solution.

This is what I ended up doing to solve my problem:

  1. Deleted the vspscc files from the folders of the newly added projects
  2. Opened up the .csproj files and manually edited out the following lines from them: 

  3. Opened up the solution file and manually edited out the .csproj project references from them 
  4. Reloaded the solution
  5. Added the projects back into the solution
  6. The solution now successfully added the projects to Source Control!!

Thursday, February 19, 2015

Google Chrome blocks download of executables and MSIs

I have been a long time user of both Google Chrome and Mozilla Firefox, but more recently I have been using Mozilla Firefox because of the smaller overall memory footprint.

I just recently re-imaged my laptop and was surprised to discover that Google Chrome was installed by default.

Therefore, I launched Google Chrome and attempted to download my favorite zip utility (WinZip) from the following Url:

I was immediately surprised to discover the following error message when I attempted to download the files:

After reading this article:, I discovered that I needed to change a setting in Advanced Settings-->Privacy

I needed to turn off the setting for "Enable phishing and malware protection"

Once I turned off that settings, I was once again able to download executables and MSIs on my system!!

Wednesday, February 18, 2015

Profiling an ASP.NET MVC Web Application

If you want to profile or measure the performance of your ASP.NET MVC Application, there are several ways that you can accomplish this:

  1. Create or use MVC Filters to profile your MVC Controller Action Methods
  2. Use Glimpse to continuously monitor your ASP.NET MVC Application 
 If you want to profile your individual MVC Action Methods, you can use a Stopwatch Filter that is readily available from the NuGet gallery:

For more information on how to use the StopWatch Filter in your ASP.NET MVC Web Application, you can check out this article:

If you want to leverage Glimpse in your ASP.NET MVC Web Application, you can install it as a NuGet package from here:

For information on how to leverage Glimpse within your ASP.NET MVC Web Application, you can check out this article:

Tuesday, February 17, 2015

Testing Responsive Web Design using Mozilla Firefox

If you want to test Responsive Web Design techniques against your website to make sure it accommodates various different screen sizes, then Mozilla Firefox offers a nice set of tools to allow you to do this.

  1. Hit the F12 button to launch Firefox's Developer Tools
  2. In the upper right hand corner, you will find a button for "Responsive Design Mode"
  3. Click on the "Responsive Design Mode" button
  4. You will now see a screen that allows you to select various different screen sizes for you to test your website!

Sunday, February 15, 2015

Windows Azure is down!! (02/15/2015)

I just started experiencing problems with my Azure VMs and decided to check the Azure Status page here:

Of course, to my surprise I got the following error message:

The page cannot be displayed because an internal server error has occurred.

 I am not sure what is causing this outage on Windows Azure, but hopefully we will find out soon.

Friday, February 13, 2015

Migrating TeamCity to a new server when using an existing SQL Server

I recently had to move a TeamCity build server because the drive was running out of space.  Therefore, I had to research how to migrate my existing installation of TeamCity to another server or at least be able to re-install TeamCity onto another data drive.

Since I was using SQL Server to store all of my TeamCity data, I figured that the migration should be relatively easy and simple.

Also, I was using TeamCity 9, so I knew I was able to use the Backup option in TeamCity Administration option, but I was wondering if there was another solution.

I searched around for a bit and found this article:

Unfortunately, it details how to migrate from an Internal database to an external database such as SQL Server.  Well, I was already using SQL Server, so how would I migrate then??

I attempted to just change the file to point to my existing SQL Server database and re-run the setup, but as soon as I did that, I got the following error message:

So that was definitely not going to work!

Well, I decided to simply copy over the entire config directory from my existing TeamCityData directory and re-start the TeamCity Server service. (I didn't need any of the build artifact information carried over)

As you can probably guess, that worked perfectly!!

So, in order to migrate from one server to another when you are using an external database for TeamCity is simply the following:

  1. Re-install the same version of TeamCity on the new server
  2. Copy over the lib\jdbc folder containing the sqljdbc.jar file (needed for SQL Server connectivity)
  3. Shut down the TeamCity Build Agent and Server services
  4. Copy over the config directory (which includes the file)
  5. Re-start the TeamCity Build Agent and Server services
  6.  Now when you access your new server installation, TeamCity should be up and running with all of your configuration information intact just like before!!

Installing the Adobe PDF iFilter for Windows

If you need to perform any type of full-text indexing and searching on Adobe PDFs (such as with any document search engine such as Lucene or SharePoint), you will likely need the Adobe PDF iFilter which you can download from here:

In addition, you will need to follow these instructions on how to set up and configure the Adobe PDF iFilter for your Windows OS:

The installation of the Adobe PDF iFilter software is relatively simple and straightforward:

If you are interested in configuring the Adobe PDF iFilter for SharePoint, you should check out this Microsoft article:

Wednesday, February 11, 2015

Installing an Extension/Module for DotNetNuke

I am relatively new to DotNetNuke so I was very unfamiliar with how to use the system overall.  When it came to installing new extensions/modules, I was completely lost initially without a bit further research.

As it turns out the documentation and videos leaves some gaps in exactly how to get to the "Install Extension Wizard" to begin the process of uploading a new extension/module so here are the complete steps:

  1. From the Pages menu item, select Add a New Page to DNN
  2. From the Modules menu item, select Add a New Module
  3. Find the Extensions module and drag it to your New Page
  4. Now you can launch the "Install Extension Wizard"
  5. Follow the steps in the "Install Extension Wizard" to install your new extension/module
  6. Once your module has been installed, you can now add it to any new DNN CMS Pages you create.
  7. That is all there is to it!!

Tuesday, February 10, 2015

Emulating Mobile Devices using Google Chrome Developer Tools

If you are building your website for Responsive Design, chances are that you will want to be able to test various different screen sizes for your website to determine if your website renders correctly using a variety of different device sizes.

Well, fortunately, you can do just that using Google Chrome Developer Tools!

  1. Navigate to the website that you want to use for testing Responsive Design using Google Chrome
  2. Hit the F12 key to open the Chrome Developer Tools
  3. Click on the Mobile Device icon in the Chrome Developer Toolbar
  4. Select the type of Mobile Device you want to emulate
  5. You may need to refresh/reload the web page in your targeted emulated device to get the Viewport information to render correctly (by hitting the F5 key).
That is all there is to getting your website to test rendering for different mobile devices/different screen sizes!

Calculating Lines of Code in a Visual Studio Solution

In older versions of Visual Studio (prior to Visual Studio 2010), you had to resort to custom tools in order to get "Lines of Code" for any of your development and reporting metrics.

Fortunately, with the release of Code Metrics, you can now easily get the number of Lines of Code in each of your projects in a Visual Studio solution. 

With the release of Visual Studio 2010, this was restricted to only developers with access to Visual Studio 2010 Ultimate edition, making this out of the reach of a large number of the developers in the world.

Fortunately, with the release of Visual Studio 2013, Code Metrics is included even with the Professional Edition!!

In order to obtain Code Metrics for your Visual Studio Solution, simply right click on your Visual Studio Solution and select "Calculate Code Metrics":

Once you select that menu option, you will get a set of Code Metrics Results similar to the following:

That is all there is to it!!

Friday, February 6, 2015

Using the C:\Program Files (x86) directory in MSBuild projects

In prior versions of MSBuild, it was always difficult to properly obtain the path to the C:\Program Files (x86) directory without either hard-coding it into the application or writing some conditional statements to correctly determine the proper Program Files directory on the system depending on whether you were running MSBuild on a 32-bit or a 64-bit OS.

Well, fortunately, with the release of MSBuild v. 4.0, this property is now a Reserved property, though it is not well known called MSBuildProgramFiles32.

Here is a list of all of the new MSBuild Properties that were released with MSBuild v. 4.0:

For the complete listing of the Well Known and Reserved MSBuild Properties, you can check out the MSDN documentation here:

Silent installation of Adobe Flash Player on Windows

If you want to perform an unattended installation of Adobe Flash Player, then you need to get the appropriate distribution of Adobe Flash Player from here:

Once you have downloaded the appropriate distribution for your platform, you can simply use the -install switch to silently install Adobe Flash Player as outlined in this article:

Thursday, February 5, 2015

Providing custom User Stylesheets in Internet Explorer

If you ever have a need to apply your own custom stylesheets while you are browsing the Internet (particularly for Accessibility), this can be done very easily using Internet Explorer:

Go to Tools-->Internet Options-->General

Then click on the Accessibility button and you will see a dialog where you can enter a specific stylesheet to format your web pages!!

Attaching to IIS Processes in Visual Studio

If you are a web developer and have a need to attach to IIS processes while you are debugging in Visual Studio, then you should definitely check out VSCommands:

It offers an extremely useful "Attach to IIS" feature which allows you to view all of your active IIS web applications and directly attach to them from within Visual Studio:

I have been using it so frequently that I absolutely cannot live without it in all of my Visual Studio installations.  Aside, from this feature, VSCommands offers a whole host of other features and functionality that really improve your overall Visual Studio productivity:

There is a free version that can be downloaded from Visual Studio Gallery as well as a paid version with a slightly larger feature set.  Definitely worth checking out!!

Resetting the build counter in Jetbrains TeamCity

If you have a need to reset or modify the build counter/build number on a Jetbrains TeamCity Build configuration, there are 2 ways to do this:

In the Web User Interface, you can go into the Build Configuration Settings and select "Show advanced options"

Then, you can manually edit the Build Counter field or click on the Reset link:

Alternatively, you can manually modify the build configuration .properties files.

You can find these .properties files in the following location:

<TeamCity Data directory>\config\projects\NavRiskCiBuilds\buildNumbers

You can then go in and find your specific build configuration .properties file and modify the build number/build counter to whatever value you want.

The next time you run a build for your build configuration, it will automatically pick up the new build number!!

Tuesday, February 3, 2015

Changing the database connection string in Orchard CMS

If you are looking for the database connection string in Orchard CMS, as you may have figured out, it is not in the Web.config file as you would normally expect.

Instead, you can find a file called Settings.txt in the App_Data/Sites/Default folder.

In that file, you will find an element called DataConnectionString where you can change the database connection string to the appropriate value!