我收到以下警告:
EF Core 工具版本“3.0.0-preview8.19405.11”比运行时“3.1.0”版本旧。更新工具以获取最新功能和错误修复。
知道我需要运行什么来更新 EF Core 工具吗?
我正在 Kubernetes 上的 .net core 3.0 上使用 Redis 数据库进行数据保护,但仍然出现以下错误。有任何想法吗?
失败:Microsoft.AspNetCore.Antiforgery.DefaultAntiforgery[7] 反序列化令牌时引发异常。Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException:无法解密防伪令牌。---> System.Security.Cryptography.CryptographyException:在密钥环中找不到密钥 {ffb146a1-0e5e-4f96-8566-425f7c2eb99a}。在 Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.UnprotectCore(Byte[] protectedData,布尔值 allowedOperationsOnRevokedKeys,UnprotectStatus& status) 在 Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.DangerousUnprotect(Byte[] protectedData,布尔值ignoreReservationErrors,布尔值&requireMigration,布尔值&wasRevoked ) 在 Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.Unprotect(Byte[] protectedData) 在 Microsoft.AspNetCore.Antiforgery.DefaultAntiforgeryTokenSerializer.Deserialize(String serializedToken) --- 内部异常堆栈跟踪结束 --- 在 Microsoft.AspNetCore。 Microsoft.AspNetCore.Antiforgery.DefaultAntiforgery.GetCookieTokenDoesNotThrow(HttpContext httpContext) 处的 Antiforgery.DefaultAntiforgeryTokenSerializer.Deserialize(String serializedToken)
var redis = ConnectionMultiplexer.Connect(Environment.GetEnvironmentVariable("REDIS_CONNSTR"));
services.AddDataProtection().PersistKeysToStackExchangeRedis(redis, "DataProtection-Keys");
services.AddMvc(options =>
{
options.Filters.Add(new AutoValidateAntiforgeryTokenAttribute());
});
Run Code Online (Sandbox Code Playgroud) 是否可以将静态 IP 分配给 AWS 负载均衡器,而无需将您的 NS 记录移动到 Route 53?
我基本上只想从我的域中创建一个 A 记录以指向 ELB。
是否可以将 Quicksight 和 Sagemaker 编写为 cloudformation 脚本?我似乎找不到任何 cloudformation 示例。
升级到Preview9。
但是当我尝试分离视图和模型时出现此错误,有什么想法吗?
RAZORGENERATE:错误 RZ3008:标签帮助程序无法定位标签名称“.ViewCustomerModel”,因为它包含“<”字符。
public class ViewCustomerModel: ComponentBase
{
[Inject]
protected IDataService Data {get;set;}
[Parameter]
public Guid CustomerId {get;set;}
public Customer Customer {get;set;}
protected override async Task OnInitializedAsync()
{
await Load();
}
private async Task Cancel() => await Load();
private async Task Load()
{
Customer = await Data.Load<Customer>(CustomerId);
}
private async Task Save(EditContext editContext)
{
if (editContext.Validate())
{
await Data.Save<Customer>(Customer);
}
}
}
Run Code Online (Sandbox Code Playgroud)