程序 '[12604] iisexpress.exe' 已以0(0x0)代码退出

7

当我在调试模式下运行我的解决方案时,使用IIS Express作为服务器,Internet Explorer作为浏览器时,我遇到了以下错误:

The program '[12604] iisexpress.exe: Program Trace' has exited with code 0 (0x0).
The program '[12604] iisexpress.exe' has exited with code 0 (0x0).

我正在使用Visual Studio 2017。如果我改用Chrome浏览器,就不会出现这种情况。

唯一解决这个问题并继续使用IISExpress和IE的方法是进入Web项目的属性中,在调试器下取消选中启用编辑并继续

有任何想法为什么会这样吗?

3个回答

13

尝试以下任何一种解决方法....

  1. Clean + Rebuild Solution
  2. Restart Visual Studio
  3. Run Visual Studio as Admin
  4. Restart Computer
  5. Launch Without Debugging Ctrl + F5

  6. Step Into Debugging
    Hit F11 to start debugging by stepping into the first line of executed code. If that works, the problem is likely in your code somewhere (possibly an ehem StackOverflow Exception)

    Step Into

    Breakpoint on Application_Start


  7. Break on CLR Exceptions
    If there is a problem with the code on startup, you should break when thrown
    Go to Debug > Windows > Exception Settings (Ctrl + Alt + D)
    Select Common Language Runtime Exceptions

    Exception Settings

    Common Language Runtime Exceptions


  8. Change Project Port
    Go to Project > Properties > Web > Project URL
    Try using 8080, but any change might work

    Web Settings > URL > Port


  9. Create Virtual Directory
    In the above screenshot, select Create Virtual Directory to the right of the Project Url


  10. Delete .vs folder
    Open the Directory where the solution / project lives.
    Make sure hidden file are visible, and delete the .vs folder

    Delete .vs folder


  11. Restart IIS Express
    In the system tray, right click on IIS Express and select Exit

    Exit IIS Express


  12. Enable 64 Bit IIS Express
    If you're on a 64 bit machine...
    Go to Tools > Options > Projects and Solutions > Web Projects
    Select Use the 64 bit version of IIS Express...

    Use the 64 bit version of IIS Express


  13. Check Event Viewer
    Check for any additional diagnostic information in Event Viewer under Windows Logs > Application

    Event Viewer

    Windows Logs > Application > IIS Express


  14. Run IIS Express from cmd line
    You can rule out if there's an issue with Visual Studio or your Web Project itself.
    Here's the docs on Running IIS Express from the Command Line
    Pass in the path to the root of your project (where the web.config) is located

    >  "C:\Program Files (x86)\IIS Express\iisexpress.exe"  /path:C:\repos\project\
    


  15. Download IIS Express
    Get the standalone installer for Internet Information Services (IIS) 10.0 Express and try again


  16. Disable Edit and Continue
    Go to Project > Properties > Web > Debuggers
    Deselect Enable Edit and Continue although this will remove that functionality

    Disable Edit and Continue


更多阅读:


我认为在我的情况下删除 .vs 是解决方案。 - Benno

0

我的情况非常有趣。我尝试了KyleMit的所有解决方案,但都没有起作用。 因此,当我回顾我的一个服务方法中以前的提交时,我看到了这样一个操作:

  public List<Master> GetActiveMastersByCity(int cityId)
    {
        return GetActiveMastersByCity(cityId).Where(x => x.MasterStatus == MasterStatus.Active).ToList();           
    }

正如您所看到的,我的方法中有一个错误,因为在作用域中方法名称是错误的。似乎我尝试调用另一个方法,例如GetAllActiveMastersByCity,但我打错了GetActiveMastersByCity,这与我的当前方法相同。

坦率地说,这是我 .net core 故事中非常有趣的冒险。因为它已经编译和运行了,我完全不明白为什么这个问题与iis有关。

希望这能帮助大家。


0
今天我遇到了这个问题。我忘记了我已经将我的应用程序设置为单实例应用程序,并且在我尝试启动另一个程序实例时,我已经在后台运行另一个应用程序实例。 要解决这个问题,您只需打开程序属性选项卡,暂时取消“使应用程序成为单个实例应用程序”复选框的选中状态,或关闭在后台运行的相同应用程序。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接