우리는 PC (Windows 7, IIS 7.5)에서 두 응용 프로그램 간의 인증을 사용하려고 시도하고 있습니다. 그러나 문제는 교차 사이트 인증이 작동하지 않는이 사이트 (Windows Web Server 2008, IIS 7.0)를 게시하려고 할 때입니다 !!여러 응용 프로그램에서 양식 인증
Dim ticket As New FormsAuthenticationTicket(1, smsProfile, DateTime.Now, _
DateTime.Now.AddDays(1), True, AdminSessions.UserObj.Pid, _
FormsAuthentication.FormsCookiePath)
Dim hash As String = FormsAuthentication.Encrypt(ticket)
Dim cookie As New HttpCookie(
FormsAuthentication.FormsCookieName,
hash)
If (ticket.IsPersistent) Then
cookie.Expires = ticket.Expiration
End If
Response.Cookies.Add(cookie)
Response.Redirect(smsPortal)
:
Dim formsCookie As HttpCookie = Request.Cookies(FormsAuthentication.FormsCookieName)
If (formsCookie IsNot Nothing) Then
Else
' always null
우리는 뒤에 코드에서이 같이하는 Pathes를 확인하려고 :
긴 invistigation 후 우리는 오류가 두 번째 사이트에 다음과 같은 코드에서 발생한 것을 발견 web.config에서 :
<authentication mode="Forms">
<forms name=".ASPXFORMSAUTH" enableCrossAppRedirects="true" domain="mydomain.com.jo" loginUrl="http://..." protection="All" path="/"/>
</authentication>
친절한 조언 우리는 IIS의 차이점은 무엇입니까? 로컬 PC 및 서버.
감사합니다.
둘 다 동일한 도메인에 게시됩니까? –
예, 동일한 도메인에서 모든 도메인이 separete에 있습니다. 예 : sub1.mydomain.com.jo, sub2.mydomain.com.jo – Ibsuser
이에 대한 특별한 구성이 있습니까? – Ibsuser