No connection could be made because the target machine actively refused it 127.0.0.1

后端 未结 11 2254
野性不改
野性不改 2020-12-15 19:04

I try to connect to a web service hosted on a different server using the WebRequest Class. The web service returns a string as a Response. While doing so I get an Error:

相关标签:
11条回答
  • 2020-12-15 19:40

    Delete Temp files by run > %temp%

    And Open VS2015 by run as admin,

    it works for me.

    0 讨论(0)
  • 2020-12-15 19:41

    If you have this while Fiddler is running -> in Fiddler, go to 'Rules' and disable 'Automatically Authenticate' and it should work again.

    0 讨论(0)
  • 2020-12-15 19:44

    The exception message says you're trying to connect to the same host (127.0.0.1), while you're stating that your server is running on a different host. Besides the obvious bugs like having "localhost" in the url, or maybe some you might want to check your DNS settings.

    0 讨论(0)
  • 2020-12-15 19:44

    I had the same issue with a site which previously was running fine. I resolved the issue by deleting the temporary files from C:\WINDOWS\Microsoft.NET\Framework\v#.#.#####\Temporary ASP.NET Files\@projectName\###CC##C\###C#CC

    0 讨论(0)
  • 2020-12-15 19:49

    There is a firewall blocking the connection or the process that is hosting the service is not listening on that port. Or it is listening on a different port.

    0 讨论(0)
提交回复
热议问题