Я пытаюсь развернуть приложение ASP.NET с помощью Inno Setup.
Мне нужно выполнить следующие задачи:
Я нашел сценарий для создания виртуального каталога, но мне нужен пул приложений и приложений:
procedure CreateIISVirtualDir();
var
IIS, WebSite, WebServer, WebRoot, VDir: Variant;
ErrorCode: Integer;
begin
{ Create the main IIS COM Automation object }
try
IIS := CreateOleObject('IISNamespace');
except
RaiseException(
'Please install Microsoft IIS first.'#13#13'(Error ''' +
GetExceptionMessage + ''' occurred)');
end;
{ Connect to the IIS server }
WebSite := IIS.GetObject('IIsWebService', IISServerName + '/w3svc');
WebServer := WebSite.GetObject('IIsWebServer', IISServerNumber);
WebRoot := WebServer.GetObject('IIsWebVirtualDir', 'Root');
{ (Re)create a virtual dir }
try
WebRoot.Delete('IIsWebVirtualDir', 'eipwebv4');
WebRoot.SetInfo();
except
end;
VDir := WebRoot.Create('IIsWebVirtualDir', 'eipwebv4');
VDir.AccessRead := True;
VDir.AccessScript := TRUE;
VDir.AppFriendlyName := 'Easy-IP Web Client';
VDir.Path := ExpandConstant('{app}');
try
VDir.AppPoolId := 'Classic .NET AppPool';
except
end;
VDir.AppCreate(True);
VDir.SetInfo();
end;
Итак: http://learn.iis.net/page.aspx/285/provisioning-sample-in-c/
Прокрутите вниз Создайте пул приложений
. Он покажет вам, как создать AppPool, Application и VirtualDirectories.