동일한 세션 (http : //web1.local 및 http://web2.local)이있는 2 개의 도메인에서 실행되도록 ASP.NET 4.0 응용 프로그램 (쿠키를 통한 세션 ID)의 SessionID를 변경해야합니다. 이렇게하면 두 도메인간에 동기화 된 항목이 유지됩니다.ASP.NET 변경 SessionID
따라서 페이지에는 새 SessionID를 설정해야하는 "setkey.aspx/ashx"가있는 iframe이 있습니다. Session.Start에서
<iframe src="http://web1.local/SetKey.aspx?sid=<%=Session.SessionID%>" width="250" height="100"></iframe>
<iframe src="http://web2.local/SetKey.aspx?sid=<%=Session.SessionID%>" width="250" height="100"></iframe>
세션
이미 세션 아이디가 동일한 Broeser에서 여러 요청을 통해 고정 유지되도록 충전된다.대부분 SessionIDManager.SaveSessionID를 사용하는 여러 게시물을 발견했지만 그 중 아무 것도 작동하지 않을 수 있습니다.
이 코드를 발견했지만 어디에서 호출해야합니까? (Global.asax에/default.aspx에/setjey.aspx/ASHX?)
Dim Redirected As Boolean = False
Dim Added As Boolean = False
Dim SID = Request.QueryString("sid")
If Not String.IsNullOrEmpty(SID) AndAlso SID.Length = 24 Then
Dim SM As New SessionIDManager
SM.InitializeRequest(HttpContext.Current, False, True)
SM.RemoveSessionID(HttpContext.Current)
SM.SaveSessionID(HttpContext.Current, SID, Redirected, Added)
End If
사람이 코드가 제대로 실행에 도착 했습니까?
SQL State Server를 사용 하시겠습니까? http://support.microsoft.com/kb/317604/ko-KR –
안녕하세요, SQL Server는 많은 성능을 필요로합니다. – Christoph