Search
Home IIS.NET Forums IIS 7 and Above Administration Pack Re: Microsoft.Web.Administration Get a unique persitent key per site
Last post Aug 09, 2017 05:54 AM by Yuk Ding
1620 Posts
Aug 08, 2017 09:06 AM|Paul Lynch|LINK
Hi,
I can't comment on this thread (https://forums.iis.net/post/2126963.aspx) as it's already closed but I wanted to add that you *can* in fact set your own custom site ID in IIS using the following :
$SiteName = "SITENAME" $iisSite = "IIS:\Sites\" + $SiteName $website = get-item $iisSite Stop-WebSite -Name $SiteName $website.id = 54321 $website | set-item Start-WebSite -Name $SiteName
Regards,
3600 Posts
Microsoft
Aug 09, 2017 05:54 AM|Yuk Ding|LINK
Hi Paul,
Of course, we could set the custom site ID. In fact, the command could be more simple:
Set-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST' -filter "system.applicationHost/sites/site[@name='TestSite5']" -name "id" -value 8
Best Regards,
Yuk Ding
1620 Posts
Re: Microsoft.Web.Administration Get a unique persitent key per site
Aug 08, 2017 09:06 AM|Paul Lynch|LINK
Hi,
I can't comment on this thread (https://forums.iis.net/post/2126963.aspx) as it's already closed but I wanted to add that you *can* in fact set your own custom site ID in IIS using the following :
Regards,
MCSE
3600 Posts
Microsoft
Re: Microsoft.Web.Administration Get a unique persitent key per site
Aug 09, 2017 05:54 AM|Yuk Ding|LINK
Hi Paul,
Of course, we could set the custom site ID. In fact, the command could be more simple:
Best Regards,
Yuk Ding
MSDN Community Support
Please remember to "Mark as Answer" the responses that resolved your issue.