問題タブ [asp.net-authentication]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
3 に答える
1674 参照

asp.net - Increasing session timeout to a week or more

In order to increase session timeout, it appears I would use the following setting:

Here the timeout is set to 20 minutes (the default value). And, apparently, the maximum value is 525,600 minutes, or one year.

I can come back to Facebook a week later and I'm still logged in. This is how I want my application to behave. But according to this answer, this can adversely affect performance because "your inactive sessions will remain in Web server memory which may cause application pool to recycle, which would result in loosing all sessions for all users."

Does anyone know the details about this performance hit? And, if it's for real, is there a more performant way to keep users logged in like sites such as Facebook?

UPDATE:

Below is the relevant section of my current web.config file.

UPDATE 2:

Looks like I was incorrectly conflating two issues (authentication and session state). I apologize for not correctly sorting through some issues I was Googling on. My goal is only to extended the length of time a user is logged in.

0 投票する
1 に答える
820 参照

asp.net - AspCore 2.0 および IdentityServer v3、対象者の検証が失敗する

与えられた:

  • IdentityServer v3
  • aspcore 2.0 を使用したクライアント Web アプリケーション

シナリオ:

Identity Server v3 で aspcore 1.1 を使用する場合、設定する必要がありました LegacyAudienceValidation = true( .net core Client does not authenticate with IdentityServer v3 - Offset in Audience を参照してください(

今は .net core 2.0 に移行しています。このガイドに従ってID を移行すると、他のオプションがあり、コア 1.0 には

問題: そのため、LegacyAudienceValidationプロパティがなくなり、その結果、オーディエンスの検証エラーが発生します。

Microsoft.IdentityModel.Tokens.SecurityTokenInvalidAudienceException: IDX10208: 対象ユーザーを検証できません。validationParameters.ValidAudience が null または空白で、validationParameters.ValidAudiences が null です。

私のクライアント設定コードは次のようになります

aspcore api に欠けているものがありますか、それともこのギャップを修正するためのヒントはありますか?