chef 3744 Posted April 1, 2021 Share Posted April 1, 2021 Hi! quick question about requesting SystemInfo through the IApplicationHost. I'm looking to get the WANAddress for the server. I'm just wondering about the "remoteAddress" parameter in the "GetSystemInfo" method. Could I just do a loopback on the IPAddress? public async Task<string> GetWanAddressAsync() { var sysInfo = await Host.GetSystemInfo(IPAddress.Loopback, CancellationToken.None); return await Task.FromResult(sysInfo.WanAddress); } Something tells me that isn't the data the function is looking for. Has anyone else done this is C#? Link to comment Share on other sites More sharing options...
chef 3744 Posted April 1, 2021 Author Share Posted April 1, 2021 Huh... never mind, using the loopback seems to work just fine. 1 Link to comment Share on other sites More sharing options...
rbjtech 4170 Posted April 1, 2021 Share Posted April 1, 2021 (edited) I'm not sure how you are using the WAN Address, but you may want the WAN DNS FQDN rather than the IP - as the IP is usually dynamic and may change ? Just a thought. Edited April 1, 2021 by rbjtech 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now