我有一个.NET Core 1.1应用程序,我希望升级到.NET Core 2.0.在更新目标框架和所有依赖项后,我发现我的身份验证设置无法编译.我已更新到帐户已删除的属性和已弃用/已移动的方法调用.椭圆用于表示为简洁而省略的代码.
1.1代码 - public void Configure()Startup.cs的内部方法
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationScheme = "Cookies",
ExpireTimeSpan = TimeSpan.FromHours(12),
SlidingExpiration = false,
CookiePath = CookiePath,
CookieName = "MyCookie"
});
var openIdConnectionOptions = new OpenIdConnectOptions
{
ClientId = Configuration["OpenIdSettings:ClientId"],
ClientSecret = Configuration["OpenIdSettings:ClientSecret"],
Authority = Configuration["OpenIdSettings:Authority"],
MetadataAddress = $"{Configuration["OpenIdSettings:Authority"]}/.well-known/openid-configuration",
GetClaimsFromUserInfoEndpoint = true,
AuthenticationScheme = "oidc",
SignInScheme = "Cookies",
ResponseType = OpenIdConnectResponseType.IdToken,
TokenValidationParameters = new Microsoft.IdentityModel.Tokens.TokenValidationParameters
{
// This sets the value of User.Identity.Name to users AD username
NameClaimType = IdentityClaimTypes.WindowsAccountName, …Run Code Online (Sandbox Code Playgroud) 我的aspx.designer.cs文件没有自动更新问题.我正在使用VS 2013. - 我试图删除设计器文件并重建.没有喜欢. - 没有选项可以转换为Web项目.(这是vs 2013,该项目已经是一个网络项目. - 搜索微软博客的解决方案,微软甚至没有我能找到的解决方案.
如果有人有经过验证的方法强制此文件更新或重新生成,请告诉我.必须手动将我的控件添加到此文件只是痛苦!