13 | Request ID: @Model.RequestId
14 |
19 | Swapping to the Development environment displays detailed information about the error that occurred. 20 |
21 |22 | The Development environment shouldn't be enabled for deployed applications. 23 | It can result in displaying sensitive information from exceptions to end users. 24 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 25 | and restarting the app. 26 |
27 | -------------------------------------------------------------------------------- /Src/CoreWebApp22/Pages/Error.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore.Mvc; 7 | using Microsoft.AspNetCore.Mvc.RazorPages; 8 | 9 | namespace CoreWebApp22.Pages 10 | { 11 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] 12 | public class ErrorModel : PageModel 13 | { 14 | public string RequestId { get; set; } 15 | 16 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 17 | 18 | public void OnGet() 19 | { 20 | RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Src/CoreWebApp22/Pages/Index.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model IndexModel 3 | @{ 4 | ViewData["Title"] = "Home page"; 5 | } 6 | 7 |Learn about building Web apps with ASP.NET Core.
10 |Use this page to detail your site's privacy policy.
9 | -------------------------------------------------------------------------------- /Src/CoreWebApp22/Pages/Privacy.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | 8 | namespace CoreWebApp22.Pages 9 | { 10 | public class PrivacyModel : PageModel 11 | { 12 | public void OnGet() 13 | { 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /Src/CoreWebApp22/Pages/Shared/_CookieConsentPartial.cshtml: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNetCore.Http.Features 2 | 3 | @{ 4 | var consentFeature = Context.Features.Get15 | @Html.ActionLink("Help Page Home", "Index") 16 |
17 |@controllerDocumentation
18 | } 19 |API | Description |
---|---|
@api.HttpMethod.Method @api.RelativePath | 28 |
29 | @if (api.Documentation != null)
30 | {
31 | @api.Documentation 32 | } 33 | else 34 | { 35 |No documentation available. 36 | } 37 | |
38 |
Possible enumeration values:
5 | 6 |Name | Value | Description |
---|---|---|
@value.Name | 15 |
16 | @value.Value 17 | |
18 |
19 | @value.Documentation 20 | |
21 |
@description.Documentation
13 | 14 |@Model.RequestDocumentation
22 | 23 | @if (Model.RequestModelDescription != null) 24 | { 25 | @Html.DisplayFor(m => m.RequestModelDescription.ModelType, "ModelDescriptionLink", new { modelDescription = Model.RequestModelDescription }) 26 | if (Model.RequestBodyParameters != null) 27 | { 28 | @Html.DisplayFor(m => m.RequestBodyParameters, "Parameters") 29 | } 30 | } 31 | else 32 | { 33 |None.
34 | } 35 | 36 | @if (Model.SampleRequests.Count > 0) 37 | { 38 |@description.ResponseDescription.Documentation
47 | 48 | @if (Model.ResourceDescription != null) 49 | { 50 | @Html.DisplayFor(m => m.ResourceDescription.ModelType, "ModelDescriptionLink", new { modelDescription = Model.ResourceDescription }) 51 | if (Model.ResourceProperties != null) 52 | { 53 | @Html.DisplayFor(m => m.ResourceProperties, "Parameters") 54 | } 55 | } 56 | else 57 | { 58 |None.
59 | } 60 | 61 | @if (Model.SampleResponses.Count > 0) 62 | { 63 |Sample not available.
13 | } -------------------------------------------------------------------------------- /Src/FFWebApp462/Areas/HelpPage/Views/Help/DisplayTemplates/KeyValuePairModelDescription.cshtml: -------------------------------------------------------------------------------- 1 | @using FFWebApp462.Areas.HelpPage.ModelDescriptions 2 | @model KeyValuePairModelDescription 3 | Pair of @Html.DisplayFor(m => Model.KeyModelDescription.ModelType, "ModelDescriptionLink", new { modelDescription = Model.KeyModelDescription }) [key] 4 | and @Html.DisplayFor(m => Model.ValueModelDescription.ModelType, "ModelDescriptionLink", new { modelDescription = Model.ValueModelDescription }) [value] -------------------------------------------------------------------------------- /Src/FFWebApp462/Areas/HelpPage/Views/Help/DisplayTemplates/ModelDescriptionLink.cshtml: -------------------------------------------------------------------------------- 1 | @using FFWebApp462.Areas.HelpPage.ModelDescriptions 2 | @model Type 3 | @{ 4 | ModelDescription modelDescription = ViewBag.modelDescription; 5 | if (modelDescription is ComplexTypeModelDescription || modelDescription is EnumTypeModelDescription) 6 | { 7 | if (Model == typeof(Object)) 8 | { 9 | @:Object 10 | } 11 | else 12 | { 13 | @Html.ActionLink(modelDescription.Name, "ResourceModel", "Help", new { modelName = modelDescription.Name }, null) 14 | } 15 | } 16 | else if (modelDescription is CollectionModelDescription) 17 | { 18 | var collectionDescription = modelDescription as CollectionModelDescription; 19 | var elementDescription = collectionDescription.ElementDescription; 20 | @:Collection of @Html.DisplayFor(m => elementDescription.ModelType, "ModelDescriptionLink", new { modelDescription = elementDescription }) 21 | } 22 | else 23 | { 24 | @Html.DisplayFor(m => modelDescription) 25 | } 26 | } -------------------------------------------------------------------------------- /Src/FFWebApp462/Areas/HelpPage/Views/Help/DisplayTemplates/Parameters.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Collections.Generic 2 | @using System.Collections.ObjectModel 3 | @using System.Web.Http.Description 4 | @using System.Threading 5 | @using FFWebApp462.Areas.HelpPage.ModelDescriptions 6 | @model IListName | Description | Type | Additional information |
---|---|---|---|
@parameter.Name | 20 |
21 | @parameter.Documentation 22 | |
23 | 24 | @Html.DisplayFor(m => modelDescription.ModelType, "ModelDescriptionLink", new { modelDescription = modelDescription }) 25 | | 26 |
27 | @if (parameter.Annotations.Count > 0)
28 | {
29 | foreach (var annotation in parameter.Annotations)
30 | {
31 | @annotation.Documentation 32 | } 33 | } 34 | else 35 | { 36 |None. 37 | } 38 | |
39 |
None.
47 | } 48 | 49 | -------------------------------------------------------------------------------- /Src/FFWebApp462/Areas/HelpPage/Views/Help/DisplayTemplates/Samples.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Net.Http.Headers 2 | @model DictionarySample not available.
22 | } 23 | else 24 | { 25 | @Html.DisplayFor(s => sample); 26 | } 27 | } 28 |5 | @Model.Text 6 |-------------------------------------------------------------------------------- /Src/FFWebApp462/Areas/HelpPage/Views/Help/Index.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Web.Http 2 | @using System.Web.Http.Controllers 3 | @using System.Web.Http.Description 4 | @using System.Collections.ObjectModel 5 | @using FFWebApp462.Areas.HelpPage.Models 6 | @model Collection
28 | Provide a general description of your APIs here. 29 |
30 |10 | @Html.ActionLink("Help Page Home", "Index") 11 |
12 |@Model.Documentation
16 |Use this area to provide additional information.
8 | -------------------------------------------------------------------------------- /Src/FullFrameworkWebApp/Views/Home/Contact.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Contact"; 3 | } 4 |ASP.NET is a free web framework for building great Web sites and Web applications using HTML, CSS and JavaScript.
8 | 9 |15 | ASP.NET MVC gives you a powerful, patterns-based way to build dynamic websites that 16 | enables a clean separation of concerns and gives you full control over markup 17 | for enjoyable, agile development. 18 |
19 | 20 |NuGet is a free Visual Studio extension that makes it easy to add, remove, and update libraries and tools in Visual Studio projects.
24 | 25 |You can easily find a web hosting company that offers the right mix of features and price for your applications.
29 | 30 |