运行 Kestrel 生成空浏览器
Running Kestrel yields empty browser
我最近刚刚将 Visual Studio 2015
升级为 ASP.NET 5 beta8
,这导致从旧听众到这个新的“Kestrel
”的奇怪转变..
我已尝试按照说明将其发送到 运行,但我只是生成了一个控制台 window,上面写着...
Hosting environment: Development
Now listening on: http://localhost:5000
Application started. Press Ctrl+C to shut down.
好的,所以我导航到 http://localhost:5000
,然后...那里什么也没有。我的应用程序没有 运行 或任何东西。
我也尝试使用 Kestrel 使用内置设置启动默认的 ASP.NET MVC
示例项目,并获得相同的结果。我真的不知道该怎么做。
这是我到目前为止所做的...
我有它在我的project.json
文件中;
"dependencies": {
"Microsoft.AspNet.Server.Kestrel": "1.0.0-beta8",
},
"commands": {
"web": "Microsoft.AspNet.Server.Kestrel"
},
我的程序在 beta7
上运行良好,使用旧的监听器;但是现在,自从安装 beta8
后,即使那样突然也不起作用了。我正处于对这种被迫改变感到沮丧的令人毛骨悚然的阶段。我也无法在 IIS
中获得 运行。
根据要求,这是我的 Startup.cs
文件;
public Startup(IHostingEnvironment env, IApplicationEnvironment appEnv) {
// Setup configuration sources.
Configuration = new ConfigurationBuilder()
.SetBasePath(appEnv.ApplicationBasePath)
.AddJsonFile("config.json")
.AddEnvironmentVariables()
.Build();
}
public IConfiguration Configuration { get; set; }
// For more information on how to configure your application, visit http://go.microsoft.com/fwlink/?LinkID=398940
public void ConfigureServices(IServiceCollection services) {
// Add MVC services to the services container.
services.AddMvc();
services.UseCookieAuthentication(o => {
//o.ExpireTimeSpan
o.CookieName = "3b7eaa9c-decd-4c5d-83f9-01f1f11a6e22";
});
}
public void Configure(IApplicationBuilder app) {
app.UseIdentity();
app.UseStaticFiles();
app.UseMvc(routes => {
// add the new route here.
routes.MapRoute(name: "areaRoute",
template: "{area:exists}/{controller}/{action}");
routes.MapRoute(
name: "default",
template: "{controller=Home}/{action=Index}/{id?}"
);
});
}
明白请求管道问题出现在什么地方,enable logging在你的应用中。
我最近刚刚将 Visual Studio 2015
升级为 ASP.NET 5 beta8
,这导致从旧听众到这个新的“Kestrel
”的奇怪转变..
我已尝试按照说明将其发送到 运行,但我只是生成了一个控制台 window,上面写着...
Hosting environment: Development
Now listening on: http://localhost:5000
Application started. Press Ctrl+C to shut down.
好的,所以我导航到 http://localhost:5000
,然后...那里什么也没有。我的应用程序没有 运行 或任何东西。
我也尝试使用 Kestrel 使用内置设置启动默认的 ASP.NET MVC
示例项目,并获得相同的结果。我真的不知道该怎么做。
这是我到目前为止所做的...
我有它在我的project.json
文件中;
"dependencies": {
"Microsoft.AspNet.Server.Kestrel": "1.0.0-beta8",
},
"commands": {
"web": "Microsoft.AspNet.Server.Kestrel"
},
我的程序在 beta7
上运行良好,使用旧的监听器;但是现在,自从安装 beta8
后,即使那样突然也不起作用了。我正处于对这种被迫改变感到沮丧的令人毛骨悚然的阶段。我也无法在 IIS
中获得 运行。
根据要求,这是我的 Startup.cs
文件;
public Startup(IHostingEnvironment env, IApplicationEnvironment appEnv) {
// Setup configuration sources.
Configuration = new ConfigurationBuilder()
.SetBasePath(appEnv.ApplicationBasePath)
.AddJsonFile("config.json")
.AddEnvironmentVariables()
.Build();
}
public IConfiguration Configuration { get; set; }
// For more information on how to configure your application, visit http://go.microsoft.com/fwlink/?LinkID=398940
public void ConfigureServices(IServiceCollection services) {
// Add MVC services to the services container.
services.AddMvc();
services.UseCookieAuthentication(o => {
//o.ExpireTimeSpan
o.CookieName = "3b7eaa9c-decd-4c5d-83f9-01f1f11a6e22";
});
}
public void Configure(IApplicationBuilder app) {
app.UseIdentity();
app.UseStaticFiles();
app.UseMvc(routes => {
// add the new route here.
routes.MapRoute(name: "areaRoute",
template: "{area:exists}/{controller}/{action}");
routes.MapRoute(
name: "default",
template: "{controller=Home}/{action=Index}/{id?}"
);
});
}
明白请求管道问题出现在什么地方,enable logging在你的应用中。