| |

VerySource

 Forgot password?
 Register
Search
View: 595|Reply: 1

How to read out the website directory in IIS in ASP.NET?

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-3-9 09:30:02
| Show all posts |Read mode
I want to display all the website names under IIS on the page. How do I get it by programming?
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-5-30 20:30:01
| Show all posts
using System.DirectoryServices;

string path = "IIS: // Localhost / W3SVC";

DirectoryEntry service = new DirectoryEntry (path);
DirectoryEntries sites = service.Children;

foreach ()
{
}
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list