IIS Express Web Server - (Every) Port is in Use? - visual-studio

Today I installed VS2010 SP1 Beta, and IIS 7 Express, as I currently have IIS5 on my local development machine and thought I'd try IIS Express out.
I have gone into the properties window for my Web Application, checked the 'Use IIS Express' checkbox, created the Virtual Directory when it has prompted me, but then get the message "Unable to launch the IIS Express Web Server. Port x is in use".
I have tried changing the port number from the default value that was in there, to numerous other port numbers, but whatever value is there, I am always getting this message, and am therefore unable to use the IIS Express Web Server.
Does anyone know what the problem might be, and how to get around it?

If you are using ESET NOD32 Anti Virus, you need to change the setting of "Web access protection" => HTTP, HTTPS => Web browsers => red cross the check box of your devnev.exe (This is three state checkboxs, click the check box until red cross appeared)
I have just installed VS 2010 SP1, using the above setting to tell NOD32 to leave 'IIS Express' alone.
Reference: http://weblogs.asp.net/anasghanem/archive/2009/02/01/nod32-antivirus-is-blocking-visual-studio-built-in-development-server.aspx

What version OS are you using?
Are you able to start IIS Express from command line? Could you try the following and post the error message you are seeing.
Remove IISExpress directory located under 'My documents' folder
Go to IIS Express installation folder '%programfiles%\IIS Express' (on 64-bit machine '%programfiles(x86)\IIS Express') and try to start iisexpress.exe from command line (without passing any arguments)

I had a similar problem. It seems that if IIS Express is already running a particular site and then you try to run a project that uses that site through Visual Studio it isn't able to attach the debugger. The solution was to close any running instances of IIS Express and WebMatrix and then try running the site through Visual Studio (F5).
I recommend installing WebMatrix as it's the simplest way of managing the sites and port numbers that you are using.

I have the same problem in the visual studio 2012.
I am creating a sharepoint app for the SharePoint 2013 and it happened after some days means it was working before then I got the error:
" Unable to Launch IIS web Server " "port 62308 in use.
To fix this I just went to the settings of the web project by right clicking on the project node in in right panel under the project solution tab. Change the port number and configure the virtual directory and it worked for me.
Hope it work for anyone else in case he/she has any problem.

1- Close Visual Studio.
2- Delete IIS Express folder in Documents or edit applicationhost.config:
<bindings>
<binding protocol="http" bindingInformation=":8080:localhost" />
</bindings>
3- Delete solution file.
4- Start Visual Studio and use open website.
5- Choose your website folder.

If any body still facing the same issue ... even after trying all the above steps
try the following simple steps...
1) close all other applications
2) Download TcpView application from
http://technet.microsoft.com/en-gb/sysinternals/bb897437.aspx
3) run the application, check the localport column and see who is using that specific port
and end that task
That will solve your problem ... :)

go to solution explorer, right click on the present Application then go to properties, now click on web scroll the mouse and change the port no. from project localhost:1257
NOW RUN IT...

Related

"Process with an Id of #### is not running" in Visual Studio

I am trying to run any program on visual studio 2013 update 3 and I get the following alert box:
Process with an Id of #### is not running.
Every time there is different ID number showing.
and in the error windows, I get this error message:
The program '[3148] iisexpress.exe' has exited with code -1073741816 (0xc0000008) 'An invalid handle was specified'.
Sometimes it runs and in the browser I get the following message:
The webpage is not available.
Why is this occurring and how can I resolve it?
The following steps fix the problem for me:
Close Visual Studio
Navigate to the folder where your solution files are stored and delete the hidden .vs folder.
Restart Visual Studio
Hit F5 and IIS Express should load as normal, allowing you to debug.
Note: Based on my experience and others in the comments, this problem seems to be caused by moving a project between workstations, environments, or versions of Visual Studio. There must be some environment specific information contained in the .vs folder.
Open Visual Studio as an administrator
Right-click your project and click on 'Unload Project'
Again, right-click your project and click on 'Edit PROJECT_NAME.csproj'
Find the code below and delete it:
<DevelopmentServerPort>63366</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:63366/</IISUrl>
Save and close the file .csproj
Right-click your project and reload it
First Error
For the first error:
Process with an ID #### is not running.
The following steps worked for me:
Close all instances of Visual Studio.
Rename the IISExpress folder (in my PC is in C:\Users\jmelosegui\Documents).
Add the _CSRUN_DISABLE_WORKAROUNDS Environment System variable with the value of 1.
Start Visual Studio in administrator mode. (In Windows, right click the executable file and select Run as administrator).
Second Error
The second error:
The webpage is not available
What caused this error:
I deleted IIS Express Development Certificate while playing with the SSL.
The following steps worked for me:
Go to Control Panel.
Select Add/Remove Programs.
Locate IIS 8.0 Express.
Right click on it then click Repair.
Your certificate should be back!
With respect to the first error:
Process with an ID #### is not running
This situation will sometimes occur when IIS Express fails to bind to a port. A likely reason for that is that some other process has already bound to that port. Visual Studio will launch the IISExpress.exe process (which will fail to bind to the port and exit again) and then attach to the now-terminated process, resulting in the above error.
To check, note the port number in your project settings (e.g. 12116) and then try:
netstat -ano | find "12116"
If another process has the port open, this will give its PID. You can then choose to kill the offending process or reallocate your own port number.
If you are using a 64-bit machine
Then the problem maybe due to Visual Studio use of 32-bit IIS-Express.
Solution: In Visual Studio, go to Tools menu > Options > Projects and Solutions > Web Projects > Enable the option "Use the 64 bit version of IIS Express" and click ok
I had the same problem. Just restarting Visual Studio worked for me.
My fix was simple, I was missing prerequisites. I needed to install .NET Core SDK
Kilanny's answer is correct. Most machines in 2015 are 64bit, so there's a lot of chances that you just need to enable the 64bit option under the Tools main navigation link menu. No need to configure other files or hard code ports. Besides, port assignment should be dynamic. This fix applies to 2013 With Update 3 and Visual Studio 2015 Community Edition.
Check the images below for a mini tutorial:
(I'm just improving Kilanny's answer)
It looks like there are many solutions that work and some that don't...
My issue kept surfacing after a few test iterations.
Yes restarting the PC and/or VS would resolve the issue...but temporarily.
My solution was to undo a security change I had enabled a couple days
earlier to Controlled folder access under Ransomware protection.
I undid this change by:
(right click Start)
Setting->Update & Security->Windows Security->Virus & threat protection-> Virus & threat protection settings->Manage settings
Under Controlled folder access
Click->Manage Controlled folder access
(this is also the Ransomware protection screen)
Turn Controlled folder access off.
This was 100% the issue for me as I was able to run my test without restarting VS.
Another reason this can happen is for a .NET Core Web app if you upgrade the Microsoft.AspNetCore.Components.* NuGet package to a new version but don't install the new SDK,
In my case it was upgrading Microsoft.AspNetCore.Components.WebAssembly from 6.0.0 to 6.0.1 and didn't install .NET 6.0.1 SDK
go to Properties of the start up project, increment port number of the Project Url is probably the quickest way to get around this problem which I didn't read anyone mentioned yet.
And you don't need to restart VS as it can be a pain sometimes if you needed a few other instances needed to be running.
My solution to this on a new machine and fresh install of VS 2022 was to install the 3.1 framework. So check to make sure whatever framework the project is expecting is installed on your local machine.
I had a similar problem with Chrome. It appears that VS can't attach to the Chrome process for some reason.
Solution:
Close Chrome
With Chrome closed, start the web project and allow VS to open Chrome.
For me, none of the other solutions worked.
The things I tried:
Updating and patching everything associated with Visual Studio
Reinstalling Visual Studio
Reinstalling IIS Express
Several reboots
Adding the _WORKAROUND thing to the PATH
Renaming the IIS folder under documents to regenerate the IIS config
Manually editing the csproj file and removing the whole IIS settings section
Changing the IIS executable usage to 64bit in VS settings
Changing the port of IIS in the projects settings
After checking if the problem was persistent over different projects, it turned out that the problem only occurred in one specific projects. I figured that I had to delete all the user specific files in the solutions folder (such as bin, obj, *.suo, ...)
I just deleted the whole solution folder and reverted the files in git.
TLDR:
Try deleting user specific files/folders like bin, obj, *.suo, ...
Reboot your computer before trying any of these!
Some of these may be helpful. Doing the netstat trick
netstat -ano | find
helped me as another application was using my port, but didn't completely solve my problem. IIS Express still kept crashing. It wasn't until I rebooted my win 10 PC (first time in over a week), that my problem completely cleared up.
Head to the following directory
%userprofile%\documents\IISExpress\Config directory
Delete all files within that folder. Restart visual studio and works like a charm.
I had the same problem, and what needed to be done was setup IIS Express properly.
I right clicked on my project Properties => Web (tab) and on Servers:
Project URL was already pre-populated and I clicked the button "Create Virtual Directory".
I had just reinstalled (refreshed) windows and the IIS was not setup b/c it was new.
I came across the same problem and found that somehow the file 'applicationhost.config' (in ..\Documents\IISExpress\config) had a different localhost port number (in the 'sites' section) to the one specified in project\properties\web. Changed them to the same number and the problem went away
Close VS.
Navigate to the folder of the solution and delete the hidden .vs folder.
Restart VS.
Hit F5 and IIS Express should load as normal, allowing you to debug.
If this not working, then:
right click your solution and go to properties
Click left menu Web tag
Click checkbox "Override application root Url"
and run again your project.
For me this was the solution,
Close all running Visual studio instances
Open the solution folder and remove the .vs folder (hidden folder)
Open Run Command
Type iisreset and press Ok, and you may see a command prompt and
wait for it to complete and it will close automatically
Now Open visual studio and run your project, it should run.
So, nothing worked for me and this happened to happen to me when I got a new machine. Apparently it didn't have the older versions of .Net on it. Went into VS Installer and checked the box for .Net 5 Runtime (VS 2022). Working fine now on all .Net 5 Projects.
TL;DR: if you do have the right .NET Core (or .NET I guess) runtime installed, install any patch updates or reinstall the latest version if there aren't any.
Detail:
Similar to a couple of other answers where they just didn't have the right .NET core installed. I was trying to run a .NET Core 3.1 web app which had worked fine previously for months, and this suddenly started happening.
I did have 3.1 (runtimes 3.1.21 and 3.1.22) installed. However a new one (3.1.23) had been released 12 days earlier, and installing that fixed the problem.
I have no idea if this was because it's aware that there's a new patch and I didn't have it so it wouldn't run, or if there was just something wrong with my 3.1.22 installation. Worth trying installing latest patch, or reinstalling existing installations.
I encountered this while trying to run a project I'd run many times on a machine I'd used for the project many times. Cleaning up my IIS Express directory and my .vs directory didn't work, nor did setting environment variables. I even tried re-cloning my repository to a different folder, but no success.
By trying to run via command line, I found a more useful message:
dotnet run --project [startup project path]
I saw that the project was trying to run using .NET 6.0.5, but I only had .NET 6.0.4 installed. Installing the latest .NET 6.0.5 from the Microsoft website worked.
I also had the same problem, doing the above didn't work for me. What my error turned out to be was twofold.
I had Opera as my default browser and it couldn't attach to that.
I had multiple startup projects so it wouldn't let me switch to IE until I change the default startup project back to just the MVC shell.
I set that project specifically as the startup, then I switched it back to launching IE and it started debugging again.
What I did to make this go away:
Open C:\Users\gr_mext1\Documents\IISExpress\config\applicationhost.config and remove all <site> entries in <sites> do not remove <siteDefaults>!
In your project, go to Properties, Web and click "Create Virtual Directory".
Close and re-open visual studio, load your project and run
Fixed!
None of the listed solutions worked for me. Problem was some sort of conflicting state in local applicationhost.config file. Fix is easy, just delete one in your solution. For VS2015 it should be located in <path_to_your_solution>\Solution\.vs\config\. When you launch Debug, VS will recreate that file based on settings in your project file.
Deleting the hidden .vs folder didn't work for me since the port specified in my app was being used by another app. Doing the following worked for me:
Went to properties and then click the web tab.
Changed the port number in the Start Url and the Project URL.
Clicked Create Virtual Directory.
Save and Press F5.
cmd - regedit-HKEY_LOCAL_MACHINE-SYSTEM-CurrentControlSet-Services-HTTP-START=3
Computer restarted.
worked for me!
Tried most of the things here to no avail, but finally found a fix for my machine, so thought I'd share it:
Following previous advice in another question, I had used netsh to add :: to iplisten. It turns out undoing that was my solution, by simply replacing add in their advice:
netsh http delete iplisten ipaddress=::
You can also do this manually by deleting HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP\Parameters\ListenOnlyList from the registry and restarting the service/your PC.
I update my Visual Studio to 2019 version and has this problem, I tried all solution from this question but it doesn't help to start my ASP.NET MVC 5 project with IIS Express. After I remove IIS Express (using Control Panel), download last version from www.microsoft.com and install it. After this everything works fine.
After some weeks i got update for Visual Studio and I got this problem again. I remove IIS Express and reinstall and it works fine now.
p.s. repair didn't help me, only uninstall and install.

How to solve “Microsoft Visual Studio (VS)” error “Unable to connect to the configured development Web server”

PROBLEM
If you start using "Microsoft Internet Information Services Express (IIS)" from "Microsoft Visual Studio (VS)" you may get when you run Build this error message
Unable to connect to the configured development Web server.
Failed to register URL "http://{ip_addr}:{port}/" for site "{project_name}" application "/". Error description: Access is denied. (0x80070005)
What kind of rights is it?
SOLUTION
This means that you are missing the right for using it. Create it with Netsh Commands for Hypertext Transfer Protocol > add urlacl.
Open "Command Line Interface (CLI)" called "Command shell" with Win+R write "cmd"
Open CLI windows like administrator with mouse context menu on opened windows or icon "Run as administrator"
Insert command to register url
netsh http add urlacl url=http://{ip_addr}:{port}/ user=everyone
Note
For remove you can use: netsh http delete urlacl url=http://{ip_addr}:{port}/
If not work restart Microsoft Windows (WIN) and then open project and build again.
Sometimes these symptoms may be the same like "Unable to launch the IIS Express Web server”.
Delete autogenerated config files on the project folder.
Close Visual Studio projects.
Delete .vs folder on project folder that includes applicationhost.config file.
Visual Studio will generate a new config for this project.
Opening Visual Studio as administrator will fix the problem.
I solved the error by changing the port for the project.
I did the following steps:
Right click on the project.
Go to properties.
Go to Server tab.
On tab section, change the project URL for other port, like 8080 or 3000.
Good luck!
We solved this problem with deleting .vs folder on project folder and deleting temporary ASP.NET files.
1. Close the Visual Studio.
2. Delete .vs folder on project folder that includes applicationhost.config file.
3. Delete temporary ASP.NET Files located: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root
I am using visual studio 2015.
Deleting .vs folder in the project folder helped me to fix this. You must close the visual studio first.
Solution 1
If you use a newer version of Visual Studio, you may not have this problem. I'm currently using Visual Studio 2015 and it works great.
Solution 2
You can solve this problem by changing the project's port number.
Because the reason is a port number conflict with some other application.
I had the same issue and fixed by doing that (by changing the port number).
I had solved this here : Changing project port number in Visual Studio 2013
If you use a different version of Visual Studio; you may also change the port number by project's Properties Window in Solution Explorer.
Worked for me in VS2003 and VS2017 on Windows 8
Run the command in CMD with admin rights
netsh http add iplisten ipaddress=::
Then go to regedit path [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP\Parameters] and check if the value has been added.
For more details check https://www.c-sharpcorner.com/blogs/iis-express-failed-to-register-url-access-is-denied
For me I tried a few of the above - run as administrator, check firewall.
For me it was the IIS Express configuration. A little bit of a "just get it working" fix without much investigation, but deleting the folder IIS Express is located under
C:\Users\UserName\Documents\iisexpress
Not sure what caused the issue for my VS2013 - but I am constantly flipping between VS2013 sites in IIS and IIS Express.
NOTE: When I forget to run VS2013 as Administrator, my Local IIS project gets inserted in the IIS Express applicationhost.config file, which fails to open the web project. Which is really frustrating.
I solved this just now, in the system tray (bottom right) you can click ion the IIS icon and stop the current site, then it allowed me to run.
I just encountered and resolved this in VS2013 on Windows 7. It is a Web Application Project that doesn't use SSL. But when I examined the Properties Window (F4), SSL was enabled. Setting SSL to false resolved the issue.
However, when verifying before posting this answer, turning it back on did not cause a recurrence of the problem. So it might be that anything that writes to that preferences resolves the problem, rather than the details of what was written.
I solved this by restarting my computer. I'm guessing that this port was being occupied by a process that needed to be killed.
If you've tried many ways and still have this problem, take a look at your firewall settings and make sure it does not block Visual Studio or IIS !!
This worked for me!
I tried almost all the options above, none of them worked for my scenario. Finally I was forced to uninstall IIS Express, re-start the machine, and install the same version again from Microsoft.
Anyway thanks for all the suggestions above.
This happened to me on Windows 7 and VS 2013 while viewing a project on the browser after build. I only had to close the browser "Chrome" then made sure that the port is not in use in my Network Activities using some utility then tried again and worked without any problem.
Additionally to Bruno's answer I ended up registering the same port for localhost. Otherwise VS2015 was giving me Access Denied error on server start.
netsh http add urlacl url=http://localhost:{port}/ user=everyone
May be it's because I have binding for localhost in aplicationhost.config also.
Visual Studio 2015, Windows 10, project source control was managed in TFS Online.
None of this worked form me, issue appeared after a reformat of Windows 10 and subsequent reinstall of VStudio 2015. I mapped projects to the same folder (residual folders and files were still there.)
Deleting the entire old project (specifically the .VS) and then remapping it fixed everything.
Just update Visual Studio, this is the simplest solution that worked for me.
Delete .vs folder on project folder and Delete temporary ASP.NET Files located:
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root
And the Open the Visual Studio in Admin mode and run the program
i created a new solution and imported the projects.

The Web Server Could Not Find the Requested Resource visual studio debugging

Issue
I have a .net 4.0 Web Application running in visual studio 2012, every time I go to debug the site i'm receiving the following error:
The Web Server Could Not Find the Requested Resource
What I've tried
I've followed microsoft's website with solutions: msdn
From a command prompt window, run the following command: systemroot\Microsoft.NET\Framework\ versionNumber \aspnet_regiis -i
I've also attempted to remove the .csproj.user files
Since we use Source Control i've deleted all items, the site and apppool and reconfigured from scratch.
AppPool is set to allow 32-bit applications
All to no avail...Anyone have a solution that might solve this visual studio debugging nightmare for me?
Steps:
Close all solutions in Visual Studio
open IIS7 (run > inetmgr)
Click your top node (computer name)
Open the "ISAPI and CGI Restrictions" option
check if your .Net version has the correct restriction (for example, if you're working with 4.0 is should be on "Allowed")
I was getting the same error when i was running the ASP.NET project from the IIS. I resolved this issue by configuring IIS.
Go to run
type appwiz.cpl and press enter.
Look for "Turn windows features on or off" and click on it
now windows will open for Turn windows features on or off
look for Internet Information service and select that option.
go to world wide web service under the Internet Information service branch
expand Application development feature
Select all the ASP and .net version. and click on OK.
now try running the application from asp.net , it will work :)
I had the same symptoms but a completely different problem. I had attempted to install Url Scan and it didn't seem to work correctly as I could not find the .ini file to edit settings within. I had forgotten that I had installed it, but it appears by default it will prevent debugging from working.
Uninstalling Url Scan solved the issue for me. To uninstall it I had to right-click on the .msi file and choose Uninstall. Url Scan did not show up under the "Add or remove programs" section.

visual studio error attaching debugger

I just set up my machine to code Windows Azure apps in Visual Studio 2010. I have a machine at work, which works fine. The machines are both 64-bit Windows 7. I run as administator at work. At home I installed most of the VS and .NET components as normal user, but I'm running everything now as administrator, because I assume there could be some errors correlating to that.
Creating a standard Azure project with one web role gives me this:
"there was an error attaching the debugger to the IIS worker process
for URL http://127.0.0.1:5100/ for role instance 'xyz'...".
I searched Google 24 hours and tried most of the solutions, but none worked for me:
repairing .NET 4.0 (I didn't uninstall it prior to reinstalling, but
I will try to do so now)
setting the WebRole as Start Project works fine. It runs the webpage.
<system.web> <compilation debug="true" targetFramework="4.0" /> is set to true ( http://www.google.de/url?sa=t&source=web&cd=4&sqi=2&ved=0CDgQFjAD&url=http%3A%2F%2Fstackoverflow.com%2Fquestions%2F4541593%2Fazure-error-on-starting-with-multiple-web-role-projects&ei=RAhOTq27Fsv4sgaB_LSVAw&usg=AFQjCNFa6NveaRmUhBtEIus9vwK54VojKA)
there's no httpModules to delete ( http://natacha-huguet-millot.tumblr.com/)
there's only one v4.x directory in Windows\Microsoft.NET\Framework64 ( http://social.technet.microsoft.com/Forums/en-US/windowsazuredevelopment/thread/45e01c3d-7c16-4ca7-999b-46cb20b38c1d#0c118416-484a-413c-bd18-049033b1ccb8)
running aspnet_regiis.exe -r. succeeds but doesn't work ( http://www.dotnetspark.com/kb/3720-error-attaching-debugger-windows-azure-sdk.aspx) neither does rebooting
looking for Visual Studio Web Debugger log shows this (also my section name="httpErrors" overrideModeDefault in IIS is set to Allow; source: http://dunnry.com/blog/2011/07/14/HowToDiagnoseWindowsAzureErrorAttachingDebuggerErrors.aspx):
http://127.0.0.1:5100/debugattach.aspx
Status code=403 (Forbidden) Protocol version=1.1 Cached=False
Content-Length=53 Content-Type=text/html; charset=utf-8
Date=Fri, 19 Aug 2011 20:16:48 GMT Server=Microsoft-IIS/7.5
X-Powered-By=ASP.NET
/debugattach.aspx-application debugging not activated.
When I comment out the Sites-Tag in the ServiceDefinition.csdef I get the following error:
"unrecognized attribute 'targetframework'. note that attribute names
are case-sensitive"
Here I also tried most solutions to be found on the internet:
setting the right .NET-Framework version in IIS-Manager (all application pools are set to 4.0, when starting the project, the error page shows framework 2.0 though, where can I change it?)
installing the newest .NET-Framework, I have 4.0.30319
None of them work.
If you have any advice, I will try it and list my result in this post.
I was getting this due the the properties on the azure project being set up incorrectly.
I had to change the setting from IIS Webserver to IIS Express
The first question to ask is which version of Windows 7 are you running at home? I'm going to go out on a limb and guess that it's Home Premium and at work you run Professional.
The catch is that with Home Premium (an lesser edtions) you don't have the option to install the necessary components to be able to debug in IIS. To confirm this, on your work computer go to Control Panel -> Programs and Features -> "Turn Windows features on or off" and have a look under the IIS option. You'll see more there than you do at home.
I have not found anywhere in the MS documentation on the differences between various editions of Windows 7 that this is the case. I'd be happy for someone to correct me on this though.
To get around this issue is while running at home to change the project to run with Visual Studio Development Server (right click your project -> Properties -> Web) and make sure that you change it back to using IIS before you check in your code.
Or you can buy an anytime upgrade for windows to Professional.
Got the same error and fixed it by changing the defaults for the app-pools in IIS.
Start iis manager
Select application pools
On the right side, in the 'Actions' panel click on 'Set application pool defaults'
Set .NET framework to 4.0
OPTIONAL : Set Enable 32-bit applications to true
This worked for me:
Go to IIS -> default web site -> bindings
Set the default http port back to 80.

Unable to use IIS7 with Visual Studio 2010, MVC2.0 and NET4

Here is my environment
Windows7, Visual Studio 2010, MVC2.0 and NET4
My default web site is configured to use ASP.NET v4.0 application pool.
Here is an easy way to reproduce my problem
Create a new MVC2 application
Open the properties Window
Go to the Web tab
Check "Use IIS Local Web Server"
Click on "Create Virtual Directory" button
I get this error message
To access local IIS Web Sites, you must install the following IIS components:
In addition, you must run visual Studio in the context of an Administrator account
For more information, press F1
Notice the blank line after "...the following IIS components:"
I am running VS2010 as administrator
Pressing F1 does not bring any help
I checked my Windows eventlog files and found that my metabase was corrupted
(I thought we get rid of this in IIS7 but it looks like it is still here...)
I used this Microsoft article to restore it from an old version and now everything is working
Hope this can help somebody else
Have you tried running VS as administrator?
Right click your VS shortcut and select "Run as Administrator"
I had the same error message, in my case with VS2008, Windows 7 + IIS7, when trying to add an existing web site to a solution. I think this is one of those error messages where what it states can be a big red herring, i.e. it doesn't necessarily have anything to do with running as an administrator or not having components installed.
In my case, the web site had an HTTP binding in which the hostname was set to "localhost". Once I cleared that, it worked fine. Don't ask me why I put "localhost" in there, it just seemed to make sense at the time.
My internet hunting also turned up this brief entry, which did not work for me.

Resources