网站首页 网站源码
website
站点相关全部源代码,隐藏了一些关于服务器的信息
settings
folder-class
folder
folder-views
folder-public
docker
visualstudio
markdown
csharp
csharp

Web端

正在做和将要做的事:

  • 移除网站相关的静态资源,全部转移到静态仓库中去,使用CDN加速
  • 2022年升级到 dot net 6
  • 源码管理更换管理方式
  • 使用统一的日志管理

IIS web.config 配置

配置url路径中允许出现的扩展名

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <location path="." inheritInChildApplications="false">
        <system.webServer>
            <handlers>
                <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified"/>
            </handlers>
            <aspNetCore processPath="dotnet" arguments=".\Dpz.Core.Web.dll" stdoutLogEnabled="false"
                        stdoutLogFile=".\logs\stdout" hostingModel="inprocess"/>
            <httpProtocol>
                <customHeaders>
                    <remove name="X-Powered-By"/>
                </customHeaders>
            </httpProtocol>
            <security>
                <requestFiltering allowDoubleEscaping="true">
                    <fileExtensions allowUnlisted="true">
                        <remove fileExtension=".java"/>
                        <remove fileExtension=".cs"/>
                        <remove fileExtension=".xml"/>
                        <remove fileExtension=".config"/>
                        <remove fileExtension=".cshtml"/>
                        <remove fileExtension=".sln"/>
                        <remove fileExtension=".csproj"/>
                        <add fileExtension=".java" allowed="true"/>
                        <add fileExtension=".cs" allowed="true"/>
                        <add fileExtension=".xml" allowed="true"/>
                        <add fileExtension=".config" allowed="true"/>
                        <add fileExtension=".cshtml" allowed="true"/>
                        <add fileExtension=".sln" allowed="true"/>
                        <remove fileExtension=".csproj"/>
                    </fileExtensions>
                </requestFiltering>
            </security>
        </system.webServer>
    </location>
</configuration>

配置文件详情

{
  "Logging": {
    "LogLevel": {
      "Default": "Trace",
      "Microsoft": "Warning",
      "Microsoft.Hosting.Lifetime": "Information"
    }
  },
  "AgileConfig": {
    "appId": "",
    "secret": "",
    "nodes": "",
    "name": "",
    "env": "DEV"
  }
}

2023年12月,网站配置改为AgileConfig配置中心

loading