1

I have installed the visual studio 2017 for ASP.Net Core. I created Dot Net Core project. Build it successfully and run it but on Firefox it shows the blank page and on chrome it shows "**The localhost page isn’t working

localhost is currently unable to handle this request"

I thought there is a problem in code. I debugged the code and there is nothing wrong with the code. It's the default template and code generated for Asp.Net Core. I googled and tried many things like restart the VS, removed cache, etc but nothing worked for me. Then i uninstalled the VS 2017 and used C Cleaner to remove all temp files etc and installed the visual studio 2017 again but the same error came again. Then i created MVC application, console application in VS 2017 and both worked fine. Issue comes only in Asp.net core application. I use fiddler to see the request status and it is 500. I debugged the code but nothing wrong with the code(No Exception). I have tried many things but did not find anything helpful. Can anyone tell me what's the issue?

Umer Waheed
  • 4,044
  • 7
  • 41
  • 62

3 Answers3

2

The blank page response can be caused by a number of reasons. Sometimes because you are lacking something in the system , routing issues, wrong code on the wrong location, .csproj configuration issues, permission issues, and many more.

There are a couple of things you can try:

  1. Check to see if you have the appropriate ASP.NET Core Module installed in you system. (Either x86 or x64 depending on your system )

  2. Make sure you have enabled IIS Integration in your code

  3. See if you have the error middleware in your Configure code, it mostly helps to solve your issues by giving full detail.

Ozesh
  • 6,536
  • 1
  • 25
  • 23
  • Commenting app.usebrowserLink() solve the problem. I don't know what the issue but application is running fine. But i have application with angular 2 that i developed with Visual studio 2015 still have the same problem – Umer Waheed Jun 21 '17 at 09:33
1

Looks like you are running into error similar to this issue with browserlink .What version of browser link package do you have in your machine

Microsoft.VisualStudio.Web.BrowserLink should be 1.0.1 referring the templates

This SO post discuss the similar issue .If that does not solve, Please make sure you have 1.0.1 in your project referenced and then try this

  • Clearing your NuGet cache dotnet nuget locals all --clear

  • Set Environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE to 1 . This is to avoid caching packages

  • dotnet restore
Rohith
  • 5,527
  • 3
  • 27
  • 31
0

Does it happens to be runtime compilation issues?

I stumble across this issues log while studying the feasibility of using ASP.Net Core for ERP System host on LinuxOS.

Issues #2017 on GitHub

Try setting

<PreserveCompilationContext>false<PreserveCompilationContext>

in your csproj

Community
  • 1
  • 1
HardcoreGamer
  • 1,151
  • 1
  • 16
  • 24