Posts
22
Comments
694
Trackbacks
9
Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005

This post describes how to compile and debug a web application using IIS7 instead of the built-in web server that comes with Visual Studio 2005. The built-in server should work right out of the box without any further configuration. While this post can pretty much be applied to any ASP.NET web application, I am writing it specifically for the source code of the open source blogging engine Subtext and as a third installment on my blog posts about how to install Subtext on Windows Vista and IIS7. Most people that set up Subtext on a machine are likely to compile the source code at one point or another, especially if you want to make changes to your page template and use user controls (as I did for my Technorati and Flickr controls). For the remainder of this post I assume that you already have successfully set up the compiled binaries for Subtext and the database mainly so that I don't need to reiterate certain necessary installation steps.

There are plenty of resources online that describe how to create/debug web applications using Visual Studio 2005 on IIS7. The two most important things you have to keep in mind are:

  1. To debug web applications you need to start Visual Studio 2005 with the "Run as Administrator" option from the right-click context menu.
  2. For debugging to work you need the IIS 6 Metabase and Configuration Compatibility components installed (which should already be the case if you set up IIS7 to work with SQL Server 2005).

Update 12/10/2007: As pointed out in some of the comments, IIS7 does not have the same functionality on all editions of Windows Vista. See this post for details. Basically the bottom line is that you won't be able to get it running on the Starter, Home, or Home Premium editions of Windows Vista because the authentication portion cannot be configured as required. The Business, Enterprise, and Ultimate editions will work fine.

For the Subtext solution the same applies as for the binaries when setting up the Virtual Directory, meaning you have to make sure the application pool is set to Classic .NET AppPool. Also, the project properties for the Subtext.Web project have to be changed from Use Visual Studio Development Server to Use IIS Web server. It is okay to let Visual Studio 2005 create the Virtual Directory for you using the Create Virtual Directory button (note: If you are not executing Visual Studio 2005 with elevated rights, you will get an error message when trying to create the Virtual Directory), but again you will have to change the application pool if the default app pool is not set to Classic .NET AppPool. Now when you start debugging the application here are some common error messages you might encounter and how to resolve them. If anyone gets any other errors please let me know and I will add them to the list (with solution if available):

Message: "Unable to start debugging on the web server. The web server is not configured correctly."
Solution: Unfortunately this is one of the most vague errors you can encounter. Microsoft recommends executing the web site in non-debug mode so that you get to see the underlying IIS error message. Check to see if that message is listed below to resolve it. If there is no error when executing in non-debug mode, make sure that debug is set to true in the Web.config file like this: <compilation debug="true" defaultLanguage="c#">. Alternatively this can also be set in the .NET Compilation settings in IIS Manager.

Message: "Server Error in Application "Default Web Site". HTTP Error 404.0 - Not Found"
Solution: This message comes up if you don't even have the Virtual Directory set up. Set up the Virtual Directory and make sure the application pool is set to Classic .NET AppPool.

Message: "Unable to start debugging on the web server. Debugging failed because integrated Windows authentication is not enabled."
Solution: On the Authentication dialog in IIS Manager enable Windows Authentication and disable Forms Authentication. You cannot have both enabled at the same time.

Message: "An exception of type 'System.InvalidOperationException' occurred in System.Xml.dll but was not handled in user code. Additional Information: There is an error in the XML document."
Solution: This exception is thrown in XmlSerializerSectionHandler.cs when deserializing the blog configuration section from Web.config. When making changes to Web.config through the IIS Manager it seems to clear out the values in the BlogConfigurationSettings section, so I had to fill in the values for all configuration parameters in the section again. These are the default values:

<!--
Checkout Subtext.Framework.Security for hashing passwords.
This should be set when first installing the application
and really shouldn't be changed afterwards.
-->
<UseHashedPasswords>true</UseHashedPasswords>

<!-- Globally control access to web services -->
<AllowServiceAccess>true</AllowServiceAccess>

<AllowImages>true</AllowImages>

<!-- Globally control use of XHTML -->
<UseXHTML>true</UseXHTML>

<!-- Default Item Count -->
<ItemCount>25</ItemCount>

<!-- Default Number of Posts to Show on Category Pages. Use 0 to show all. -->
<CategoryListPostCount>0</CategoryListPostCount>

<!-- Default Server Time Zone Offset -->
<ServerTimeZone>-8</ServerTimeZone>

<!-- Whether or not to GZIP the RSS and/or atom feeds. -->
<UseSyndicationCompression>true</UseSyndicationCompression>

Message: "An exception of type 'System.Configuration.ConfigurationErrorsException' occurred in System.Configuration.dll but was not handled in user code. Additional information: An error occurred creating the configuration section handler for BlogConfigurationSettings: There is an error in the Xml document."
Solution: This message appears as a follow-up error of the previous message. When the previous one is fixed this should go away as well.

posted on Monday, December 10, 2007 11:31 PM Print
Comments
Gravatar
# re: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
wholesale laptop adapter
5/22/2010 7:20 AM
you will get an error message when trying to create the Virtual Directory), but again you will have to change the application pool if the default app pool is not set to Classic .NET AppPool. Now when you start debugging the application here are some common error messages you might encounter and how to resolve them. <br />laptop battery manufacturer
Gravatar
# re: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
istanbul sa&#231; ekimi
5/12/2010 3:31 PM
Hi;<br />Unfortunately, although I realize I could not read the topic defalrca to help me in this regard would be glad if the mail.<br />mary lou<br />marylou23@gmail.com CCC
Gravatar
# re: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
John
3/13/2007 8:40 PM
Well, I didn't find the Windows Authentication option in IIS Manager. I still don't know if it is realted to my Vista version (Home Premuim) or not!
Gravatar
# re: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
John
3/13/2007 9:06 PM
Alright, it is back to Vista Premuim, www.iis.net/default.aspx />I should upgrade to Vista Ultimate around $700. huh!
Gravatar
# re: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
John
3/13/2007 9:12 PM
correction, i will have to buy it for $170 only :p
Gravatar
# re: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
Sascha
3/14/2007 2:36 PM
John, thanks for pointing that out, I was not aware that the different Vista versions come with limited IIS functionality. I will amend the post accordingly!
Gravatar
# re: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
NY
6/12/2007 7:06 AM
Thank you so much :)
Gravatar
# No Authentication dialog in Vista - Grrr
Eric Christianson
10/11/2007 4:38 PM
I cannot find a Properties dialog or an Authentication dialog in Vista Ultimate. Or anything resembling these. The Basic and Advanced settings are no help. Grrrr. I'll keep walking threough Google. At least this hit gave me more than the (worhless) MS help.
Gravatar
# re: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
Greg
10/31/2007 3:00 PM
I had the same problem. The fix is:<br /><br />Control Panel &gt; Programs and Features &gt; Turn windows features on or off &gt; IIS
Gravatar
# re: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
Greg
10/31/2007 3:01 PM
&gt; world wide web services &gt; Security &gt; check Windows Auth.
Gravatar
# re: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
Tbird
11/2/2007 2:01 PM
Here:<br />2pttechnology.com/Web/forums/thread/70.aspx<br />
Gravatar
# re: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
Tom
2/1/2007 3:43 PM
"On the Authentication dialog in IIS Manager enable Windows Authentication and disable Forms Authentication. You cannot have both enabled at the same time." -&gt; What does this mean? You cannot debug an application if you use Forms Authentication?
Gravatar
# re: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
araba oyunları
8/25/2010 12:43 AM
hmm i get no error message
Gravatar
# re: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
Feeding humming bird
8/25/2010 4:45 AM
Good man but it is showing some error.
Gravatar
# Google
google.com
2/4/2007 12:37 AM
Gravatar
# Visual Studio 2005 and Windows Vista
diary.jomyut.net
11/8/2007 1:41 PM
Gravatar
# re: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
Mesothelioma Forum
10/7/2010 4:36 PM
This software is indeed very smart. Anyone who will use this will be benefited.
Gravatar
# re: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
eurosportbet
10/21/2010 1:08 AM
C'est encor moi je lie tou vos poste ce site est super
Gravatar
# re: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
jocuri fotbal
1/15/2011 2:28 PM
If anyone gets any other errors please let me know and I will add them to the list (with solution if available):
Gravatar
# re: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
Pittsburgh events
2/18/2011 3:14 AM
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: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
hair restoration for men
3/3/2011 12:44 AM
I am pretty much amazed of the article content. I learned a lot from the interesting topics that are being discussed. It’s my pleasure to visit and learned things and facts of this page. I will be visiting this site more often for I am very intrigue with the topic that indeed catches my interest.
Gravatar
# re: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
berbad
3/4/2011 1:32 AM
visit this site you learned more about SEO.
SEO information
Gravatar
# re: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
business continuity
3/4/2011 11:48 AM
I've gotten a couple of those errors before and had to do a lot of searching to figure out how to fix them. I've bookmarked this page so I can fix them quickly. This should save me lots of time. Thanks.
Gravatar
# clothing manufacturer
clothing manufacturer
3/7/2011 11:43 AM
I cannot find a Properties dialog or an Authentication dialog in Vista Ultimate. Or anything resembling these
Gravatar
# re: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
maid of honor
5/25/2011 9:35 PM
Brilliant post and useful information Looking forward to future posts in this field thanks A very interesting article, interesting ideas and a lot of good questions posed Thanks for your insight for the great written piece.Thanks for sharing the informative post.
Regards.
david77
Gravatar
# re: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
adsense alternatives
5/29/2011 1:26 PM
yea i like what you done.
Gravatar
# re: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
cheat codes for cityville
7/27/2011 4:46 AM
This site is very interesting..Thanks for posting..
Gravatar
# HAppy
pmp certification
8/19/2011 3:53 AM
Thank you for this information. I appreciate your post and the effort you put in to create and format this information for us

Gravatar
# re: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
Kindle Blog
8/20/2011 10:51 AM
Why do you use subtext engine? Why not try to use wordpress instead. There is no problem at all.
Gravatar
# re: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
ETA 9089
9/4/2011 1:36 PM
It is great and comfortable using for all the people. I love your blog! You will be in our prayers and thoughts! Nice and informative post on this topic thanks for sharing with us. Thank you!
Gravatar
# re: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
Adidas Originals
9/15/2011 12:44 AM
This new and continued the Jeremy Scott usage of "tongue reconstruction method", all of the previous "Tai di bear" pattern must not a stranger to this selection of Chinese people more familiar with the pandas as a design based on without white and delicate colors easily to create a cute style, it is thanks to our national treasures born beautiful, simple black and white has enough.
Gravatar
# re: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
san antonio dental
11/10/2011 8:53 PM
In the visual studio 2010 it is more easy to do. I can handle more exception visiually. So it makes our programming easy and flexible. I wanna get such kind of program in real basis.
Gravatar
# re: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
meatless meals
11/15/2011 2:49 PM
Thanks for the help I always learn something new whenever I come here.
Gravatar
# re: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
shine
12/15/2011 11:41 AM
Thanks for providing really nice information. I will be back after some time CV Cover Letters
Gravatar
# re: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
retail industry market
12/30/2011 3:16 AM
India retailing is a path-breaking interface portal. Addressed and directed towards the retailing community across the world, the portal provides a wide-angle view and analysis
of the business of retail in India.
Gravatar
# re: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
fashion magazine
12/30/2011 3:18 AM
mages fashion strives to provide a balance of timely, credible business news and key fashion trends.
<
Gravatar
# re: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
franchise in india
12/30/2011 3:20 AM
At images franchise you can learn on how to make the right franchise decision, how to identify the right
franchise opportunity that can make you a successful business owner.
Gravatar
# re: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
jimy02
1/1/2012 10:28 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: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
Cindy
1/13/2012 2:31 AM
Keep it up, you're doing great!continue reading
Gravatar
# re: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
old food pyramid
2/5/2012 9:32 AM
I visit this first time & it has a very valuable information. & some decent design as well. I would

like to appreciate writer's nice effort. Wish u best of luck
Gravatar
# st george business attorney
st george business attorney
2/15/2012 6:33 PM
Thanks, its a very very good information of sharing and carrying out folks learn about the routines which can be currently being completed.I experience I can uncover further useful data appropriate right here, several thank you.


Gravatar
# re: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
angelaanz
5/16/2012 10:53 PM
About this topic, I have been lately in your blog once or twice now. I just wanted to say hi and show my thanks for the information provided.
how to become a pilot
Gravatar
# re: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
pilot
7/14/2012 1:16 AM
This page seems to recieve a good ammount of visitors. How do you advertise it? It gives a nice individual spin on things. I guess having something useful or substantial to talk about is the most important factor.smatt13
Gravatar
# re: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
house and lot for sale in cebu
8/22/2012 4:22 AM
That was a great article. I think it seems to be interesting this kind of topic. You have smart idea about that software and nice information. Thank's for your blog.
Gravatar
# re: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
text marketing
8/23/2012 9:35 AM
Excellent information, thank you very much for the debugging info.
Gravatar
# re: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
http://www.mh.co.za/downtime/guy
11/7/2012 4:05 AM
Don't get me wrong, i love windows but somehow i didn't managed to get along with vista. I think that there are too many updates and too many questions to be answered all the time.
Gravatar
# re: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
lyric hearing aid
2/21/2013 9:49 PM
The blog is absolutely fantastic. Lots of great information and inspiration, both of which we all need. Thanks.
Gravatar
# re: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
Free Web Directories Links
2/26/2013 3:51 AM
We appreciate your site.. Thanks
Gravatar
# re: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
business payroll tax
4/25/2013 9:13 AM
I appreciate a lot the quality information that you provide on this website and I consider it to be very useful especially for those who work in the IT field.I am using Windows Vista for 2 years and I still don't know all its features.
Gravatar
# re: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
itunes account balance
1/10/2014 10:34 PM
You extravasation unornamented us with untold a whopping grouping of grouping. Your relocation is hit and you personalised to lot it with all. I compatibility
Gravatar
# re: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
jual rumah murah
6/11/2014 3:06 AM
I just wanna say thank you for the information that you have been shared to us readers. Thanks for posting this kind of theme.
Gravatar
# re: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
patch.com
6/17/2014 5:29 AM
I simmered the veg as controlled, however put everything else in the skillet in the meantime then included the dish ask and uprooted the herb group - the first formula was approach to faffing for me. Simply served in dishes, no garnish. effortlessly the most delightful veg meal I have made yet. Truly delighted in it. Scrumptious.
Gravatar
# re: Debugging Subtext on Windows Vista using IIS7 and Visual Studio 2005
wordpress.com
8/11/2014 2:44 AM
Pleasant data, important and incredible configuration, as offer great stuff with great plans and ideas, heaps of extraordinary data and persuasion. Much obliged concerning the extraordinary data. Also a debt of gratitude is in order regarding offering.

Post Comment

Title *
Name *
Email
Url
Comment *  
Please add 4 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.