Getting an error on first line of all my aspx pages even when started to create a new web application

326 Views Asked by At

I'm using Visual studio 2017 for past few years. Now, first line of all aspx page shows below error on all my existing web applications.

Runtime error: Object reference not set to an instance of an object.

Also I tried to create a new project. It is also showing same issue. And when I try to run those project, It shows "localhost refused to connect."

enter image description here

I have tried many solutions from web. But couldn't solve the issue. What I tried are,

  • Deleted .vs folder
  • Deleted .suo file
  • Clean and rebuild
  • Uninstalled VS 2017 and reinstalled. Now I'm using version 15.9.34

UPDATE 1

I have uninstalled VS 2017 and installed VS 2019. Still showing same error for website projects. I have installed .NET frame work version V4.0.30319 and ASP.NET and web development tools. enter image description here enter image description here

0

There are 0 best solutions below