-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Launching IIS Express should include the 'site-id' parameter #34
Comments
Hey @Shazwazza I will see if I can look at this on a FF & may ping you for some thoughts nearer to the time. |
@Shazwazza A site is added & removed from the We add to the file everytime the site is run & when ever we stop the site (with VS Code extension, close VS Code or kill IIS Express directly) We also attempt to cleanup/remove the entry from applicationHost.config Looking at the docs for So as long as I have the site id integer generate the same int every time - from your SHA1 hash suggestion of the path of the folder, then this should resolve the problem your having? As the extension will try to cleanup still & keep the applicationHost.config neat & tidy or does it need to be a permanent entry in applicationHost.config in order to resolve the issue your having? Once I know then I can work on this & fix it up. |
This was done and the issue never closed //Site name is the name of the workspace folder & GUID/UUID
//Need to append a UUID as could have two folders/sites with same name
var siteName = path.basename(vscode.workspace.rootPath as string) + "-" + uuidV4(); |
See site-id parameter here: https://docs.microsoft.com/en-us/iis/extensions/using-iis-express/running-iis-express-from-the-command-line
What is currently happening is that whenever IIS Express starts, it is using a generated Site ID which equates to the AppDomain.AppDomainAppId parameter. In Umbraco, this value is used to distinguish one site running on a single server from another and is used for file naming with regards to load balancing.
Since this Id is regenerated each time you restart the IIS Express in VSCode, this means Umbraco will 'cold boot' because it thinks its a new server. In the real IIS and IIS Express worlds (within VS), this ID is static and remains the same.
It should be possible to perhaps SHA1 hash the folder path and generate an Integer ID ... but i don't know what size of an integer value can be passed to this parameter since an integer of a SHA1 would probably be a pretty big number
The text was updated successfully, but these errors were encountered: