17

After installing service pack 1 for Visual Studio 2010 cannot create web site in IIS. Here is error message:

---------------------------
Microsoft Visual Studio
---------------------------
Configuring Web http://localhost/MyWebSite for ASP.NET 3.5 failed.
You must manuallyconfigure this site for ASP.NET 3.5 in order for
the site to run correctly. Visual Studio cannot detect whether this
virtual root has been configured for use with ASP.NET 2.0. The likely
cause is that you do not have sufficient priviledges to access the
IIS metabase. You may need to manually configure this site for
ASP.NET 2.0 in order for your site to run correctly.
---------------------------
OK   Help   
---------------------------

Does anybody know how to fix it ? Thanks!

P.S. I'm using windows7 x64.

Christian Hudon
  • 1,763
  • 19
  • 39
gor
  • 10,914
  • 4
  • 33
  • 40

4 Answers4

22

Have you tried run Visual Studio with "Run As Administrator" from right click?

Alberto Rubini
  • 645
  • 1
  • 10
  • 19
8

This happened to me when I deleted the default application pool.

Thanks to a Microsoft Connect report, I was able to solve this by choosing a new default application pool under the "Web Site Defaults" properties of the Sites node in the IIS 7 Manager tree.

Screenshot of the "Web Site Defaults" properties window

brianpeiris
  • 10,424
  • 1
  • 28
  • 44
4

Try changing the .Net version your Application Pool is using.

  1. Open IIS Manager from Administrative Tools.
  2. Select Application Pools on the left.
  3. On the right, double click 'DefaultAppPool' (or whichever you may have created)
  4. Under .Net Framework Version select v3.5.
  5. Click OK and restart IIS.

I don't know if you have to restart IIS or not, but it won't hurt.

Thyamine
  • 1,200
  • 7
  • 10
  • There is no asp.net v3.5 in app pools config. Only 4, 2 and no managed code. – gor Mar 11 '11 at 13:01
  • It looks like v3.5 is more an extension of v2. Take a look at this link here: http://www.hanselman.com/blog/HowToSetAnIISApplicationOrAppPoolToUseASPNET35RatherThan20.aspx – Thyamine Mar 11 '11 at 13:06
1

I found the answer here: Visual Studio 2013. You do not have sufficient privilege to access IIS web sites on your machine

IIS stores a config file on your personal drive. At my company our shared drive was down for maintenance and I was getting this error. Once the drive came back online VS.NET started working again.

Community
  • 1
  • 1
user441058
  • 1,068
  • 1
  • 14
  • 26
  • This seems to be my situation too. Our My Documents folder actually points to a shared drive on the server. The server crashed and we lost everything. Can you tell me what that config file is called and where it is? I'm trying to find way to recreate it. Thanks! – boilers222 Apr 06 '16 at 18:26