There is an environment variable in your websiteโs environment called HOME to help you with this.
You can access it using razor syntax or code (C #). For example, suppose you have a file called data.txt, which is located at the root of your site with the default document and the rest of your files. You can get the full path as follows.
@{ var dataFileName = Environment.GetEnvironmentVariable("HOME").ToString() + "\\site\\wwwroot\\data.txt"; }
You can find it yourself using Site Control / "Kudu". For example, if your site is contoso.azurewebsites.net, then just go to contoso. scm .azurewebsites.net. Here you can find out all about the file system and environment variables available on your website.
Rick rainey
source share