-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3d3bc64
commit 621e4c2
Showing
26 changed files
with
534 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 0 additions & 27 deletions
27
Kudu.Services.Web/Pages/DebugConsole2/DebugConsole2Controller.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
@page | ||
@using System | ||
@using System.Collections | ||
@using System.Collections.Generic | ||
@model Kudu.Services.Web.Pages.EnvLegacyModel | ||
@inject IHttpContextAccessor httpContextAccessor | ||
@inject IDeploymentSettingsManager _settingsManager | ||
@{ | ||
ViewData["Title"] = "Environment"; | ||
} | ||
|
||
<div class="container"> | ||
<h3>Index</h3> | ||
<ul> | ||
<li><a href="#sysInfo">System Info</a></li> | ||
<li><a href="#appSettings">App Settings</a></li> | ||
<li><a href="#connectionStrings">Connection Strings</a></li> | ||
<li><a href="#envVariables">Environment variables</a></li> | ||
<li><a href="#path">PATH</a></li> | ||
<li><a href="#httpHeaders">HTTP Headers</a></li> | ||
</ul> | ||
</div> | ||
|
||
|
||
<div class="container"> | ||
<h3 id="sysInfo">System info</h3> | ||
<ul> | ||
<li>System up time: @TimeSpan.FromMilliseconds(Environment.TickCount)</li> | ||
<li>OS version: @Environment.OSVersion</li> | ||
<li>64 bit system: @Environment.Is64BitOperatingSystem</li> | ||
<li>64 bit process: @Environment.Is64BitProcess</li> | ||
<li>Processor count: @Environment.ProcessorCount</li> | ||
<li>Machine name: @Environment.MachineName</li> | ||
<li>Instance id: @Kudu.Core.Infrastructure.InstanceIdUtility.GetInstanceId()</li> | ||
<li>Short instance id: @Kudu.Core.Infrastructure.InstanceIdUtility.GetShortInstanceId()</li> | ||
<li>CLR version: @Environment.Version</li> | ||
<li>System directory: @Environment.SystemDirectory</li> | ||
<li>Current working directory: @Environment.CurrentDirectory</li> | ||
<li>IIS command line: @Environment.CommandLine</li> | ||
@if (Kudu.Core.Helpers.OSDetector.IsOnWindows()) | ||
{ | ||
var homePath = Environment.GetEnvironmentVariable("HOME"); | ||
var localPath = "d:\\local"; | ||
<li>@homePath usage: @Html.Raw(Kudu.Core.Environment.GetFreeSpaceHtml(homePath))</li> | ||
if (Kudu.Core.Environment.IsAzureEnvironment() && System.IO.Directory.Exists(localPath)) | ||
{ | ||
<li>@localPath usage: @Html.Raw(@Kudu.Core.Environment.GetFreeSpaceHtml(localPath))</li> | ||
} | ||
} | ||
</ul> | ||
|
||
<h3 id="appSettings">AppSettings</h3> | ||
<ul class="fixed-width"> | ||
@using System.Configuration; | ||
@using System.Linq | ||
@using Core.Infrastructure | ||
@using Kudu.Contracts.Settings | ||
@using Microsoft.AspNetCore.Http | ||
@foreach (string name in System.Configuration.ConfigurationManager.AppSettings) | ||
{ | ||
<li> | ||
@name = @System.Configuration.ConfigurationManager.AppSettings[name] | ||
</li> | ||
} | ||
|
||
@foreach (KeyValuePair<string, string> kv in _settingsManager.GetValues()) | ||
{ | ||
|
||
if (kv.Value != null) | ||
{ | ||
<li>@kv.Key = @kv.Value</li> | ||
} | ||
|
||
} | ||
</ul> | ||
|
||
<h3 id="connectionStrings">Connection Strings</h3> | ||
<ul> | ||
@foreach (ConnectionStringSettings settings in ConfigurationManager.ConnectionStrings) | ||
{ | ||
<li> | ||
<span class="fixed-width">@settings.Name</span> | ||
<ul class="fixed-width"> | ||
<li>ConnectionString = @settings.ConnectionString</li> | ||
<li>ProviderName = @settings.ProviderName</li> | ||
</ul> | ||
</li> | ||
} | ||
</ul> | ||
|
||
<h3 id="envVariables">Environment variables</h3> | ||
<ul class="fixed-width"> | ||
@foreach (DictionaryEntry entry in Environment.GetEnvironmentVariables().OfType<DictionaryEntry>().OrderBy(e => e.Key)) | ||
{ | ||
<li>@entry.Key = @entry.Value</li> | ||
} | ||
</ul> | ||
|
||
<h3 id="path">PATH</h3> | ||
<ul class="fixed-width"> | ||
@foreach (string folder in Environment.GetEnvironmentVariable("PATH").Split(System.IO.Path.PathSeparator).Where(s => !String.IsNullOrWhiteSpace(s))) | ||
{ | ||
<li>@folder</li> | ||
} | ||
</ul> | ||
|
||
<h3 id="httpHeaders">HTTP headers</h3> | ||
<ul class="fixed-width"> | ||
@foreach (string name in httpContextAccessor.HttpContext.Request.Headers.Keys.OrderBy(s => s)) | ||
{ | ||
<li>@name=@httpContextAccessor.HttpContext.Request.Headers[name].ToString()</li> | ||
} | ||
</ul> | ||
|
||
@* | ||
<h3 id="serverVar">Server variables</h3> | ||
<ul class="fixed-width"> | ||
@foreach (string name in HttpContext.Connection.OfType<string>().OrderBy(s => s)) | ||
{ | ||
<li>@name=@HttpContext.Connection[name]</li> | ||
} | ||
</ul> | ||
*@ | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Microsoft.AspNetCore.Mvc.RazorPages; | ||
|
||
namespace Kudu.Services.Web.Pages | ||
{ | ||
public class EnvLegacyModel : PageModel | ||
{ | ||
public void OnGet() | ||
{ | ||
|
||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
@page | ||
@model ErrorLegacyModel | ||
@{ | ||
ViewData["Title"] = "Error"; | ||
} | ||
|
||
<h1 class="text-danger">Error.</h1> | ||
<h2 class="text-danger">An error occurred while processing your request.</h2> | ||
|
||
@if (Model.ShowRequestId) | ||
{ | ||
<p> | ||
<strong>Request ID:</strong> <code>@Model.RequestId</code> | ||
</p> | ||
} | ||
|
||
<h3>Development Mode</h3> | ||
<p> | ||
Swapping to <strong>Development</strong> environment will display more detailed information about the error that occurred. | ||
</p> | ||
<p> | ||
<strong>Development environment should not be enabled in deployed applications</strong>, as it can result in sensitive information from exceptions being displayed to end users. For local debugging, development environment can be enabled by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>, and restarting the application. | ||
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Diagnostics; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using Microsoft.AspNetCore.Mvc.RazorPages; | ||
|
||
namespace Kudu.Services.Web.Pages | ||
{ | ||
public class ErrorLegacyModel : PageModel | ||
{ | ||
public string RequestId { get; set; } | ||
|
||
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); | ||
|
||
public void OnGet() | ||
{ | ||
RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; | ||
} | ||
} | ||
} |
Oops, something went wrong.