我的project.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对我的情况不起作用。我尝试了所有。感谢。
答案 0 :(得分:0)
我发现了错误。在project.json文件中。我的代码是
"version": "1.0.0-rc1-update",
我将其更改为
"version": "1.0.0-rc1-update1",
它必须与launchSettings.json
文件中的sdk版本匹配。