我使用了一个可用的 ASP.NET Core 2.2 应用程序,将其升级到 3.0,突然该应用程序不再在 Windows Server 2012 中运行。它出现了以下内容:
ERR_HTTP2_INADEQUATE_TRANSPORT_SECURITY
似乎在我不得不选择加入 HTTP/2 之前,现在它与 HTTP1.1 一起成为默认设置。这里有一个帖子,https://github.com/aspnet/AspNetCore/issues/14350
但这完全令人困惑,没有真正的解决方案。
我尝试了各种启用/禁用不安全协议但无济于事。比如https://www.admin-enclave.com/de/articles-by-year/11-data-articles/website_articles/articles/exchange_articles/405-resolved-error-err_spdy_inadequate_transport_security-when-using-google-chome-和-owa.html
由于我认为更好的协议套件,在 Windows 10 上运行良好。但是在 Fiddler 中,我检查了与 Kestrel 谈判时的唯一区别是:
Windows Server 2012 R2:
[0A0A] Unrecognized cipher - See http://www.iana.org/assignments/tls-parameters/
[1301] Unrecognized cipher - See http://www.iana.org/assignments/tls-parameters/
[1302] Unrecognized cipher - See http://www.iana.org/assignments/tls-parameters/
[1303] Unrecognized cipher - See http://www.iana.org/assignments/tls-parameters/
[C02B] TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
[C02F] Unrecognized cipher - See http://www.iana.org/assignments/tls-parameters/
[C02C] TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
[C030] Unrecognized cipher - See http://www.iana.org/assignments/tls-parameters/
[CCA9] Unrecognized cipher - See http://www.iana.org/assignments/tls-parameters/ …
Run Code Online (Sandbox Code Playgroud) c# https network-protocols windows-server-2012-r2 asp.net-core
我似乎无法在 ASP.NET Core 2.2 中启用静态文件缓存。我有以下内容Configure
:
public void Configure(IApplicationBuilder app, IHostingEnvironment env) {
if (env.IsDevelopment()) {
app.UseDeveloperExceptionPage();
app.UseCors(...);
}
else {
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseAuthentication();
app.UseSignalR(routes => { routes.MapHub<NotifyHub>("/..."); });
app.UseResponseCompression();
app.UseStaticFiles();
app.UseSpaStaticFiles(new StaticFileOptions() {
OnPrepareResponse = (ctx) => {
ctx.Context.Response.Headers[HeaderNames.CacheControl] = "public, max-age=31557600"; // cache for 1 year
}
});
app.UseMvc();
app.UseSpa(spa => {
spa.Options.SourcePath = "ClientApp";
if (env.IsDevelopment()) {
spa.UseVueCli(npmScript: "serve", port: 8080);
}
});
}
Run Code Online (Sandbox Code Playgroud)
当我尝试使用 chrome 在 HTTPS 上审核生产站点时,我不断收到“使用高效缓存策略提供静态资产”的消息:
在网络选项卡中没有提到标题中的缓存,当我按 F5 时,似乎所有内容都来自磁盘缓存。但是,如果审计显示它不是,我怎么能确定我的缓存设置有效?
我正在尝试使用最新版本的 dnSpy 反汇编我的 .NET core 3.1 二进制文件,但得到的输出如下:
原来的方法:
public async Task<List<FirmwarePackage>> CalculatePackagesDeltaAsync(List<FirmwarePackage> firmwarePackages) {
var packagesToUpdate = await GetPackageDifferences(firmwarePackages);
// sort packages
// "version-update" packages should be updated last, with "mez" being last
packagesToUpdate = packagesToUpdate
.OrderBy(x => x.TargetType)
.ThenBy(x => x.Name)
.ToList();
packagesToUpdate.RemoveAll(x => x.Name == "version-update");
var versionPkgs = firmwarePackages
.Where(x => x.Name == "version-update")
.OrderBy(x => x.TargetType);
packagesToUpdate.AddRange(versionPkgs);
return packagesToUpdate;
}
Run Code Online (Sandbox Code Playgroud)
这是正常的吗?我怎样才能把它变成更容易理解的东西。尝试调试这是一场噩梦。
在 github 存储库上,该issues
资源不可用,这就是我在这里询问的原因。
我已经使用 Vue CLI 3 创建了一个应用程序,我一直在观察构建过程,它警告我有大文件:
$ vue-cli-service build --modern --mode production --dest dist --target app --dashboard
- Building legacy bundle for production...
WARNING Compiled with 2 warnings12:40:54 PM
warning
asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
js/chunk-vendors-legacy.443e5f8f.js (1.44 MiB)
warning
entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints:
app (1.46 MiB)
js/chunk-vendors-legacy.443e5f8f.js
js/app-legacy.4b3e4352.js
Run Code Online (Sandbox Code Playgroud)
我不知道如何减少这个文件的大小,它完全来自外部库:
我以为它无法摆脱。就在今天,我在 …
为什么使用下面的 dockerfile 创建新的 docker 映像一直要求我选择时区?我尝试了该ENV TZ
命令的多种变体,但均无济于事。
=> => # Please select the geographic area in which you live. Subsequent configuration
=> => # questions will narrow this down by presenting a list of cities, representing
=> => # the time zones in which they are located.
=> => # 1. Africa 3. Antarctica 5. Arctic 7. Atlantic 9. Indian 11. US
=> => # 2. America 4. Australia 6. Asia 8. Europe 10. Pacific 12. Etc
=> => …
Run Code Online (Sandbox Code Playgroud) asp.net-core ×2
c# ×2
vue.js ×2
.net-core ×1
async-await ×1
caching ×1
disassembly ×1
dnspy ×1
docker ×1
dockerfile ×1
https ×1
javascript ×1
static-files ×1
timezone ×1
tree-shaking ×1
webpack ×1