Posts
22
Comments
698
Trackbacks
9
Installing Subtext on IIS7, and SQL Server 2005

After going through some trouble to get my Subtext blog running on a Windows Vista installation with SQL Server 2005 I decided to write this how-to so that hopefully other people don't have to go through the same problems.

The instructions explain how to set up Subtext as a Virtual Directory. I also wrote two other articles related to Subtext installation: How to set up Subtext with its own web site instance (like I did with blog.needforgeek.com) on IIS7, and How to compile and debug the Subtext source code on Vista using Visual Studio 2005.

This how-to is split into two parts: Part 1 gets straight to the point and explains step by step how to get everything set up correctly, Part 2 will give some troubleshooting advice if there are still problems. Most people search for a specific error message, so by including the error messages this post is more likely to be found by someone who needs help.


Part 1

0. Starting Point

As mentioned in the title the following instructions assume that you have an installation of Windows Vista. I used Windows Vista Ultimate Edition RC1 32 Bit which I got through the Customer Preview Program, but any edition, Beta, RC or RTM, and 32 or 64 bit should work with these instructions.

1. Installing IIS7

On a default Vista installation there is no IIS7, so you need to install the IIS7 components. However, since SQL Server 2005 requires IIS6 backward compatibility, we need to install some more features as described in the knowledge base article

2. Setting up the Database Server

I used Microsoft SQL Server 2005 Developer Edition, but again the instructions should work pretty much identical for any edition of SQL Server 2005, including SQL Server 2005 Express. Make sure to install SQL Server 2005 Service Pack 2 (note that Express has a separate download), which is needed to resolve authentication problems and other issues in Vista.

After installing SP2, the installer will inform you that even if your account has administrative privileges on Vista you don't automatically get administrative privileges on the SQL Server instance together with a link to add your current user to the SQL Server SysAdmin role. You should do that, otherwise you will have problems connecting to the server or creating the database.

Make sure to start the SQL Server Service after installing SP2, since you have to stop the service to run the update and it will not automatically start it again!

3. Preparing Subtext

After obtaining the latest binaries from the Subtext project web site on SourceForge you should unzip them to a location of your choice. I used version 1.9.2 for these instructions and unzipped the binaries into the default wwwroot folder created by the IIS7 installation.

4. Setting up the Virtual Directory

Open up the IIS Manager from Administrative Tools and expand Web Sites and Default Web Site. If you copied the Subtext binaries into the wwwroot folder, you should see the SubText-1.9.2.30 (or whatever your version is) directory now. Right-click on it and pick Convert to Application (which is basically the same as Add Application only that it prefills the values for you). The most important thing is that you change the Application pool to Classic .Net AppPool, otherwise you will have problems with the handlers and other things.

5. Creating the Database

Start up SQL Server Management Studio and connect to your local database server. Should you have failed to add your account to the SysAdmin role after installing SP2 or should the connection fail, make sure that the SQL Server Service is running and then start Management Studio using the "Run as Administrator" option from the right-click context menu. The connection to the server should now work. Then add your account to the Security -> Logins section and give yourself the SysAdmin role. Then you won't need to use elevated access rights anymore to connect to the server.

Create a new database with the name of your choice. For simplicity reasons I picked the default name SubtextData_1.9, but you can use any name. Make sure to edit the subtextData connection string in the Web.config file if you change the database name.

Now in the Security -> Logins section add a new login for the NETWORK AUTHORITY\NETWORK SERVICE user. Just like on Windows Server 2003 on Vista the NETWORK SERVICE user replaces the ASPNET user that you usually find on Windows XP systems for executing ASP.NET applications. Under User Mapping, check the Map checkbox for your Subtext database and give the account db_owner privileges. You will need that to set up the database.

6. Start Subtext installation Wizard

Open your favorite browser and navigate to the web address you used when you set up the Virtual Directory. If everything worked fine, you should see the Subtext welcome screen which will take you through the rest of the installation process.


Part 2

Problem: When installing SQL Server 2005 the following messages appears: "This program has known compatibility issues" and "After SQL Server Setup completes, you must apply SQL Server 2005 Service Pack 2 (SP2) or a later service pack before you run SQL Server 2005 on this version of Windows."
Solution: Continue and install SQL Server 2005 SP2 afterwards.

Problem: You receive this warning message for the IIS Feature Requirement on the System Configuration Check page of the SQL Server 2005 Setup program: "Microsoft Internet Information Services (IIS) is either not installed or is disabled. IIS is required by some SQL Server features. Without IIS, some SQL Server features will not be available for installation. To install all SQL Server features, install IIS from Add or Remove Programs in Control Panel or enable the IIS service through the Control Panel if it is already installed, and then run SQL Server Setup again. For a list of features that depend on IIS, see Features Supported by Editions of SQL Server in Books Online."
Solution: Install the necessary IIS7 components according to this Microsoft knowledge base article.

Problem: You receive the following message when navigating to your Subtext web address: "An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)"
Solution: Make sure the SQL Server Service is running. After installing SQL Server 2005 SP2 the service is not automatically started again!

Problem: You receive the following message when navigating to your Subtext web address: "Subtext cannot connect to your backend database. Seems to be a problem with the login."
Solution: Make sure your connecting string points to the right database and that the database exists. The Subtext installation process will create database tables, but not the database itself. If the database exists, make sure the NETWORK AUTHORITY\NETWORK SERVICE user has dbowner rights on the database.

Problem: When running SQL Server Management Studio and trying to connect to your local database server, you get the following message: "Cannot connect to <machinename>. Additional information: Login failed for user '<machinename>\<username>'. (Microsoft SQL Server, Error: 18456)"
Solution: Even if your user has administrative rights in Vista, you don't automatically have them in SQL Server. Start Management Studio using the "Run as Administrator" option from the right-click context menu and connect to the server then. Then add your account to the Security -> Logins section and give yourself the SysAdmin role. Then you won't need to use elevated access rights anymore.

posted on Monday, December 11, 2006 5:38 PM Print
Comments
Gravatar
# re: Installing Subtext on IIS7, and SQL Server 2005
Haacked
12/11/2006 6:01 PM
Great Writeup! Email me if you'd be interested in gaining write-access to http://subtextproject.com/ in order to add a page with this information.
Gravatar
# re: Installing Subtext on IIS7, and SQL Server 2005
Thomas
3/6/2007 12:50 PM
Thank you very much I needed this for my installation.
Gravatar
# re: Installing Subtext on IIS7, and SQL Server 2005
hubka.net
7/6/2007 7:06 PM
not function ... where i make mistake?<br /><br />HTTP Error 500.19 - Internal Server Error<br />Description: The requested page cannot be accessed because the related configuration data for the page is invalid. <br /><br />Error Code: 0x80070005 <br /><br />Notification: BeginRequest <br /><br />Module: IIS Web Core <br /><br />Requested URL: http://localhost:80/SubText/default.aspx <br /><br />Physical Path: C:\inetpub\wwwroot\SubText\default.aspx <br /><br />Logon User: Not yet determined <br /><br />Logon Method: Not yet determined <br /><br />Handler: Not yet determined <br /><br />Config Error: Cannot read configuration file <br /><br />Config File: \\?\C:\inetpub\wwwroot\SubText\web.config <br /><br />Config Source: <br />
Gravatar
# re: Installing Subtext on IIS7, and SQL Server 2005
Tez
2/23/2008 2:24 AM
Hi, firstly, great article. In depth and easy to follow. <br /><br />I am having trouble getting SubText working on Vista with SQLExpress. Have any experience?<br /><br />Con string at moment : "Server=tez-pc\sqlexpress;Database=SubtextData_1.9.dbo;Trusted_Connection=True;Integrated Security=True"<br /><br />Using this I see a rendered "Database Login Failure<br />But I Can Help You" screen which seems to hint and point me at connection string help. Is my connection string wrong to work with sql express? Or does subtext just not work with sqlexpress?<br /><br />Thanks<br />
Gravatar
# re: Installing Subtext on IIS7, and SQL Server 2005
software developer
10/1/2009 2:20 PM
Cool, that was pretty straight forward to follow bearing in mind how difficult it may have been without simple instructions!<br /><br /><br />Keep up the good work
Gravatar
# re: Installing Subtext on IIS7, and SQL Server 2005
Shiva
12/12/2006 2:57 AM
Very nice ! Thanks for taking time to put this together. <br /><br />I am going to try this on my Vista on Virtual PC.
Gravatar
# re: Installing Subtext on IIS7, and SQL Server 2005
karthick
11/25/2009 12:14 PM
i have installed visual studio sql server 2005.<br />but i cannot able to go to the query page as in sql 2000.
Gravatar
# re: Installing Subtext on IIS7, and SQL Server 2005
Canvas Prints
3/2/2010 5:48 PM
Trying to get this installed and updated but it's a mission, thanks for the post though.
Gravatar
# re: Installing Subtext on IIS7, and SQL Server 2005
orange county
3/26/2010 12:41 PM
I always feel great when I find the blog useful for and it takes place in my collection. And, moreover, my colleagues are just fixed on it.
Gravatar
#  re: Installing Subtext on IIS7, and SQL Server 2005
construction games
4/15/2010 7:34 AM
It is amazing to find out this page. This post is<br />good in regards of both knowledge as well as information on a Windows Vista installation .Thanks for the creative post.
Gravatar
# re: Installing Subtext on IIS7, and SQL Server 2005
compound interest formula
4/15/2010 7:40 AM
The explanation on how to set up Subtext as a Virtual Directory in this article is good. This is such a great resource that you are providing and you give it away for free. I love seeing websites like yours.
Gravatar
# re: Installing Subtext on IIS7, and SQL Server 2005
SEO UK
6/7/2010 5:25 PM
When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.
Gravatar
# re: Installing Subtext on IIS7, and SQL Server 2005
Oyunlar
8/11/2010 4:23 PM
Gravatar<br />Very nice ! Thanks for taking time to put this together.<br />
Gravatar
# re: Installing Subtext on IIS7, and SQL Server 2005
bag factory
8/16/2010 11:54 PM
thanks for sharing so good acticle. This information is good for me.
Gravatar
# re: Installing Subtext on IIS7, and SQL Server 2005
Fishing reels
8/18/2010 10:48 AM
The guide is excellent. I was having trouble setting up Subtext.
Gravatar
# re: Installing Subtext on IIS7, and SQL Server 2005
search marketing group
8/26/2010 10:00 AM
I really like your website because it provides many information about different programs which are really very helpful and very beneficial for us.
Gravatar
# Subtext Notes Around The Web
haacked.com
1/6/2007 8:44 AM
Gravatar
# Installing Subtext on Vista with IIS7 and SQL Server 2005
myblog4fun.com
9/25/2007 3:58 AM
Gravatar
# re: Installing Subtext on IIS7, and SQL Server 2005
randy
10/30/2010 4:19 AM
thank you very much for the post!
Gravatar
# re: Installing Subtext on IIS7, and SQL Server 2005
Waterproof Socks
11/3/2010 4:06 PM
From what I gather about Subtext, it appears to be a very open-ended way to design blogs, which could be great for people with very specific, creative ideas.
Gravatar
# re: Installing Subtext on IIS7, and SQL Server 2005
hats
12/15/2010 7:18 AM
Even if your user has administrative rights in Vista, you don't automatically have them in SQL Server. Start Management Studio using the "Run as Administrator" option from the right-click context menu and connect to the server then. Then add your account to the Security -> Logins section and give yourself the SysAdmin role. Then you won't need to use elevated access rights anymore.
Gravatar
# re: Installing Subtext on IIS7, and SQL Server 2005
Top Shirts
1/16/2011 2:28 PM
Thanks for wonderful guide. It's very helpful for me.
Gravatar
# re: Installing Subtext on IIS7, and SQL Server 2005
Downloads
2/9/2011 2:20 AM
Intersting! I make only the first steps in programming. I need to know it for my job.
Gravatar
# re: Installing Subtext on IIS7, and SQL Server 2005
sugarcrm development
2/11/2011 9:36 PM
Best seo company Corelynx provide good SEO Services for promote your business. Want to need good seo services then contact us.
Gravatar
# re: Installing Subtext on IIS7, and SQL Server 2005
Pittsburgh events
2/18/2011 3:15 AM
The explanation on how to set up Subtext as a Virtual Directory in this article is good. This is such a great resource that you are providing and you give it away for free. I love seeing websites like yours.
Gravatar
# re: Installing Subtext on IIS7, and SQL Server 2005
pressure washer reviews
3/1/2011 10:31 PM
Idée très intéressante, il me faut maintenant découvrir de toute urgence le reste de votre site. J'attends avec impatience la suite ! Paola :)
Gravatar
# clothing manufacturer
clothing manufacturer
3/7/2011 11:42 AM
The guide is excellent. I was having trouble setting up Subtext.
Gravatar
# re: Installing Subtext on IIS7, and SQL Server 2005
mensagens para orkut
4/25/2011 2:09 PM
I've seen this list of components a few places (including the kb article) but under Secutity, there is no Windows Authentication option. I have every IIS option checked and still receive the error above. Any thoughts on why I can't install still? Is vista requiring I be joined to a domain in order to select Windows Authentication?
Gravatar
# re: Installing Subtext on IIS7, and SQL Server 2005
adsense alternatives
5/29/2011 1:24 PM
thats quite cool hey thanks old news and still revent is allways the way fowards thanks for that!
Gravatar
# orange county spinal decompression
orange county spinal decompressi
6/1/2011 11:59 PM
I really like your website because it provides many information about different programs which are really very helpful and very beneficial for us.
Gravatar
# best hairstyles
best hairstyles
10/12/2011 10:45 PM
I like very much your way of presentation.. I got more useful information on this blog.. Thanks to sharing the useful information….
Gravatar
# re: Installing Subtext on IIS7, and SQL Server 2005
benefits of fragrance oils
11/10/2011 10:30 AM
Thankyou this helped me at my job I think I would be fired if I did not know how to do this.
Gravatar
# re: Installing Subtext on IIS7, and SQL Server 2005
san antonio dentists
11/10/2011 9:02 PM
This installing is eaiser in windows 7 server edition. I have alread installed my copy on it. It works more finely than others.
Gravatar
# re: Installing Subtext on IIS7, and SQL Server 2005
randy
12/24/2011 9:05 PM
kindle fire black friday The Black Friday Kindle Fire is good for consumers who want a quality multipurpose device at a low price. It is great for reading magazines, playing games, and browsing the internet.
Gravatar
# re: Installing Subtext on IIS7, and SQL Server 2005
jimy
1/1/2012 10:26 AM
The best time to get anything electronic is on Black Friday. While that fact has always held true, it is going to be especially good this year.black friday kindle fire
Gravatar
# re: Installing Subtext on IIS7, and SQL Server 2005
child anxiety treatment
1/26/2012 8:40 AM
Thank you for sharing this kind of tutorial. Been looking for this all around.
Gravatar
# re: Installing Subtext on IIS7, and SQL Server 2005
the energy egg
3/23/2012 2:22 AM
Easy if you have this type of instructions. Good thing, you made it in article.
Gravatar
# re: Installing Subtext on IIS7, and SQL Server 2005
StudyAlways
1/27/2013 4:55 PM
It it possible to use subtext with MYSQL

Regards
Nikhil
Gravatar
# COMMENTS
ornaddash
6/12/2013 8:38 PM
I bumped into your post. I don't usually post in blogs but your blog forced me to. Awesome work! Thank you for sharing! http://freeoffshorecasinogames.co.uk/
Gravatar
# COMMENTS
http://informationoftechnologyan
6/13/2013 3:54 AM
Its an unique article having some interesting news about the culture, i like it. Its really fun and cool. But i want to know something more about this…. informationoftechnologyanddigitaltechnology.co.uk/
Gravatar
# re: Installing Subtext on IIS7, and SQL Server 2005
Rd - Tech Guru
12/6/2013 6:53 AM
Excellent step by step tutorial. In the future, I intend to set up my own hosting, some of the process is similar.
Gravatar
# re: Installing Subtext on IIS7, and SQL Server 2005
neha
5/31/2014 1:32 AM
Acquire indubitable to embark the SQL Server Duty posterior installing SP2, therefore you acquire to delay the utility to hurry the revise further it devise nay automatically institute it afresh! freedebtconsolidationquotes.com
Gravatar
# re: Installing Subtext on IIS7, and SQL Server 2005
mona
6/11/2014 5:00 AM
Manufacture infallible your connecting twine pinpoints to the franchise database furthermore that the database bes. The Subtext installation operation inclination found database counters, besides nay the database itself. china pcb manufacturing
Gravatar
# re: Installing Subtext on IIS7, and SQL Server 2005
MONA
7/9/2014 10:07 PM
You should do that, else you determination experience dilemmas connecting to the server or creating the database. iphone 6 precio
Gravatar
# re: Installing Subtext on IIS7, and SQL Server 2005
Web Design
9/8/2014 3:56 AM
Therefore, essays are (by nature) concise and require clarity in purpose and direction.

Post Comment

Title *
Name *
Email
Url
Comment *  
Please add 3 and 5 and type the answer here:
News
Welcome! This is the blog of a .NET software development enthusiast living in Silicon Valey, California, USA. The opinions posted here are my own and in no way represent the opinions of my employer or anybody else.