1
我已經編寫了一個客戶機/服務器應用程序,正在我的本地機器上進行測試。將IPv6回送地址解析到Uri
服務器讀取客戶端的IP地址爲::1
,這是一個IPv6環回地址。
不過,我以後需要重新建立這個客戶的HttpClient的連接,通過提供一個URI的BaseAddress:
var originalAddress = "::1";
var client = new HttpClient() { BaseAddress = new Uri(originalAddress) };
這導致異常Invalid URI: The format of the URI could not be determined.
我怎樣才能得到的URI接受這個地址?
做如何解決谷歌搜索'的IPv6來這裏URI'是一個起點http://stackoverflow.com/questions/5277060/is-there-a-standard-net-decoder-for-ipv4-and-ipv6-addresses – MethodMan