ASP.NET Core 0x80004005

后端 未结 2 1539
悲&欢浪女
悲&欢浪女 2021-01-19 20:59

I am new to ASP.NET core and I am trying to just get the basic ASP.NET Core Web Application to deploy to a Windows 2012 R2 server.

I can build and run the project lo

2条回答
  •  囚心锁ツ
    2021-01-19 21:13

    Turns out that this was result of needing to install some windows updates and this problem:

    api-ms-win-crt-runtime-l1-1-0.dll is missing when opening Microsoft Office file

    Rather than install the version discussed in the above issue I whet into Programs and Features and ran a repair on Microsoft Visual C++ 2015 Redistributable.

    The way I found this error was to convert the website to a standalone executable by performing the following steps:

    In project.json remove "type":"platform" from the dependencies:

    "dependencies": {
    "Microsoft.NETCore.App": {
      "version": "1.0.1"     
    },
    

    Then define the Windows 12 R2 runtime:

    "runtimes": {
       "win81-x64": {}
    },
    

    Then in the Website folder (the folder containing the project.json file) run the following commands from the command prompt:

    dotnet build -r win81-x64
    dotnet publish -c release -r win81-x64
    

    The standalone app should be created in the folder \bin\Release\netcoreapp1.1\win81-x64.

    Copy this to the server and then run it, a dialog should appear with a message similar to "api-ms-win-crt-runtime-l1-1-0.dll is missing".

    From there google!

    After doing all this I was able to run my Website from IIS.

提交回复
热议问题