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

后端 未结 11 2269
野性不改
野性不改 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:39

    I had a similar issue, trying to run a WCF-based HttpSelfHostServer in Debug under my VisualStudio 2013. I tried every possible direction (turn off firewall, disabling IIS completely to eliminate the possibility localhost port is taken by some other service, etc.).

    Eventually, what "did the trick" (solved the problem) was re-running VisualStudio 2013 as Administrator.

    Amazing.

提交回复
热议问题