locked
getting error This site can’t be reached localhost refused to connect. RRS feed

  • Question

  • User364480375 posted

    i am getting below error. kindly suggest

    This site can’t be reached
    localhost refused to connect.
    Search Google for localhost 2504 api MyPraptra
    ERR_CONNECTION_REFUSED

    Saturday, August 4, 2018 9:27 AM

Answers

  • User1724605321 posted

    Hi mike4u,

    For this error , please try to :

    1. Delete YourSolutionFolder\.vs\config\applicationhost.config file (note: .vs is a hidden folder)
    2. Open Visual Studio, right-click on web site > Properties > Debug tab > Web Server Settings > App URL - change port number.

    Reference Link :

    https://stackoverflow.com/a/38926529/5751404 

    https://stackoverflow.com/a/36801686/5751404 

    You can also check other replies in above threads for potential  solution .

    Best Regards,

    Nan Yu

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, August 6, 2018 5:36 AM

All replies

  • User364480375 posted

    i tried by changing port number  getting same error again

    Saturday, August 4, 2018 10:05 AM
  • User1120430333 posted

    Maybe a host based firewall has been set to block all TCP ports or block IP 127.0.0.1 localhost  Maybe, you need to reboot the machine.to clear O/S issues.

    Saturday, August 4, 2018 10:17 AM
  • User1724605321 posted

    Hi mike4u,

    For this error , please try to :

    1. Delete YourSolutionFolder\.vs\config\applicationhost.config file (note: .vs is a hidden folder)
    2. Open Visual Studio, right-click on web site > Properties > Debug tab > Web Server Settings > App URL - change port number.

    Reference Link :

    https://stackoverflow.com/a/38926529/5751404 

    https://stackoverflow.com/a/36801686/5751404 

    You can also check other replies in above threads for potential  solution .

    Best Regards,

    Nan Yu

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, August 6, 2018 5:36 AM
  • User-864166757 posted

    In continuation to Nan Yu's suggestion, you can also give a try by running nestsh command on command prompt with elevated permissions. Command is as: netsh http show iplisten

    if you receive the output of above command somethign other than 0.0.0.0, it means we can probably solve the issue by running further commands as follows:

    netsh http delete iplisten ipaddress=aa.bb.cc.dd (where aa.bb.cc.dd is the IP address that we have to remmove)

    netsh http add iplisten ipaddress=0.0.0.0

    iisreset

    Hope this should help you.

    Monday, August 6, 2018 6:02 AM