How to Make Web Application Project Use IIS

C

Cramer

I'm running XP Pro/SP2 and created a new Web Application Project in VS 2008.
I do NOT want to use the built-in Cassini Web server and instead want to use
IIS6 on my local machine.

How do I make VS 2008 use IIS for my project rather than the "built-in"
(cassini) Web server?

This should be very easy (I'd think) - but I ran into trouble when I
selected "IIS Web server" in the project properties (Web tab).

I now get an error message, "Unable to start debugging on the Web
server...". I have googled this extensively and have found nothing helpful.

FWIW, I have been developing with ASP.NET 1.1 for 4+ years and this is my
first 3.5 effort.

Thanks.
 
J

Juan T. Llibre

re:
!> I'm running XP Pro/SP2
!> I do NOT want to use the built-in Cassini Web server and instead want to use IIS6

You can't. You must use IIS 5.1, which is XP's IIS version.
IIS 6 can only be used in Windows 2003 Server.

re:
!> How do I make VS 2008 use IIS for my project rather than the "built-in" (cassini) Web server?
!> I ran into trouble when I selected "IIS Web server" in the project properties (Web tab).

You'd first have to create an IIS virtual directory for your application.

Then, in the project's Property Pages dialog box, click the Start Options tab.

Under Server, click Use custom server
....and write in the full path to the IIS virtual directory in the "Base URL" textbox.
 
C

Cowboy \(Gregory A. Beamer\)

Cramer said:
I'm running XP Pro/SP2 and created a new Web Application Project in VS
2008. I do NOT want to use the built-in Cassini Web server and instead
want to use IIS6 on my local machine.

Cassini? Have not heard that name in a while, but you are correct. That is
where it got its start. Officially, it is now the ASP.NET Development
Server.
How do I make VS 2008 use IIS for my project rather than the "built-in"
(cassini) Web server?

Change the drop down to HTTP and specify the URL. This will be your new
default. This happens when you create the site.

How to change from file to IIS (ASP.NET Dev Server to IIS):
1. Find the folder in question
2. Right click and choose web sharing
3. Make sure Execute Scripts is selected
4. Close web in VS
5. Choose Open Web and then make sure you are opening off IIS

NOTE: If you have IIS set to default, open the IIS Manager and ensure
anonymous access is selected. It will be unchecked if you have not altered
your default set up. If authentication is not set up correctly, it can
interfere with debugging.
This should be very easy (I'd think) - but I ran into trouble when I
selected "IIS Web server" in the project properties (Web tab).

I now get an error message, "Unable to start debugging on the Web
server...". I have googled this extensively and have found nothing
helpful.

Most likely wrong version of .NET as default (see below).
FWIW, I have been developing with ASP.NET 1.1 for 4+ years and this is my
first 3.5 effort.

Run aspnet_regiis -i from the 2.0 folder again. That should get everything
registered correctly for you. There is a tool for quick switching between
ASP.NET Framework versions. You can check this fairly easily by opening the
IIS manager and viewing the mappings for .aspx, etc. If mapped to version
1.x, then running the aspnet_regiis -i will work.

NOTE: This will set all sites to the new version, not just the one. If the
majority of your local sites are 1.1, you might want to get the tool I have
mentioned:
http://www.denisbauer.com/NETTools/ASPNETVersionSwitcher.aspx

All the tool does is run aspnet_regiis -s {website} (which is the IIS {root}
name, not just a friendly MySite}

Make sure the config file is correct. That can cause it to bugger up. If you
start without debugging, you will see the error.

It can also be a problem with your solution file, although I think this is
resolved in 2.0 or later.

Make sure you have windows authentication set up in IIS. That will cause it
to not work.

Here is a link to KBs on this error message:
http://tinyurl.com/6a7jd9
 
C

Cowboy \(Gregory A. Beamer\)

He is most likely still on .NET 1.1 in IIS. That is a common reason for this
error. I have listed a few more in my response to the OP.
 
J

Juan T. Llibre

re:
!> He is most likely still on .NET 1.1 in IIS.

Didn't VS 2003 create IIS applications by default ?
 
C

Cramer

Juan T. Llibre said:
re:
!> He is most likely still on .NET 1.1 in IIS.

Didn't VS 2003 create IIS applications by default ?

Yes, but I have never had 1.1 installed on this machine. While I have
developed extensively with 1.1, that was on a different computer. I have
learned over the years that it's best to start with clean installations of
everything (OS + apps) rather than trying to upgrade existing versions to a
substantially different/newer version.

I'm going to reimage this particular machine... you can see my subsequent
new post describing new problemmatic behavior (VS now shuts down with no
error message when attempting to load the project). Nobody responded to that
other post and I need to move forward... nothing like a clean sweep!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top