locked
Locahost refused to connect | Visual Studio 2015 RRS feed

  • Question

  • User-951443266 posted

    Hello everyone,

    i just installed Visual studio 2015 enterprise edition. When I click " run google chrome" , it displays the error localhost refused to connect.

    I noticed that the port in the localhost address changes each time I run website directly from visual studio 2015.

    I don't know how to stop this. there is no antivirus software on my system. I will like anyone who knows the solution to show me the way through as I have read all piost regarding

    this but couldn't get solutions.

    I am also getting the error ' Unable to launch IIS Express.

    thanks.

    Saturday, June 6, 2020 12:11 PM

All replies

  • User475983607 posted

    Right click the Visual Studio short cut and select "Run as administrator".  Also consider moving to VS 2019 which will allow you to work with the latest technology.

    Sunday, June 7, 2020 2:54 PM
  • User-951443266 posted

    i have done that. It doesn't work. It gives me the warning  " Unable to launch IIS Express" and " Localhost refused to connect.

    But in the browser, if I typed localhost, it displays IIS welcome page.

    According to your view, does that mean Visual Studio 2015 Enterprise is not too good to develop asp.net application?

    I am getting tired of this visual studio IDE, it is too cumbersome and heavy software with a lot of error display. there is always lot of error issues.

    I will keep welcoming answers before I get frustrated and uninstall it from my system.

    thanks.

    Sunday, June 7, 2020 11:16 PM
  • User288213138 posted

    Hi adewumirahman,

    i have done that. It doesn't work. It gives me the warning  " Unable to launch IIS Express" and " Localhost refused to connect.

    You can try to change the port number to solve this problem.

    Project Properties → Web → Servers → Project Url, and don't forget to click Create Virtual Directory.

    If this method does not solve your problem, then you can also try to delete the applicationhost.config from the .vs folder(The applicationhost.config file is in the config folder under your vs folder).

    Best regards,

    Sam

    Monday, June 8, 2020 2:52 AM
  • User-951443266 posted

    Thanks samwu,

    I have tried your suggestion but still getting same error: Refused to connect to localhost ( that is if the browser loads) or can not launch IIS Express.

    I am thinking that instead of using IIS Express that visual studio uses by default, can't I specify Local IIS as my web server using project properties.

    If I am doing that, I think I will need to copy the project files into  inetpub - wwwroot    folder of IIS local directly on my computer.

    what do you think about it?

    Will it work like that or Visual Studio uses only IIS Express as the only web server for processing applications created in visual studio?

    Thanks waiting for your prompt reply.

    Thursday, June 18, 2020 6:19 AM
  • User-951443266 posted

     Another question I have for you.

    I am probably thinking  IIS Express is not started in Visual studio, that is why I get the error refused to connect to localhost.

    How can i start IIS Express in Visual Studio. Thanks.

    Thursday, June 18, 2020 6:42 AM
  • User288213138 posted

    Hi adewumirahman,

    I have tried your suggestion but still getting same error: Refused to connect to localhost ( that is if the browser loads) or can not launch IIS Express.

    I am thinking that instead of using IIS Express that visual studio uses by default, can't I specify Local IIS as my web server using project properties.

    If I am doing that, I think I will need to copy the project files into  inetpub - wwwroot    folder of IIS local directly on my computer.

    what do you think about it?

    Will it work like that or Visual Studio uses only IIS Express as the only web server for processing applications created in visual studio?

    As far as I know, usually, only in iis, the project will be placed in inetpub-wwwroot.

    I am probably thinking  IIS Express is not started in Visual studio, that is why I get the error refused to connect to localhost.

    How can i start IIS Express in Visual Studio. Thanks.

    Here you can see what you used to start your project.

    Best regards,

    Sam

    Thursday, June 18, 2020 8:05 AM