简体   繁体   English

Inno setup Classic ASP启用父路径

[英]Inno setup Classic ASP Enable Parent Paths

I have created an installer for a classic asp website. 我已经为经典的ASP网站创建了一个安装程序。 I can add the application to the IIS and set Application Pool, Friendly Name and Allow Scripts. 我可以将应用程序添加到IIS并设置“应用程序池”,“友好名称”和“允许脚本”。 I would like to set "Enable Parent Paths" too. 我也想设置“启用父路径”。

Any idea? 任何想法? Is there any EnableParentPaths = true? 是否有任何EnableParentPaths = true?

Here is somw code I used to add the website to IIS in case is needed: 这是我用于在需要时将网站添加到IIS的somw代码:

if (IISOptionsPage.Values[1] <> '') then begin
  IISDefAppPool := IISOptionsPage.Values[1];
end else begin
  IISDefAppPool := ExpandConstant('{#IISDefaultAppPool}');  
end;

{ Create the main IIS COM Automation object }
try
  IIS := CreateOleObject('IISNamespace');
except
  RaiseException('IIS is not installed?.'#13#13'(Error: ''' + GetExceptionMessage );
end;

{ Connect to the IIS server }

WebSite := IIS.GetObject('IIsWebService', IISServerName + '/w3svc');
WebServer := WebSite.GetObject('IIsWebServer', IISServerNumber);
WebRoot := WebServer.GetObject('IIsWebVirtualDir', 'Root');

WebAppName := ExtractLastDir(ExpandConstant('{app}'));

{ (Re)create a virtual dir }

try
  WebRoot.Delete('IIsWebVirtualDir', WebAppName);
  WebRoot.SetInfo();
except

end;

VDir := WebRoot.Create('IIsWebVirtualDir', WebAppName); 
VDir.AccessRead := True;
VDir.AccessScript := True;
VDir.AppFriendlyName := WebAppName;
VDir.Path := ExpandConstant('{app}');

try
  VDir.AppPoolId := IISDefAppPool;
except
  MsgBox('AppPool not set.'#13#13'(Error: ''' + GetExceptionMessage, mbInformation, mb_Ok);
end;

try
  VDir.AppCreate(True);
except
  MsgBox('App not created.'#13#13'(Error: ''' + GetExceptionMessage, mbInformation, mb_Ok);
end;

try
  VDir.SetInfo();
except
  MsgBox('Info no set.'#13#13'(Error: ''' + GetExceptionMessage, mbInformation, mb_Ok);
end;

My guess is that you're looking for the AspEnableParentPaths property of the IIsWebVirtualDir object. 我的猜测是您正在寻找IIsWebVirtualDir对象的AspEnableParentPaths属性。 Try to extend your script with the following line: 尝试使用以下行扩展脚本:

VDir.AspEnableParentPaths := True;

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

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