【问题标题】:1.0.0-rc1-update: An error occurred attempting to determine the process id of the DNX process hosting your application1.0.0-rc1-update:尝试确定托管您的应用程序的 DNX 进程的进程 ID 时发生错误
【发布时间】:2016-04-18 18:28:46
【问题描述】:

我的项目.json

    {
  "webroot": "wwwroot",
  "version": "1.0.0-rc1-update",
  "dependencies": {
    "Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final",
    "Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-final",
    "Microsoft.AspNet.Diagnostics": "1.0.0-rc1-final",
    "Microsoft.AspNet.Mvc": "6.0.0-rc1-final",
    "Microsoft.Extensions.Logging.Console": "1.0.0-rc1-final",
    "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-rc1-final",
    "Microsoft.AspNet.StaticFiles": "1.0.0-rc1-final",
    "Microsoft.Extensions.Configuration": "1.0.0-rc1-final",
    "EntityFramework": "6.1.3",
    "jqGridWebApi": "1.1.4",
    "EnyimMemcached": "2.13.0",
    "xunit": "2.2.0-beta1-build3239",
    "Moq": "4.2.1510.2205",
    "NLog": "2.1.0",
    "CryptSharpOfficial": "2.1.0",
    "System.Linq.Dynamic": "1.0.4"
  },
  "commands": {
    "web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5001",
    "kestrel": "Microsoft.AspNet.Hosting --server Kestrel --server.urls http://localhost:5005"
  },
  "frameworks": {
    "dnx451": {
      "frameworkAssemblies": {
        "System.configuration": "4.0.0.0",
        "System.Data": "4.0.0.0"
      },
      "dnxcore50": { }
    }
  },
  "exclude": [
    "wwwroot",
    "node_modules",
    "bower_components"
  ],
  "publishExclude": [
    "node_modules",
    "bower_components",
    "**.xproj",
    "**.user",
    "**.vspscc"
  ],
  "scripts": {
    "prepublish": [ "npm install", "bower install", "gulp clean", "gulp min" ]
  },
  "configurations": {
    "Staging": { }
  }
}

我的 launchSettings.json 文件是:

    {
  "iisSettings": {
    "windowsAuthentication": false,
    "anonymousAuthentication": true,
    "iisExpress": {
      "applicationUrl": "http://localhost:5001/",
      "sslPort": 0
    }
  },
  "profiles": {
    "IIS Express": {
      "commandName": "IISExpress",
      "launchBrowser": true,
      "environmentVariables": {
        "ASPNET_ENV": "Development"
      },
      "sdkVersion": "dnx-clr-win-x64.1.0.0-rc1-update1"
    },
    "web": {
      "commandName": "web",
      "launchBrowser": true,
      "launchUrl": "http://localhost:5005",
      "environmentVariables": {
        "Hosting:Environment": "Development"
      }
    }
  }
}

我的 web.config 是

    <?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.webServer>
    <handlers>
      <remove name="ExtensionlessUrlHandler-Integrated-4.0" />
      <remove name="OPTIONSVerbHandler" />
      <remove name="TRACEVerbHandler" />
      <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
      <add name="httpPlatformHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" />
    </handlers>
    <httpPlatform processPath="%DNX_PATH%" arguments="%DNX_ARGS%" stdoutLogEnabled="true" startupTimeLimit="3600" />
  </system.webServer>
</configuration>

顺便说一句,solution 不适用于我的情况。我都试过了。谢谢。

【问题讨论】:

标签: asp.net asp.net-core asp.net-core-mvc asp.net-core-1.0


【解决方案1】:

我发现了错误。在 project.json 文件中。我的代码是

"version": "1.0.0-rc1-update",

我改成

"version": "1.0.0-rc1-update1",

它必须与launchSettings.json文件中的sdk版本匹配。

【讨论】:

    猜你喜欢
    • 2016-01-14
    • 1970-01-01
    • 1970-01-01
    • 2017-04-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多