Installing SiteFinity with IIS 8, SQL Server 2012, and Windows Server 2012

I’m working on a new project that uses the Sitefinity CMS by Telerik. So far I’ve been impressed with the architecture and features it provides. The documentation is robust and there is good support. I did run into a couple of snags installing a new Sitefinity instance on an Azure VM that is running Windows Server 2012, IIS 8, and SQL Server Express 2012. Here are a few tweaks you’ll need to make to get an install working.

If you specify a “SQL Server Express” install during the setup, it will use the file system and create a .MDB file in your App_Data folder, which we don’t want. We want to use the database itself.

After some digging, and tweaking, I found the following article that really outlines everything nicely:

http://www.codeproject.com/Articles/674930/Configuring-IIS-ASP-NET-and-SQL-Server

If you don’t want to read the entire thing, here are the highlighted points of the article below.

Note: First use the Sitefinity Project Manager app to install the files in the location of your choosing, but do not check the box at the end to open up the administration settings. With the files in place, you’ll want to do the things outlined below.

Change the Application Pool identity to Network Service

With IIS 7.5 or so, the security was updated to create an individual AppPoolIdentity account for each website. Unfortunately we can’t link this identity up to a SQL Server login, which we ultimately want. Changing the identity for the application pool (in Advanced Settings) to “Network Service” will bypass these issues.

Grant Full Control of the App_Data folder to the Network Service account

Since the site will be running under the Network Service user, we need to give them full control of the App_Data folder in order to upload files, add templates, etc. You can do this by opening the preferences for the App_Data folder in file explorer and adding the user in the security tab. Make sure to go back to the advanced options and apply the security to all child folders of the App_Data folder.

Add a Network Service login in SQL Server and give it sysadmin privileges

Oddly enough you can’t add the Network Service user through the Management Studio interface, but you can do it in a standard query window with the following statement:

CREATE LOGIN [NT AUTHORITY\NETWORK SERVICE] FROM WINDOWS

Once you’ve done this, you can use the Management Studio interface to grant the user the “sysadmin” role. After the initial database is created you can go back in and refine the security a bit more for your specific database.

Finish Installation

Now that the settings are in place, you can launch the website and step through the process to complete the installation. You should be able to select “Microsoft SQL Server” (not express) as your database option, use “Windows Authentication” and simply provide the name of the server and database. This will work with a SQL Server Express install as well, simply use MACHINE NAME\SQLEXPRESS as the server name and you should be set.

Sometimes the devil is in the details, and these small details took me the better part of a day and a half to finally piece together. Next time, it won’t be so crazy.

5 thoughts on “Installing SiteFinity with IIS 8, SQL Server 2012, and Windows Server 2012

  1. Hi Dillie-O, great article! BTW – Either way is a-ok, but you should be able to add the Network Services account via the SQL Mgmt Tool interface. The way I do it is:

    1. Open up SMT
    2. Expand Server
    3. Expand Security
    4. Rt Clk on Logins
    5. Select New Logins
    6. Type Network and then click “Search”
    7. Select “NT AUTHORITY\NETWORK SERVICE”

    Never had an issue in MSSQL 2008-R2 or 2012, but maybe this is an Express specific deal?

    Cheers!

    1. Hi David, Thanks for the compliment! I think it may have been a SQL Express issue. Oddly enough I could use the step you outlined to search for the account, but when I went to add it it kept assigning the NETWORK SERVICE account to the domain of the server, and attempts to use the search box and specify NT AUTHORITY didn’t work. Fortunately the basic SQL command worked.

What are your 10 bits on the matter? I want to know!

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s