可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
Can anybody shed any light on the above error? I've tried with both Express and Ultimate editions of VS 2013.
I'm running 64-bit Windows 7.
Solutions to similar problems I've found tend to be targetting x86 rather than AnyCPU from the Solution explorer. However, I can't even build the solution to explore it.
The new project I'm trying to build is c# ASP.net MVC.
回答1:
Thanks for all the replies and suggestions. On the PC I'm using, the Documents directory and it's contents are encrypted by default - including my IISExpress. Removing the encryption solved the problem.
回答2:
Have you tried to manually install NuGet for VS 2013?
I had a similar issue, until I found that the VS 2013 setup - for some reason - did not install the NuGet package manager. After I installed it manually everything worked fine.
回答3:
I'm running on Win 8.1 Pro (64 bits) with Visual Studio Express for web 2013
The were two problems in my machine, namely :
the applicationhost.config file in C:\Users(insert your user log in name)\Documents\IISExpress\config was not well formed. It seems this problem occurs because the .NET configuration system reads the applicationHost.config file without locking it. If the IIS configuration file is being written to while it is being read by the Windows Activation Service (WAS), that file may be corrupted. Anyhow, I binged around and downloaded a pristine copy of it.
After fixing the above problem, I subsequently encountered the same error message (unspecified error - exception from hresult: 0x80004005 (e_fail) ). I then tried to create an MVC web project via another way. I created a blank solution and added an MVC web project to it and this time the IDE spewed out a different message. The pop-up window dumped a cryptic line like so, "IIS could not read C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config - error". I proceeded to uninstall IIS 8.0 and re-installed the application. And voila, I can now create MVC web apps again! :)
回答4:
FOUND SOLUTION
Go to Control Panel -> Programs and Features -> Select your Visual Studio Version and hit "Change"
1) Click MODIFY and enable Web Developer Tools
2) Enable Web Developer Tools
3) Click Update
回答5:
Removing Read Only property from IISExpress\Config files (applicationhost, aspnet, redirection) solved the problem for me.
回答6:
windows 7 x64, VS 2013 update 4.
repair IIS Express fix my issue
http://www.microsoft.com/en-us/download/details.aspx?id=34679
回答7:
Run Visual studio as administrator, it will solve this issue.
回答8:
I'm using Windows 8 x64 and i've found a solution by installing IIS Express 8 x64.
http://www.microsoft.com/en-us/download/details.aspx?id=34679
回答9:
I corrected this error by repairing IIS express. You can as well reinstall IIS express.
回答10:
I had the same error.
I solved the error by running Visual Studio 2013 at "run as administrator" mode as when you use web application projects IIS Express is involved.
回答11:
I got the same Unspecified error when creating a new Web Application with MVC. I then tried to install the NuGet Package Manager for VS 2013 and got a little bit more detail on what was happening:
11/13/2013 9:16:17 PM - Supported Products :
11/13/2013 9:16:17 PM - Microsoft.VisualStudio.Pro
11/13/2013 9:16:17 PM - Version : [12.0]
11/13/2013 9:16:17 PM - Microsoft.VisualStudio.IntegratedShell
11/13/2013 9:16:17 PM - Version : [12.0]
11/13/2013 9:16:17 PM - Microsoft.VisualStudio.VWDExpress
11/13/2013 9:16:17 PM - Version : [12.0]
11/13/2013 9:16:17 PM - Microsoft.VisualStudio.VPDExpress
11/13/2013 9:16:17 PM - Version : [12.0]
11/13/2013 9:16:17 PM - Microsoft.VisualStudio.VSWinExpress
11/13/2013 9:16:17 PM - Version : [12.0]
11/13/2013 9:16:17 PM - Microsoft.VisualStudio.VSWinDesktopExpress
11/13/2013 9:16:17 PM - Version : [12.0]
11/13/2013 9:16:17 PM -
11/13/2013 9:16:17 PM - References :
11/13/2013 9:16:17 PM -
11/13/2013 9:16:17 PM - Searching for applicable products...
11/13/2013 9:16:23 PM - Failed to initialize settings for Isolated Shell C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\ssms.exe: The network path was not found. (Exception from HRESULT: 0x80070035)
11/13/2013 9:16:23 PM - Found installed product - Microsoft Visual Studio 2010 Ultimate
11/13/2013 9:16:23 PM - Found installed product - Microsoft Visual Studio Ultimate 2012
11/13/2013 9:16:23 PM - Found installed product - Microsoft Visual Studio Premium 2012
11/13/2013 9:16:23 PM - Found installed product - Microsoft Visual Studio Professional 2012
11/13/2013 9:16:23 PM - Found installed product - Microsoft Visual Studio 2012 Shell (Integrated)
11/13/2013 9:16:23 PM - Found installed product - Microsoft Visual Studio Premium 2013
11/13/2013 9:16:24 PM - System.IO.FileNotFoundException: The network path was not found. (Exception from HRESULT: 0x80070035)
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at Microsoft.VisualStudio.Settings.ExternalSettingsManager.GetScopePaths(String applicationPath, String suffixOrName, String vsVersion, Boolean isLogged, Boolean isForIsolatedApplication)
at Microsoft.VisualStudio.Settings.ExternalSettingsManager.CreateForApplication(String applicationPath)
at VSIXInstaller.App.GetExtensionManager(SupportedVSSKU sku)
at VSIXInstaller.App.GetExtensionManagerForApplicableSKU(SupportedVSSKU supportedSKU, IInstallableExtension installableExtension, List`1 applicableSKUs)
at VSIXInstaller.App.InitializeInstall()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
I tried uninstalling VS 2010 (since I don't use it anymore) with no luck. I then connected to my work VPN and then when opening VS2013 I got a message stating it was looking for my settings file in an odd place:
C:\Users\Zach\\\SomeNetworkServer\something\something
I updated the path for settings under Tools > Options > Import and Export Settings (which was actually the same odd path) and both NuGet and VS2013 now seem to be working correctly.
I have no idea where it got that path but I definitely saw different behavior when I was on my work's VPN vs not.
回答12:
If the other solutions in this thread didn't help try updating your graphics drivers. I wasn't getting an error like above, but I couldn't click options in the create new project window.
I had installed uninstalled and reinstalled VS 2013 professional, premium and express multiple times, but in the end it was getting my latest graphics drivers, the beta release, that caused this issue to go away.
I'm running Windows 8.1 (with the new update), and Radeon HD7850.
回答13:
I got same exception from hresult: 0x80004005 (e_fail) error too.
This happen after I installed SQL server 2014, before that, my VS2013 is working fine.
I solve this by uninstalled IIS 8 Express, and re-install again.
Everything works fine afterwards so far.
回答14:
I was facing the same issue. I was selecting the 'Empty' MVC project template and was getting the same error again and again.
I tried selecting the 'MVC' project template and got the same error to.
Doing a bit of googling showed that a messed up application host config file of IIS express can also cause the problem. I had only one site configured in IIS express and I tried to host that from command prompt. That's when it showed me the error in applicationHostConfig file of IIS express including line number where the error was. I was playing with the file in the past and added a site without specifying the name.
Fixing that problem solved the issue for me.
回答15:
devenv /ResetSettings
worked for me.
回答16:
I had the same issue and scavenged the internet for solutions, because I did not want to reinstall VS 2013, only to find my solution in someone else's problem (oh the irony).
I had this error because my applicationhost.config was blank. I figured this part out when I realised that the project was created, just not added to the solution. So, I tried adding the project manually and it claimed that there was an error in applicationhost.config file. I go to see it, and it was empty.
For whatever reason this happens, it stops the IISexpress.exe from working either.
So, I deleted the applicationhost.config file and tried adding the project to the solution, and voila, everything works like a charm.
回答17:
I had the same issue, it turns out it just required a re-start of Visual Studio 2013. My best guess is that it was related to source control issue. A team mate had checked in changes somehow without me getting any indication,.
回答18:
I had this issue with Visual Studio 2015 and Windows10pro TH2 and i fixed it by upgrading/reinstalling "Nuget Package Manager" to the latest build
回答19:
After two days of trying to resolve this issue.
VS 2012: All good (just disabled IIS)
VS 2013: 0x80004005: Unspecified error
VS 2015: 0x80004005: Unspecified error
IIS Express via command line: Error cannot find "My documents\IIS Express\config\applicationhost.config"
Solution:
Copied applicationhost.config AND redirection.config from %programfiles%\IIS Express\config\templates\PersonalWebServer\ into the "IIS Express\config" folder under My Documents.
Make sure you copy the redirection.config file, it WILL NOT warn you about this, just fail with the obscure 0x80004005 error. Had to monitor file I/O to track it down.
Also open applicationhost.config in notepad and make sure that the %IIS_BIN%\AppServer\empty_wwwroot folder is WRITEABLE, most likely this folder is under "%programfiles%\IIS Express" and thus not writeable by default.
Also quite possible you need to set %IIS_BIN% yourself to "%programfiles%\IIS Express".
So:
Make sure %IIS_BIN% is set
Make sure you have BOTH config files copied into the config folder
Make sure the wwwroot is writeable
- Make sure the "empty_wwwroot" referenced in the .config matches the x86 / x64 setting in Visual Studio (VS uses x86 by default, can be changed to x64 under Project settings => Web Projects)
回答20:
I thought I should reply this as well, since I haven't seen my particular solution posted by anyone else... I had this same error when creating a project, and additionally I also was unable to open web projects (I got an error declaring that "Creation of the virtual directory localhost:xxxxx failed with the error: Unable to access the IIS metabase. You do not have sufficient privilege to access IIS web sites on your machine").
As it turned out, I was logged in using my Active Directory account, and the password had expired, and I had changed it on a different machine. However, for some reason, this machine (the one with Visual Studio on it) was continuing to allow me to log in with my old password even though it had expired (Windows 7/x64).
By logging in to my company's VPN, then locking my computer, and then logging in with my new password, I was able to get it to sync the machine to the new password, and this solved both of my issues. My best guess is that when accessing files, Visual Studio performs some permissions checks which Windows Explorer doesn't, and isn't very informative when something goes wrong.
回答21:
I changed permissions giving all users access to the projects folder - and rebooted - this fixed it for me.
回答22:
If you linking to any native/COM libraries,so then change the solution's build target from AnyCpu
to x86
回答23:
Yet another cause and solution here.
First, I troubleshot by closing and opening the created project (which did exist, although with issues). On doing this I got a more meaningful error suggesting that C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\Web.Config was invalid XML.
I then replaced C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\Web.Config with a copy of C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\Web.Config.default and the issue was resolved.
回答24:
The best solution for this is Open your visual studio "Run as Administrator". If you open your visual stdio 2015 , 2017 as administrator then this problem will not come.
回答25:
I am facing exactly same Problem and this trick worked for mine.
i go to file
C:\Users\user\Documents\IISExpress\config\applicationhost.config
where i found one of tag is missing "<" like this
application path="/" applicationPool="Clr4IntegratedAppPool">
i just put "<" in front of Application like this
<application path="/" applicationPool="Clr4IntegratedAppPool">
It looks very silly but believe me both VS13 and VS13 express working perfectly.