How to back up the IIS metabase in C #?

the exact code will be useful. I assume that the DirectoryServices namespace does this, but I cannot find a method that does this.


I need real C # code. All the samples I've found so far are VB or VBScript. I found C # examples for reading / setting ADSI properties. A command like backup seems to have certain .NET syntax which I don’t understand how to use. VB has a simple backup command. Need equivalent in .NET.

0
source share
2 answers

I found him:

DirectoryEntry de = new DirectoryEntry ( "IIS://localhost" );  de.Invoke( " ", [0]);

,

0

ADSI. IIsComputer.Backup - , .

ADSI #, MSDN.

EDIT: #.

+2

Source: https://habr.com/ru/post/1731875/


All Articles