VS Code 2017 "Localhost refused to connect" HTML file - html

This is a simple index.Html file, when i click on run i get the attached screen.
I have included the Json configuration.
The previous posts did not resolve my issue, and i did restart the machine as well as running VS Code as an admin. VS Code Error
installed Extensions

This happening because of your firewall setting restriction. please
Try Live Server Extension AND check for Firewall Settings.
Plain HTML/CSS can be opened as a file, no need to run them through a web server.
And if these procedures didn't work tell me about your browser.

Related

"localhost refused to connect" vscode html

<!DOCTYPE html>
<html>
<head></head>
<body>
<button>Hello</button>
</body>
</html>
Running this code from VSCode on my M1 Air yields either this:
..or a completely blank page.
What am I doing wrong? Was working, but then I accidentally clicked "run" on a .css file instead of my .html file, and it broke.
You can just open your .html file by double-clicking on it from your file browser.
Or if you want to serve it locally, you can use an extension like Live server. And then from your Editor, you can click on "Go Live"
Then this would show that your local server is running on a port like here it's 5500
Then the extension should open a new tab in your browser to http://127.0.0.1:5500/FILENAME.html.
If you don't want to use this VS Code extension, you can try other alternatives like browsersync.
localhost refused to connect.
is an error message that typically appears when there is a problem with the connection between Visual Studio Code (VSCode) and the localhost server. This can happen for a number of reasons, but some common causes include:
The localhost server is not running or is not configured properly.
There is a problem with the network connection, such as a firewall blocking the connection.
There is an issue with the code or configuration of the HTML file in VSCode.
To troubleshoot this issue, you can try the following steps:
Check that the localhost server is running and configured correctly.
Check your network connection and ensure that any firewalls or antivirus software are not blocking the connection.
Check your HTML code and configuration in VSCode to ensure that there are no syntax errors or other issues that might be causing the problem.
Make sure that the chrome browser is in the updated version.
Check the port number if it is configured correctly in your code, if not change it to the correct port number.
Open your .html file by double-clicking on it from your file browser or right click context menu and then open with option, choose a browser option.
Use Live Server VS Code Extension or BrowserSync Extenstion.
If the problem persists, you can also try running the HTML file in a different browser or using a different localhost server to see if that resolves the issue.

vs code live server extension not working

I'm trying to run a basic html file with live server extension, when I run it I get the Server is Started notification(as shown in the img below) but then nothing happens
even manually going to port 5500 like "http://127.0.0.1:5500/index.html" I get the following error
Cannot GET /index.html
i tried restarting vs code. uninstalling and reinstalling live server extension also tried uninstalling and reinstalling vs code. i set the default browser in the extension settings and on my computer any other ideas i can try would be appreciated
Thank you
I'm not sure why but changing file names (removed special characters) worked only if i do it manually it still doesn't load the browser automatically though..
This could be the issue I just solved.
VS code was not using the local IP as a host.
Manage > settings > search "use local" or "live server"> check "use local IP as host".
I hope that helps you or your connection needs could be unique and you might want to look at this guide. https://code.visualstudio.com/docs/setup/network

Live Server Extension gets stuck iterating through port values every time I "Open with live server" from my html file

My file name is index.html
I have tried running the command and manually entering http://127.0.0.1:5500/index.html into the browser this also does not work. I get a refused to connect message.
I have ensured I have a default browser set.
I have tried just about everything.
As soon as I select "Open with live server" VS Code starts processing the request, I navigate to settings.json where the extensions settings reside.
All I have in my settings.json is
"liveserver.settings.port": 5500
and in real time the file starts increasing the port number by 1 about every second. I have to physically close VS Code to stop it. "Stop live server" does not work.
I have tried uninstalling the extension, older versions, and even completely uninstalling VS Code.
NOTHING is working.
Please send help.
Try the steps from this question:
Live server installed but not working in VS code

Install of Bolt CMS on Windows

I have installed the Bolt CMS on a Windows 2008 R2 server and it shows me a blank screen when I first try to launch it. I'm using IIS as the web server and MySQL as the database. I have verified that file permissions are set correctly for the folders that should be writable. PHP is also configured and working, and I have created my database and put the connection details into the config-yml-dist file. From my understanding the config.yml-dist file should be automatically renamed to config.yml when I run the application for the first time, but that isn't happening, in case that helps to know.
Can someone confirm if Bolt is compatible with Windows, and if so, provide any input on what I can check next?
Thanks.
I know a few websites with Bolt running on IIS / Windows 2008. If you're getting a blank screen, that means PHP is configured to not display errors. Which is the preferred setting for production servers, but not very convenient for development.
Either edit the php.ini file to 'display errors', or look in the server's error log for error messages. That should hopefully tell you what's going on.

Why does the asp.net website administration tool give timeout message (mysql db)?

i have an asp.net-mvc website and I am trying to use the asp.net website administration tool but when i click in visual studio 2010 to launch it, it brings up a browser that says:
An error was encountered. Please return to the previous page and try again.
i can't click back but when i click on "How do i use this tool", i get this error:
Tool Has Timed Out
As a security measure, the Web Site Administration Tool times out after a period of inactivity. Changes to machine.config or web.config may also result in the tool needing to be restarted. To continue configuring your web site, restart the tool.
when i run my website, i am able to connect to the database fine and i am also able to insert new users through the default Account/LogOn interface.
Any suggestions on how to debug why i can't launch the admin tool ?
The project's path shouldn't contain #% or spaces
Could you please try the following:
Close your browser completely. Whether you are using IE or Firefox to test your website, you should make sure all browser windows are closed.
Kill the asp.net development server. It is located in your taskbar
Or, if you are hosting your site in IIS, force an iisreset.
Now try to run the Web Site Administration Tool again.
If it still does not work yet, could you please provide which browser you are using, and which OS and host?
The project's path shouldn't contain #% or spaces
My Project path was D:\Programming\C#\Tests\MVCApplication\
and that is what caused the problem.
I was getting the exact same error message with VS2010 .NET 4.0 framework. I created my solution in a subfolder titled "C#". Renaming the subfolder to CSharp fixed my problem.
I hope this helps.