Aspnetcore: When using MVC HTML Tag Helpers blank white page gets rendered

Created on 16 May 2016  路  5Comments  路  Source: dotnet/aspnetcore

I am using VS 2015 CE.
Created a new MVC project with blank template and started adding the components one after another.
Created a single controller with only 3 views 'Home', 'About' and 'Contact'
It worked fine with normal HTML links mapped to the above views, however as a best practice when I tried adding Tag Helpers ( "Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-beta8") and used them via _ViewImports.cshtml problem starts.

It does not render any of my views and simply shown a white blank page for all the actions.

I tried
<li><a controller="App" action="Index">Home</a></li>
as well as
<li><a asp-controller="App" asp-action="Index">Home</a></li>

but no luck. The following is my DNVM Listing

Active Version Runtime Architecture Location Alias

   1.0.0-beta5       clr     x64          C:\Users\Admin\.dnx\runtimes
   1.0.0-beta5       clr     x86          C:\Users\Admin\.dnx\runtimes
   1.0.0-beta5       coreclr x64          C:\Users\Admin\.dnx\runtimes
   1.0.0-beta5       coreclr x86          C:\Users\Admin\.dnx\runtimes
   1.0.0-beta8       clr     x86          C:\Users\Admin\.dnx\runtimes
   1.0.0-beta8       coreclr x86          C:\Users\Admin\.dnx\runtimes
   1.0.0-rc1-final   clr     x64          C:\Users\Admin\.dnx\runtimes
   1.0.0-rc1-final   clr     x86          C:\Users\Admin\.dnx\runtimes
   1.0.0-rc1-final   coreclr x64          C:\Users\Admin\.dnx\runtimes
   1.0.0-rc1-final   coreclr x86          C:\Users\Admin\.dnx\runtimes
   1.0.0-rc1-update1 clr     x86          C:\Users\Admin\.dnx\runtimes
  *1.0.0-rc1-update2 clr     x86          C:\Users\Admin\.dnx\runtimes default, latest, list
   1.0.0-rc1-update2 coreclr x86          C:\Users\Admin\.dnx\runtimes

Please suggest a fix ASAP.

Most helpful comment

I switched back to the RC1 and also updated my project.json file accordingly.
Also restored "Microsoft.AspNet.Tooling.Razor" to "1.0.0-rc1-final"

And it worked like charm.
Thank you guys for pointing out correctly.

N Baua

All 5 comments

Sounds like the server is returning a non-2xx status. Please check the F12 console in your browser. I think some browsers also have right-click Properties that should show the HTTP status code.

"Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-beta8"

Are you trying to run a beta8 package on an rc1-update2 runtime? That can't end well.

@nbaua RC2 was released today, so I recommend moving to it as soon as you can. If you can't, @MaximRouiller's right, just use RC1 version of the packages with your app, otherwise who knows what can go wrong.

@MaximRouiller and @muratg The VS2015 suggests everything to the latest and I also ran in to it, Thanks for pointing out, I'll switch to the RC1.

@dougbu , I already checked via developer tools in chrome, there is no error on console, and that's why I dared to post this as an issue, thanks anyways for pointing out that :).

Thank you guys, I don't know yet if I'll be able to test it today, however I'll check it soon and try to close the issue if your kind suggestions works. Thanks again.

I switched back to the RC1 and also updated my project.json file accordingly.
Also restored "Microsoft.AspNet.Tooling.Razor" to "1.0.0-rc1-final"

And it worked like charm.
Thank you guys for pointing out correctly.

N Baua

Was this page helpful?
0 / 5 - 0 ratings