何を試しても、ユーザーが 10 分後にログオフされるという、非常に悪い問題が発生しています。
適用可能なすべての更新プログラムと .Net 3.5 SP1 を備えた仮想サーバーとして実行されている Server 2003 R2 Standard Edition 上の IIS 6.0 で実行されている ASP.Net 2.0 を使用しています。
クライアントは Internet Explorer 7.0 です
以下は、web.config 設定です。
<!-- Authentication Mode -->
<authentication mode="Forms">
<forms name=".RecipeViewer" timeout="240" />
</authentication>
以下は、認証 Cookie を設定するために使用されるコードです。
Private Sub SetCookie(userName)
' Use security system to set the UserID within a client-side Cookie
Dim ticket As New FormsAuthenticationTicket(1,userName, DateTime.Now, DateTime.Now.Add(Me.GetFormsAuthSettings.Forms.Timeout), True, String.Empty, FormsAuthentication.FormsCookiePath)
Dim hash As String = FormsAuthentication.Encrypt(ticket)
Dim cookie As New HttpCookie(FormsAuthentication.FormsCookieName, hash)
cookie.HttpOnly = True
If (ticket.IsPersistent) Then
cookie.Expires = ticket.Expiration
End If
Response.Cookies.Add(cookie)
' Redirect browser back to originating page
Response.Redirect(Request.ApplicationPath)
End Sub
Private Function GetFormsAuthSettings() As System.Web.Configuration.AuthenticationSection
Return DirectCast(System.Configuration.ConfigurationManager.GetSection("system.web/authentication"), System.Web.Configuration.AuthenticationSection)
End Function
以前は FormsAuthentication.SetAuthCookie を使用していましたが、FormsAuthentication.RedirectFromLoginPage メソッドも試していましたが、これらはどちらも同じ結果でした。 FormsAuthentication クラスが行います。
この問題は、Visual Studio 2008 asp.net ホスティング環境または IIS 7.0 では再現できません。
EDIT : ホストされたサイトが信頼できるサイトとして追加されていても、Cookie は有効になっています。
編集: Google Chrome と Firefox にはこの問題はありません。
EDIT : ターゲット マシンの検証済み Cookie は、設定に従って 4 時間後に期限切れになるように設定されています (タイムアウト = 240 分)。
編集:ハウスが言うように、誰もが嘘をつきます。ユーザーは新しいコード ベースを実際にテストせず、ソフトウェアがまだ壊れているという先入観を持っていました。このトピックに返信してくださった皆様、ありがとうございます。
関連性がなくなったためにこれを閉じるのではなく、この質問には非常に優れたトラブルシューティング手法がいくつかあるため、人々が問題のトラブルシューティングを行うのに役立つようにしておいてください。