开发者

trying to build a url with full computer name

开发者 https://www.devze.com 2023-02-08 21:29 出处:网络
How do I get my full computer name (with domain) to show up in a url I\'m constructing in my code? Updated:

How do I get my full computer name (with domain) to show up in a url I'm constructing in my code?

Updated:

Ok so how do I utilize

System.Net.Dns.GetHostByName("localhost").HostName 

with existing

String myUrl = Url.Action("MyAction", "MyController", new { id = id }, "http");
开发者_StackOverflow社区

to have the FQDN in my link on my page


I'm with Cody inasmuch as I'm not properly sure how you're trying to achieve what you want to, however, banking on the fact that you know this stuff then maybe we can be somewhat removed from the context of the practice and offer solutions for your to integrate, on such a basis, here is a thread which ought to interest you...

How to find FQDN of local machine in C#/.NET ?

0

精彩评论

暂无评论...
验证码 换一张
取 消