从SharePoint Web应用程序URL中提取域名 [英] Extract domain name from SharePoint webapplication url

查看:84
本文介绍了从SharePoint Web应用程序URL中提取域名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要从SharePoint Web应用程序URL(由用户提供以创建新的Web应用程序的URL)中提取域名

只想从新创建的Web应用程序URL中检索域名.

预先感谢


Badri

解决方案

您可以使用以下方法获取域名系统(DNS)主机名 Uri.Host属性.然后使用字符串拆分方法从域名系统(DNS)主机名中获取域名.

对于 更多信息,您可以参考以下线程:

最好的问候,

Linda Zhang


Hi,

I have an requirement to extract domain name from the SharePoint web application URL (which has been given by user to create new web application)

just want to retrieve domain name from the newly creating web application URL.

Thanks in Advance


Badri

解决方案

Hi Badri,

You can get the Domain Name System (DNS) host name by using Uri.Host Property. Then use String Split method to get the domain name from the Domain Name System (DNS) host name.

For more information, you can refer to the following thread:

https://stackoverflow.com/questions/8498592/extract-hostname-name-from-string

Best Regards,

Linda Zhang


这篇关于从SharePoint Web应用程序URL中提取域名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆