Visual Studio 2013 > New project > unspecified error (exception from hresult: 0x80004005 (e_fail))

33

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.

c#
asp.net-mvc
visual-studio
visual-studio-2013
asked on Stack Overflow Sep 17, 2013 by user1405195 • edited Mar 12, 2014 by ForceMagic

26 Answers

12

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.

answered on Stack Overflow Nov 15, 2013 by user1405195
6

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.

answered on Stack Overflow Oct 21, 2013 by Hannes Sachsenhofer
4

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! :)

answered on Stack Overflow Apr 4, 2014 by wanglabs
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

answered on Stack Overflow May 11, 2017 by rohit patil
3

Removing Read Only property from IISExpress\Config files (applicationhost, aspnet, redirection) solved the problem for me.

3

windows 7 x64, VS 2013 update 4.

repair IIS Express fix my issue http://www.microsoft.com/en-us/download/details.aspx?id=34679

answered on Stack Overflow Mar 5, 2015 by user1391577
2

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

answered on Stack Overflow Mar 12, 2014 by Julián Taborda
2

Run Visual studio as administrator, it will solve this issue.

answered on Stack Overflow Mar 5, 2017 by kushal • edited Mar 5, 2017 by Tunaki
1

I corrected this error by repairing IIS express. You can as well reinstall IIS express.

answered on Stack Overflow Oct 6, 2014 by Prince Olelewe • edited Oct 6, 2014 by hunch_hunch
0

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.

answered on Stack Overflow Oct 20, 2013 by Asaf
0

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.

answered on Stack Overflow Nov 14, 2013 by zlongren
0

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.

answered on Stack Overflow Apr 7, 2014 by user3508667
0

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.

answered on Stack Overflow Jan 8, 2015 by Anthony Leung
0

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.

answered on Stack Overflow May 5, 2015 by Akhilesh
0

devenv /ResetSettings

worked for me.

answered on Stack Overflow Jul 6, 2015 by Anuraj
0

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.

answered on Stack Overflow Feb 3, 2016 by Sanketh. K. Jain
0

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,.

answered on Stack Overflow Jun 22, 2016 by logixologist
0

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

answered on Stack Overflow Jul 19, 2016 by Arash
0

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)
answered on Stack Overflow Jul 31, 2016 by user3734274
0

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.

answered on Stack Overflow Aug 24, 2016 by electrikshepherd
0

I changed permissions giving all users access to the projects folder - and rebooted - this fixed it for me.

answered on Stack Overflow Oct 3, 2016 by niico
0

If you linking to any native/COM libraries,so then change the solution's build target from AnyCpu to x86

answered on Stack Overflow Mar 5, 2017 by Sachith
0

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.

answered on Stack Overflow Apr 26, 2018 by Tom Walker
0

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.

answered on Stack Overflow Aug 20, 2018 by Sandeep Parashar
0

I got this problem because the default folder for new projects is inside a OneDrive folder. Creating the project elsewhere got round the error.

answered on Stack Overflow Feb 7, 2019 by nopskazoid
-1

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.

answered on Stack Overflow Nov 11, 2013 by Umar Abbas

User contributions licensed under CC BY-SA 3.0