Hi
visual Studio 2017 Not Respond to Bootstrap : Why :
... .net Core 2.0.0 .....
My Code :
@model Dictionary<string,string> @{ Layout = null; }<!DOCTYPE><html><head><meta name="viewport" content="width=device-width" /><title>Controllers and Actions</title><link rel="stylesheet" asp-href-include="lib/bootstrap/dist/css/*.min.css" /></head><body class="panel-body"><table class="table table-bordered table-condensed table-striped"><tr><th>Name</th><th>Value</th></tr> @foreach (string key in Model.Keys) {<tr><td>@key</td><td>@Model[key]</td></tr> }</table></body></html>
View Source after i Run Application :
<!DOCTYPE><html><head><meta name="viewport" content="width=device-width" /><title>Controllers and Actions</title><link rel="stylesheet" href="/lib/bootstrap/dist/css/bootstrap-theme.min.css" /><link rel="stylesheet" href="/lib/bootstrap/dist/css/bootstrap.min.css" /></head><body class="panel-body"><table class="table table-bordered table-condensed table-striped"><tr><th>Name</th><th>Value</th></tr><tr><td>Connection</td><td>Keep-Alive</td></tr><tr><td>Accept</td><td>text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8</td></tr><tr><td>Accept-Encoding</td><td>gzip, deflate, br</td></tr><tr><td>Accept-Language</td><td>en-US,en;q=0.8</td></tr><tr><td>Host</td><td>localhost:2491</td></tr><tr><td>User-Agent</td><td>Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36</td></tr><tr><td>Upgrade-Insecure-Requests</td><td>1</td></tr><tr><td>MS-ASPNETCORE-TOKEN</td><td>16645d20-b445-4951-b0b0-55fb471b0b71</td></tr><tr><td>X-Original-Proto</td><td>http</td></tr><tr><td>X-Original-For</td><td>127.0.0.1:4664</td></tr></table></body></html>
start up File :
public void ConfigureServices(IServiceCollection services) { services.AddMvc(); services.AddMemoryCache(); services.AddSession(); } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseSession(); app.UseMvcWithDefaultRoute(); }
screen shot:
https://www.photobox.co.uk/my/photo/full?photo_id=500221044340 https://www.photobox.co.uk/my/photo/full?photo_id=500221044342
error on output :
ControllersAndActions> info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2] ControllersAndActions> Executed action ControllersAndActions.Controllers.DerivedController.Headers (ControllersAndActions) in 3525.532ms ControllersAndActions> info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] ControllersAndActions> Request finished in 3596.685ms 200 text/html; charset=utf-8 ControllersAndActions> info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] ControllersAndActions> Request starting HTTP/1.1 GET http://localhost:2491/lib/bootstrap/dist/css/bootstrap.min.css ControllersAndActions> info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] ControllersAndActions> Request starting HTTP/1.1 GET http://localhost:2491/lib/bootstrap/dist/css/bootstrap-theme.min.css ControllersAndActions> info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] ControllersAndActions> Request finished in 8.5921ms 404 ControllersAndActions> info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] ControllersAndActions> Request finished in 31.3293ms 404