简体   繁体   中英

Internet Information Service(IIS) Manager issue

I am publishing my site in IIS and my WebDav folder is configured in other PC of IIS.

I want to get that website name using some c# code.

How can I get the site name of my WebDav folder in my published web site (ex: Default Web Site ) using c# code?

So you want to figure out what Site Name(s) exist on an IIS instance from the IP address?

take a look at this artice: http://cstruter.com/blog/306

and where you see this line of code:

foreach (Website site in GetSites("IIS://localhost/W3SVC"))

put the IP address where you see localhost. if the ip address was 123.123.123.123 then it would look like this:

foreach (Website site in GetSites("IIS://123.123.123.123/W3SVC"))

You will need adequate permissions to enumerate the Sites! (see the comments below the article for some notes on this)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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