Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 667
  • Last Modified:

Configuring Web Site failed

Hi.  I've been a long time VS2005 user on XP Pro, installed the VS2008 express versions for a while, then uninstalled those and talked my company into VS2008 Pro (now I have both VS2005 and VS2008 Pro on my machine).

I'm trying to create a web site project. I go to File->New->Web Site, then select an ASP.NET Web Site project, "HTTP" as the location and type something like "http://localhost/NewWebSite" in the location box.  Then I get the following error message:

'Configuring Web Site 'http://localhost/NewWebSite' for ASP.NET 2.0 failed.  You must manually configure this site for ASP.NET 2.0 in order for this site to run correctly.'

But the project is created and when I try to run the project (start the web page) I get another error:

'Unable to start debugging on the web server.  The server does not support debugging of ASP.NET or ATL server Applications."

Weird, huh?  As far as I know I'm trying to start this using the normal VS2008 framework, .NET 3.5.  I do have IIS on my machine, not sure what version.

Any thoughts on what could be causing this?  Thanks.
0
riceman0
Asked:
riceman0
  • 9
  • 8
1 Solution
 
amxCommented:
When you create the web site use file system instead of http.

When selecting http visual studio is trying to set up the site with IIS. It could be that the web server is configured for a previous version of ASP.NET
0
 
riceman0Author Commented:
I'm choosing HTTP because I'd like to serve out my web page to another computer as I develop.  I don't think I'd be able to do that with a file system project, could I?

How would I reconfigure IIS for this version of ASP.NET (oops, should've put IIS as an applicable zone...)
0
 
amxCommented:
If you do want to use IIS then i suggest creating the website in IIS then create your web site using visual studio, selecting http and then click the browse button.

Select local IIS then navigate to your website
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
riceman0Author Commented:
I get the same error even when I create the directory first within IIS and then browse to it...
0
 
amxCommented:
yeah http is the right choice :)

I don't think you'll need to change the asp.net version but in case you do open up IIS, just right click on your web site or virtual directory then select properties.

It in the asp.net tab
0
 
riceman0Author Commented:
Oh yeah I've seen that before but had forgotten how to get back to it.

Well now that's interesting... the only versions in the ASP.NET dropdown box are 1.1 and 2.0.5... since I've installed VS2008 Pro, why isn't 3.5 now an option for me?  

I have a faint recollection of having to run some command line black magic to get the latest ASP.NET stuff into IIS... do you know if that's true?
0
 
amxCommented:
3.5 is the framework version but it runs on version 2, confusing but true :)
0
 
amxCommented:
by black magic stuff you mean...

aspne t_regiis.exe -i

0
 
riceman0Author Commented:
That is exactly what I mean, thank you.   Except I had to run it in a certain directory, etc...

3.5 runs on 2??

Hm, after manually setting it to 2.0.5 on the properties page I get a slightly different error that prevents me from debugging: "Unable to start debugging on the web server.  The web server is not configured properly.  Running the web page outside of the debugger might provide more information."

I click "browse" in IIS and it gives me a 403 no permission.

Hm... do I need regiis?


0
 
amxCommented:
no you don't need regiis.

the 403 is probably because of the security settings on the site.
open up IIS --> Directory Security Tab --> edit button for Anonymous access and authentication --> check the anonymous access checkbox and uncheck the integrated windows authentication.
0
 
riceman0Author Commented:
Anonymous access is already checked, integrated win auth is not checked....

I wonder if that 403 is misleading, I got an "MMC snap in error" as I expanded the "show more info" box in IIS.
0
 
amxCommented:
So what happens when you try to browse it via visual studio?

Do you have a web.config and does it have the debug line in it?

0
 
riceman0Author Commented:
When I try to debug I get ""Unable to start debugging on the web server.  The web server is not configured properly.  Running the web page outside of the debugger might provide more information.""

When I start w/o debugging I get a web page with this error:

Failed to access IIS metabase.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.Hosting.HostingEnvironmentException: Failed to access IIS metabase.
The process account used to run ASP.NET must have read access to the IIS metabase (e.g. IIS://servername/W3SVC). For information on modifying metabase permissions, please see http://support.microsoft.com/?kbid=267904.

Interesting.  Looking at that knowledge base article now...
0
 
amxCommented:
ok now it time for some black magic

open up a command prompt and exceute this:

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i

You app should start working after this :)
0
 
riceman0Author Commented:
What does that do anyway?

I have v3.0 and v3.5 folders too, are you sure I don't want to run it in there?
0
 
riceman0Author Commented:

So that seemed to work, got one more warning that said I need to turn windows integrated authentication on, but asit happens you had just shown me where that was so that worked.  Thanks!
0
 
amxCommented:
Glad it worked out.

Just to answer your question as to what C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i does, it registers ASP.NET with IIS.

Also you were wondering about why 3.5 doesn't appear in the ASP.Net tab in IIS, its because the .NET framework for 3.5 still uses the CLR in version 2. Microsoft didn't need to release a new version for their last couple of releases

0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 9
  • 8
Tackle projects and never again get stuck behind a technical roadblock.
Join Now