网站未按预期创建。请看图片。正在为 CoreWebServicesV3 创建两个虚拟目录,一个指向默认应用程序池,另一个指向我创建的应用程序池。
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLLOCATION" Name="CoreWebservicesV3" >
<Directory Id="WEBSITE" Name="$(var.CWSProductVersion)"/>
</Directory>
</Directory>
</Directory>
<Feature Id="ProductFeature" Title="CoreWebservicesMSI" Level="1" Display="expand" ConfigurableDirectory="INSTALLLOCATION">
<Component Directory="INSTALLLOCATION">
<RegistryValue Root="HKCU" Key="Websites\CoreWebservices\3.0" Name="Remembered" Value="[INSTALLLOCATION]" Type="string" />
<RemoveFolder Id="CleanApplicationFolder" On="uninstall"/>
</Component>
<Feature Id="MainContent" Title="CoreWebservices Website" Description="The CWS website content" Level="1">
<ComponentGroupRef Id="MyWebIssConfiguration" />
<ComponentGroupRef Id="CoreWebservices" />
</Feature>
</Feature>
<ComponentGroup Id="MyWebIssConfiguration">
<ComponentRef Id="MyWebAppPoolCmp"/>
<ComponentRef Id="MyWebsiteCmp"/>
<ComponentRef Id="MyWebVirtualDirCmp"/>
</ComponentGroup>
<DirectoryRef Id="INSTALLLOCATION">
<Component Id="MyWebsiteCmp" Guid="{751DEB01-ECC1-48ff-969A-65BCEE9E0528}" KeyPath="yes">
<iis:WebSite Id="CoreWebservicesV3" Description='CoreWebservicesV3' Directory='INSTALLLOCATION' >
<iis:WebAddress Id="AllUnassigned" Port="80" />
</iis:WebSite>
</Component>
<Component Id="MyWebAppPoolCmp" Guid="{751DEB01-ECC1-48ff-869A-65BCEE9E0529}" KeyPath="yes">
<util:User Id="MyWebAppPoolUser"
CreateUser="no"
Name="[IDENTITY_NAME]"
Password="[IDENTITY_PWD]" RemoveOnUninstall="yes"
Domain="[IDENTITY_DOMAIN]" />
<iis:WebAppPool Id="CWSWebAppPool"
Name="[WEB_APP_NAME]"
ManagedRuntimeVersion="v4.0"
ManagedPipelineMode="Integrated"
Identity="other"
User="MyWebAppPoolUser" >
<iis:RecycleTime Value="00:00"/>
</iis:WebAppPool>
</Component>
<Component Id="MyWebVirtualDirCmp" Guid="{751DEB01-ECC1-48ff-869A-65BCEE9E0528}" KeyPath="yes" >
<iis:WebVirtualDir Id="MyWebVirtualDir" Alias="[VIRTUAL_DIR_VAL]" Directory="INSTALLLOCATION" WebSite="CoreWebservicesV3" >
<iis:WebDirProperties Id="MyWebVirtDirProperties" AnonymousAccess="no" BasicAuthentication="no" WindowsAuthentication="yes" />
<iis:WebApplication Id="MyWebWebApplication" Name="[VIRTUAL_DIR_VAL]" WebAppPool="CWSWebAppPool" />
</iis:WebVirtualDir>
</Component>
</DirectoryRef>