add 404
This commit is contained in:
9
.vscode/launch.json
vendored
9
.vscode/launch.json
vendored
@@ -1,4 +1,7 @@
|
||||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
@@ -6,9 +9,9 @@
|
||||
"type": "coreclr",
|
||||
"request": "launch",
|
||||
"preLaunchTask": "build",
|
||||
"program": "${workspaceRoot}\\bin\\Debug\\netcoreapp1.1\\aka.terribledev.io.dll",
|
||||
"program": "${workspaceFolder}/bin/Debug/netcoreapp2.0/aka.terribledev.io.dll",
|
||||
"args": [],
|
||||
"cwd": "${workspaceRoot}",
|
||||
"cwd": "${workspaceFolder}",
|
||||
"stopAtEntry": false,
|
||||
"internalConsoleOptions": "openOnSessionStart",
|
||||
"launchBrowser": {
|
||||
@@ -29,7 +32,7 @@
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
},
|
||||
"sourceFileMap": {
|
||||
"/Views": "${workspaceRoot}/Views"
|
||||
"/Views": "${workspaceFolder}/Views"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
11
.vscode/tasks.json
vendored
11
.vscode/tasks.json
vendored
@@ -1,15 +1,14 @@
|
||||
{
|
||||
"version": "0.1.0",
|
||||
"command": "dotnet",
|
||||
"isShellCommand": true,
|
||||
"args": [],
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"taskName": "build",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"${workspaceRoot}\\aka.terribledev.io.csproj"
|
||||
"build",
|
||||
"${workspaceFolder}/aka.terribledev.io.csproj"
|
||||
],
|
||||
"isBuildCommand": true,
|
||||
"problemMatcher": "$msCompile"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -14,6 +14,7 @@ namespace aka.terribledev.io
|
||||
public class Startup
|
||||
{
|
||||
public static byte[] hello = System.Text.Encoding.UTF8.GetBytes("hello");
|
||||
public static byte[] fourOhFor = System.Text.Encoding.UTF8.GetBytes("404");
|
||||
public static int helloCount = hello.Count();
|
||||
public Startup(IHostingEnvironment env)
|
||||
{
|
||||
@@ -72,7 +73,10 @@ namespace aka.terribledev.io
|
||||
await b.Response.Body.WriteAsync(Startup.hello, 0, helloCount);
|
||||
});
|
||||
});
|
||||
|
||||
app.Use(async (context, next)=>{
|
||||
context.Response.StatusCode = 404;
|
||||
await context.Response.Body.WriteAsync(fourOhFor, 0, fourOhFor.Count());
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,22 +1,34 @@
|
||||
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.26430.6
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "aka.terribledev.io", "aka.terribledev.io.csproj", "{2083DD24-BF66-4D77-B453-BB86AE273766}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "aka.terribledev.io", "aka.terribledev.io.csproj", "{6F53DA0D-3316-452B-AF94-6CC951480E4F}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{2083DD24-BF66-4D77-B453-BB86AE273766}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2083DD24-BF66-4D77-B453-BB86AE273766}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2083DD24-BF66-4D77-B453-BB86AE273766}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2083DD24-BF66-4D77-B453-BB86AE273766}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{6F53DA0D-3316-452B-AF94-6CC951480E4F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6F53DA0D-3316-452B-AF94-6CC951480E4F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6F53DA0D-3316-452B-AF94-6CC951480E4F}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{6F53DA0D-3316-452B-AF94-6CC951480E4F}.Debug|x64.Build.0 = Debug|x64
|
||||
{6F53DA0D-3316-452B-AF94-6CC951480E4F}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{6F53DA0D-3316-452B-AF94-6CC951480E4F}.Debug|x86.Build.0 = Debug|x86
|
||||
{6F53DA0D-3316-452B-AF94-6CC951480E4F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6F53DA0D-3316-452B-AF94-6CC951480E4F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{6F53DA0D-3316-452B-AF94-6CC951480E4F}.Release|x64.ActiveCfg = Release|x64
|
||||
{6F53DA0D-3316-452B-AF94-6CC951480E4F}.Release|x64.Build.0 = Release|x64
|
||||
{6F53DA0D-3316-452B-AF94-6CC951480E4F}.Release|x86.ActiveCfg = Release|x86
|
||||
{6F53DA0D-3316-452B-AF94-6CC951480E4F}.Release|x86.Build.0 = Release|x86
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
Reference in New Issue
Block a user