×

Loading...
Ad by
  • 予人玫瑰,手有余香:加拿大新天地工作移民诚聘求职顾问&行业导师!
Ad by
  • 予人玫瑰,手有余香:加拿大新天地工作移民诚聘求职顾问&行业导师!

Question about HttpClient

HttpClient client = new HttpClient(new HttpClientHandler() { UseDefaultCredentials = true });
client.BaseAddress = new Uri(ConfigurationManager.AppSettings["SrvcBaseAddr"]);

in the web.config:

<add key="SrvcBaseAddr" value="http://localhost:61788/" />

Is port 61788 special?
If I changed it to other values, such as 61988. When I run the web application, it still use 61788.

??? what's problem.
The company can't input Chinese, so I use english.
Report

Replies, comments and Discussions:

  • 工作学习 / 学科技术讨论 / Question about HttpClient
    HttpClient client = new HttpClient(new HttpClientHandler() { UseDefaultCredentials = true });
    client.BaseAddress = new Uri(ConfigurationManager.AppSettings["SrvcBaseAddr"]);

    in the web.config:

    <add key="SrvcBaseAddr" value="http://localhost:61788/" />

    Is port 61788 special?
    If I changed it to other values, such as 61988. When I run the web application, it still use 61788.

    ??? what's problem.
    The company can't input Chinese, so I use english.
    • 自己回答一下。 Web API 的project 设定用这个端口。