GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Move Razor CustomErrorHttpHandlers to Configure.Ui · ServiceStack/ServiceStackVS@9fcbc9c

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src/ServiceStackVS/ProjectTemplates/AspNetRazor/Host
    • AppHost.cs
    • Configure.Ui.cs
    • Host.csproj
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/ServiceStackVS/ProjectTemplates/AspNetRazor/Host/AppHost.cs‎

Copy file name to clipboardExpand all lines: src/ServiceStackVS/ProjectTemplates/AspNetRazor/Host/AppHost.cs
-7Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
using System;
22
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Net;
5-
using System.Reflection;
6-
using System.Web;
73
using Funq;
84
using $safeprojectname$.ServiceInterface;
95
using ServiceStack.Razor;
@@ -35,9 +31,6 @@ public override void Configure(Container container)
3531

3632
Plugins.Add(new RazorFormat());
3733

38-
CustomErrorHttpHandlers[HttpStatusCode.NotFound] = new RazorHandler("/notfound");
39-
CustomErrorHttpHandlers[HttpStatusCode.Forbidden] = new RazorHandler("/forbidden");
40-
4134
if (Config.DebugMode)
4235
{
4336
Plugins.Add(new HotReloadFeature());
Collapse file

‎src/ServiceStackVS/ProjectTemplates/AspNetRazor/Host/Configure.Ui.cs‎

Copy file name to clipboardExpand all lines: src/ServiceStackVS/ProjectTemplates/AspNetRazor/Host/Configure.Ui.cs
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1+
using System.Net;
12
using System.Collections.Generic;
23
using ServiceStack;
4+
using ServiceStack.Razor;
35

46
namespace $safeprojectname$
57
{
68
public class ConfigureUi : IConfigureAppHost
79
{
810
public void Configure(IAppHost appHost)
911
{
12+
appHost.CustomErrorHttpHandlers[HttpStatusCode.NotFound] = new RazorHandler("/notfound");
13+
appHost.CustomErrorHttpHandlers[HttpStatusCode.Forbidden] = new RazorHandler("/forbidden");
14+
1015
Svg.Load(appHost.RootDirectory.GetDirectory("/assets/svg"));
1116
Svg.CssFillColor["svg-icons"] = "#343a40";
1217

Collapse file

‎src/ServiceStackVS/ProjectTemplates/AspNetRazor/Host/Host.csproj‎

Copy file name to clipboardExpand all lines: src/ServiceStackVS/ProjectTemplates/AspNetRazor/Host/Host.csproj
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,6 @@
110110
<ItemGroup>
111111
<TypeScriptCompile Include="wwwroot\assets\js\dtos.ts" />
112112
</ItemGroup>
113-
<ItemGroup>
114-
<Service Include="{4A0DDDB5-7A95-4FBF-97CC-616D07737A77}" />
115-
</ItemGroup>
116113
<ItemGroup>
117114
<Folder Include="wwwroot\css\" />
118115
<Folder Include="wwwroot\js\" />

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.