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

后端 未结 26 1565
长情又很酷
长情又很酷 2020-12-14 15:19

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 si

相关标签:
26条回答
  • 2020-12-14 15:44

    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.

    0 讨论(0)
  • 2020-12-14 15:45

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

    0 讨论(0)
  • 2020-12-14 15:45

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

    0 讨论(0)
  • 2020-12-14 15:46

    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)
    0 讨论(0)
  • 2020-12-14 15:46

    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.

    0 讨论(0)
  • 2020-12-14 15:49

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

    0 讨论(0)
提交回复
热议问题