Last post Aug 06, 2019 05:53 AM by Yongqing Yu
Aug 01, 2019 02:08 PM|Rstan122|LINK
When running live on Azure, setting the defaultDocument in web.config with the root directory works:
However, this does not work locally. To get it to work locally, I must remove the tilde specifying the root document and just have Index.aspx. The file is not in any subfolder.
Currently, I have it set to work in Azure, and set a specific start page, which is functional, but not exactly the same thing. I was wondering if there was a way to have both environments work without some kind of publish transform?
I am aware you can set the default document from the Azure General settings as well, but I would like to have it work locally.
Aug 02, 2019 07:27 AM|Yongqing Yu|LINK
According to your description, could you tell us where your project stay?
Azure web app? or Azure Virtual machine?
Different places need to consider different directions to explore this issue.
Aug 02, 2019 12:01 PM|Rstan122|LINK
It is an Azure Web App. I believe it is specifically called an Azure "App Service" within the resource group.
Aug 06, 2019 05:53 AM|Yongqing Yu|LINK
Based on your description, I recommend that you make transformation in web.config which contains
Web.Debug.config and Web.Release.config files.
You can select the index page in your current root directory as the default document in one of the config files (like Web.Debug.config) in the local test environment.
Then add the correct default document path to another config
(like Web.Release.config ) and select this config type for publication.
Here is a tutorial about this way : Web.config Transformation Syntax for Web Application Project Deployment