Skip to content

Commit

Permalink
iis-site-name should return app name in ASP.NET Core
Browse files Browse the repository at this point in the history
For ASP.NET Core:

IHostingEnvironment.EnvironmentName = "Development", "Production", "Staging", etc.
IHostingEnvironment.ApplicationName = the app name

The layout renderer for "iis-site-name" is incorrectly rendering the first instead of the second.
  • Loading branch information
grokky1 authored and 304NotModified committed Mar 31, 2017
1 parent 2ab8049 commit e3f0ac4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ protected override void Append(StringBuilder builder, LogEventInfo logEvent)

#if NETSTANDARD_1plus
var env = ServiceLocator.ServiceProvider?.GetService<IHostingEnvironment>();
builder.Append(env?.EnvironmentName);
builder.Append(env?.ApplicationName);

#else
builder.Append(HostingEnvironment.SiteName);
Expand Down

0 comments on commit e3f0ac4

Please sign in to comment.