简体   繁体   English

在Silverlight中访问IIS站点信息

[英]Accessing IIS site information in Silverlight

I need to get the site name and port number of the IIS sites in the Silverlight Application. 我需要在Silverlight应用程序中获取IIS站点的站点名称和端口号。 How to get that? 怎么做到的?

You should be able to get this info from Application.Current.Host.Source 您应该能够从Application.Current.Host.Source获取此信息

 string server = Application.Current.Host.Source.Host;
 int port = Application.Current.Host.Source.Port;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM