Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Localhost only shows blank screen. How can I fix it?

Tags:

localhost

I've done this procedure many times before. I created a new pool in IIS, add an application to Default Website and configured its settings. However this time I cannot connect to the localhost. It doesn't even show any error for starters...Just a blank screen...as simple as that.

I've done anything that had come to my mind(IISReset, stopping and restarting pool and Default Website, restarting the computer, etc.) but it wasn't useful. Please help me, how can I fix it?

Additional info: Windows 7 SP1 IIS version 7.5.7600.16385 Pool info: ASP.net Version 4.0, Intergrated

Also I'm working with C#.

like image 203
iminiki Avatar asked Oct 18 '22 10:10

iminiki


2 Answers

This is to make sure, but have you started the IIS service and it is listening on port 80?

Open your IIS Configuration Panel and make sure that the service is started. Once it is started, going to localhost should display the IIS Welcome Page. You should also check your hosts file as the localhost name may be resolving to other IP Address.

It would really be helpful if you post more details about the problem, like your IIS version and your OS.

EDIT

Reinstall IIS on your computer:

  • Go to Control Panel
    • Select Programs and Features
    • Choose add or remove on the upper left
    • Uncheck IIS and all IIS related components
    • Remove the inetpub folder on drive c
    • Reboot
    • Reinstall IIS with the same steps as above by checking all IIS related components

See if it works.

like image 141
SiNONiMiTY Avatar answered Jan 04 '23 06:01

SiNONiMiTY


For me it helped to switch to master branch in my project, remove angular.json and package-lock.json files, then run npm install and npm start for my front-end project. Then I switched back to my branch and did the same. It's very weird stuff but it helped.

The other thing that helped is changing port for localhost in package.json:

"start": "node --max_old_space_size=4096 ./node_modules/@angular/cli/bin/ng serve --aot --port=8080",
like image 43
Ivan Yurchenko Avatar answered Jan 04 '23 06:01

Ivan Yurchenko