重新生成文档项目,使用.net core 2.2并且配置为静态服务器。

develop
bicijinlian
parent e9c7d80b38
commit 032474fed7

@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
namespace Study.DelegateSeries.MarkdownDoc
{
public class Program
{
public static void Main(string[] args)
{
CreateWebHostBuilder(args).Build().Run();
}
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>();
}
}

@ -0,0 +1,27 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:8431",
"sslPort": 44371
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"Study.DelegateSeries.MarkdownDoc": {
"commandName": "Project",
"launchBrowser": true,
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

@ -0,0 +1,41 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
namespace Study.DelegateSeries.MarkdownDoc
{
public class Startup
{
/// <summary>
/// 此方法被运行时调用
/// 使用此方法添加服务到服务容器中
/// 详细信息,请移步 https://go.microsoft.com/fwlink/?LinkID=398940
/// </summary>
public void ConfigureServices(IServiceCollection services)
{
}
/// <summary>
/// 此方法被运行时调用
/// 使用此方法配置Http请求管道
/// </summary>
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
//配置:只使用静态文件服务
app.UseDefaultFiles();
app.UseStaticFiles();
}
}
}

@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
<Folder Include="wwwroot\images\" />
</ItemGroup>
</Project>

@ -1,32 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- 有关使用 web.config 转换的详细信息,请访问 https://go.microsoft.com/fwlink/?LinkId=125889 -->
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<!--
在下例中“SetAttributes”转换将更改
“connectionString”的值以仅在“Match”定位器
找到值为“MyDB”的特性“name”时使用“ReleaseSQLServer”。
<connectionStrings>
<add name="MyDB"
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
</connectionStrings>
-->
<system.web>
<compilation xdt:Transform="RemoveAttributes(debug)" />
<!--
在下例中“Replace”转换将替换
web.config 文件的整个 <customErrors> 节。
请注意,由于
在 <system.web> 节点下仅有一个 customErrors 节因此不需要使用“xdt:Locator”特性。
<customErrors defaultRedirect="GenericError.htm"
mode="RemoteOnly" xdt:Transform="Replace">
<error statusCode="500" redirect="InternalError.htm"/>
</customErrors>
-->
</system.web>
</configuration>

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
有关如何配置 ASP.NET 应用程序的详细信息,请访问
https://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
</configuration>

@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Debug",
"System": "Information",
"Microsoft": "Information"
}
}
}

@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Warning"
}
},
"AllowedHosts": "*"
}

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
</head>
<body>
index.html
</body>
</html>

@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
namespace WebApplication1
{
public class Program
{
public static void Main(string[] args)
{
CreateWebHostBuilder(args).Build().Run();
}
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>();
}
}

@ -0,0 +1,27 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:8008",
"sslPort": 0
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"WebApplication1": {
"commandName": "Project",
"launchBrowser": true,
"applicationUrl": "http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

@ -0,0 +1,38 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
namespace WebApplication1
{
public class Startup
{
// This method gets called by the runtime. Use this method to add services to the container.
// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
public void ConfigureServices(IServiceCollection services)
{
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
//默认中间件
app.Run(async (context) =>
{
await context.Response.WriteAsync("Hello World!");
});
}
}
}

@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Folder Include="wwwroot\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.1.2" PrivateAssets="All" />
</ItemGroup>
</Project>

@ -1,2 +0,0 @@
# 委托系列学习
------

@ -9,26 +9,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Src", "Src", "{0CDDA35F-F04
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Study.DelegateSeries.Core", "Study.DelegateSeries.Core\Study.DelegateSeries.Core.csproj", "{6801B518-6303-4CB6-95BB-0B3A81DA2617}"
EndProject
Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "Study.DelegateSeries.MarkdownDoc", "Study.DelegateSeries.MarkdownDoc\", "{E777A0B5-F7A2-4314-A296-026B0454D4AA}"
ProjectSection(WebsiteProperties) = preProject
TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.0"
Debug.AspNetCompiler.VirtualPath = "/localhost_3569"
Debug.AspNetCompiler.PhysicalPath = "Study.DelegateSeries.MarkdownDoc\"
Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost_3569\"
Debug.AspNetCompiler.Updateable = "true"
Debug.AspNetCompiler.ForceOverwrite = "true"
Debug.AspNetCompiler.FixedNames = "false"
Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.VirtualPath = "/localhost_3569"
Release.AspNetCompiler.PhysicalPath = "Study.DelegateSeries.MarkdownDoc\"
Release.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost_3569\"
Release.AspNetCompiler.Updateable = "true"
Release.AspNetCompiler.ForceOverwrite = "true"
Release.AspNetCompiler.FixedNames = "false"
Release.AspNetCompiler.Debug = "False"
VWDPort = "3569"
DefaultWebSiteLanguage = "Visual C#"
EndProjectSection
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Study.DelegateSeries.MarkdownDoc", "Study.DelegateSeries.MarkdownDoc\Study.DelegateSeries.MarkdownDoc.csproj", "{F31847FB-C413-44A5-BCF0-1D7399CE4A7C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -40,17 +21,17 @@ Global
{6801B518-6303-4CB6-95BB-0B3A81DA2617}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6801B518-6303-4CB6-95BB-0B3A81DA2617}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6801B518-6303-4CB6-95BB-0B3A81DA2617}.Release|Any CPU.Build.0 = Release|Any CPU
{E777A0B5-F7A2-4314-A296-026B0454D4AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E777A0B5-F7A2-4314-A296-026B0454D4AA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E777A0B5-F7A2-4314-A296-026B0454D4AA}.Release|Any CPU.ActiveCfg = Debug|Any CPU
{E777A0B5-F7A2-4314-A296-026B0454D4AA}.Release|Any CPU.Build.0 = Debug|Any CPU
{F31847FB-C413-44A5-BCF0-1D7399CE4A7C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F31847FB-C413-44A5-BCF0-1D7399CE4A7C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F31847FB-C413-44A5-BCF0-1D7399CE4A7C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F31847FB-C413-44A5-BCF0-1D7399CE4A7C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{6801B518-6303-4CB6-95BB-0B3A81DA2617} = {0CDDA35F-F045-4BE9-8C0F-D1A9C1BE433C}
{E777A0B5-F7A2-4314-A296-026B0454D4AA} = {D8C26D31-979E-4492-A3CD-C325BCD13097}
{F31847FB-C413-44A5-BCF0-1D7399CE4A7C} = {D8C26D31-979E-4492-A3CD-C325BCD13097}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {0C61CBE2-3F09-492A-993F-549076A3F16B}

Loading…
Cancel
Save