Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArcGIS_WebAdaptorInstall.psm1 does not support custom "Default Web Site"-name #288

Closed
scma-esrich opened this issue Sep 24, 2020 · 5 comments

Comments

@scma-esrich
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request

Module Version

  • 3.1.0

Affected Resource(s)

  • ArcGIS_WebAdaptorInstall

Configuration Files

N/A

Expected Behavior

In a customer-environment, the IIS-site with ID "1" is named "ArcGIS" instead of "Default Web Site" due to security-requirements (the specific name is irrelevant for the issue, any other name than "Default Web Site" won't work).

The Web Adaptors for "portal" and "server" should have been installed properly.

Actual Behavior

The Web Adaptor-setups have been executed properly and the "portal" and "server" sub-websites underneath the web site with ID 1, named "ArcGIS" in this case, have been created properly.

The DSC-routine for the Web Adaptor-Install still fails, due to a web-property that can't be set, whenever the WA-website is not called "Default Web Site".

The reason are (at least) two lines of code in ArcGIS_WebAdaptorInstall.psm1 that contain Default Web Site as a hardcoded value.

Line 161 (Installation):
Set-WebConfigurationProperty -pspath "MACHINE/WEBROOT/APPHOST/Default Web Site/$($Context)" -filter "system.web/httpRuntime" -name "executionTimeout" -value "01:00:00"

Line 177 (Deinstallation):
Remove-WebConfigurationLocation -Name "Default Web Site/$($Context)"

Possible solutions:

  • Get the actual name of the web site, the WA-setups installed the "portal" and "server" sub-websites and use this value instead of Default Web Site.
  • Introduce an additional (optional) JSON-config-parameter, for when a customer has renamed the Default Web Site and use this parameter-value instead of Default Web Site.

Steps to Reproduce

Manually install IIS on the WA-node and rename the Default Web Site to anything else.
Run a DSC-installation.

Important Factoids

References

This behavior is also mentioned and described in #286, however it is not solely related to upgrades, which is why I created this standalone issue.

@shailesh91
Copy link
Contributor

@scma-esrich We will fix this in the upcoming release. Until then you can use the following to get the site name with id = 1.
$IISWebSiteName = (Get-Website | Where-Object {$_.ID -eq 1}).Name

@scma-esrich
Copy link
Author

Thanks @shailesh91!

@scma-esrich
Copy link
Author

Attention @shailesh91, there is another location, where this leads to problems, namely ArcGISWebAdaptor.ps1:
image

We didn't realize that the first time, because on the other stage the "Default Web Site" was created, configured with a HTTPS-binding and renamed after that. In contrast, on this stage, the binding wasn't set and hence the ArcGIS_IIS_TLS-part was triggered.

@shailesh91
Copy link
Contributor

@scma-esrich This week we plan to release a comprehensive fix that will take care of this as well. Thanks.

@cameronkroeker
Copy link
Contributor

Hello @scma-esrich we have added a new parameter "WebSiteId" in release v.3.1.1
which will allow you to specify a specific website ID.

https://github.com/Esri/arcgis-powershell-dsc/releases/tag/v3.1.1

WebSiteId - (Optional) The WebSiteId parameter is used to specify the website where the ArcGIS Web Adaptor web application will be created. The value for WebSiteId is a number specific to each website on your server and assigned by IIS. The IDs for the websites on your server can be found in IIS Manager. The default website has a website ID of 1. By default, the WebSiteId parameter is set to the default website (even if multiple websites exist).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants