using System.Net; using System.Net.Http.Headers; using System.Text; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Features; using Microsoft.AspNetCore.Mvc; var builder = WebApplication.CreateBuilder(args); // Add services to the container. builder.Services.AddControllers(); // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle builder.Services.AddEndpointsApiExplorer(); builder.Services.AddSwaggerGen(); var app = builder.Build(); // Configure the HTTP request pipeline. if (app.Environment.IsDevelopment()) { app.UseSwagger(); app.UseSwaggerUI(); } app.UseHttpsRedirection(); app.UseAuthorization(); app.MapControllers(); const string selfdocpath = "D:\\Web"; app.MapGet("/",(HttpContext context) => { byte[] data = File.ReadAllBytes("D:\\Web\\main.html"); context.Response.Body.WriteAsync(data, 0, data.Length); }); app.Run(); /*
这是一个与微软官方pdb服务器同步的符号文件缓存服务器
你可以在大陆使用这个,它拥有更快的访问速度,与更低的连接延迟
下面是提供服务的地址,你可以将它加入到你的环境变量(_NT_SYMBOL_PATH)
http://www.sym101.com/download/symbols