Table of Contents

Class WebHostEnvironmentExtensions

Namespace
Umbraco.Extensions
Assembly
Umbraco.Web.Common.dll

Contains extension methods for the IWebHostEnvironment interface.

public static class WebHostEnvironmentExtensions
Inheritance
WebHostEnvironmentExtensions
Inherited Members

Methods

MapPathWebRoot(IWebHostEnvironment, string)

Maps a virtual path to a physical path to the application's web root

public static string MapPathWebRoot(this IWebHostEnvironment webHostEnvironment, string path)

Parameters

webHostEnvironment IWebHostEnvironment
path string

Returns

string

Remarks

Depending on the runtime 'web root', this result can vary. For example in Net Framework the web root and the content root are the same, however in netcore the web root is /wwwroot therefore this will Map to a physical path within wwwroot.