建议看一下日志中有没有对应的错误信息
2017-03-16 21:14:04.5884|Microsoft.AspNetCore.Server.Kestrel|DEBUG|Connection id "0HL3CDKHORA1R" received FIN.
2017-03-16 21:14:04.5913|Microsoft.AspNetCore.Server.Kestrel|DEBUG|Connection id "0HL3CDKHORA1R" disconnecting.
2017-03-16 21:14:04.5913|Microsoft.AspNetCore.Server.Kestrel|DEBUG|Connection id "0HL3CDKHORA1R" sending FIN.
2017-03-16 21:14:04.5913|Microsoft.AspNetCore.Server.Kestrel|DEBUG|Connection id "0HL3CDKHORA1R" sent FIN with status "0".
2017-03-16 21:14:04.5913|Microsoft.AspNetCore.Server.Kestrel|DEBUG|Connection id "0HL3CDKHORA1R" stopped.
2017-03-16 21:14:32.5822|Microsoft.AspNetCore.Hosting.Internal.WebHost|DEBUG|Hosting shutdown
@SpeakHero: 找Error级别的日志
@dudu: 就是没有 所以不知道从哪里入手
@SpeakHero: web.config中是什么配置?
@dudu:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!--
Configure your application settings in appsettings.json. Learn more at http://go.microsoft.com/fwlink/?LinkId=786380
-->
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet" arguments=".\YDB.Web.Main.dll" stdoutLogEnabled="TRUE" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false" />
</system.webServer>
</configuration>
<!--ProjectGuid: 8fc3a7e8-90ee-4de8-a449-ca3dba165f6e-->
@SpeakHero: Startup中有没有下面的代码
loggerFactory.AddConsole(Configuration.GetSection("Logging"));
@dudu: 有 什么错误日志都不报 拿着真不好弄 重新安装了一下 相应的软件还是不行
@dudu: iis express都可以运行
@SpeakHero: 有没有安装 .NET Core Windows Server Hosting?
@dudu: 安装了 原有没有升级的都可以运行
@SpeakHero: 用dotnet命令能运行吗?
@dudu:
@SpeakHero: 直接用dotnet YDB.Web.Main.dll
运行站点
@dudu:
@dudu:
public class Program
{
public static void Main(string[] args)
{
var host = new WebHostBuilder()
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseStartup<Startup>()
.UseApplicationInsights()
.Build();
host.Run();
}
}
@SpeakHero: 看Startup.cs的149行
@dudu:
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
app.UseBrowserLink();
}
else
{
app.UseExceptionHandler("/Home/Error");
}
@dudu: 解决了 是编译的时候 sdk版本默认为1.0了 应该手动选择1.1 谢谢dudu