SHASHANGKA SHEKHAR'S BLOG

MVP, Author

Solve – localhost refused to connect

Hits: 5420

With Visual Studio -2015 i received an error while tried to run previous MVC project

the below message appeared in my browser, i was searching for the perfect solution.

This was the few steps how we can solve this issue. Open VS-2015 with existing MVC project > Unload Project like below image.

Right click on unloaded project > Edit .csproj file like below.

Remove the marked lines in below image

  • DevelopmentServerPort
  • DevelopmentServerVPath
  • IISUrl

Finally reload the project

Build & Run the project, it is solved 🙂

6 Comments

  • Reply Aecio Lemos |

    You rock, thanks. You solved a problem I was having for hours and I could not solve. Very frustrating. Thanks a million.

    • Reply bill |

      I also spent several hours trying to figure out what is going on. super simple call from angular and yet even manually I could not get it working. I could see that mvc action was registring the action call but it never got into the method. I could see that the url and parameter were perfect but it still would not work and visual studio does not tell what the problem or solution is.

      Your instructions worked wonderfully.

  • Reply Nabin Thapa |

    I follow the same process but it didn’t solve my visual studio problem of localhost refused.

  • Reply Akila |

    I have follow the same procedure but it not working in visual studio 2013… plz give me a another way to solve this..

  • Reply Akila |

    I have follow the same procedure but it not working in visual studio 2013… plz give me a another way to solve this..

Post a comment