實施例:表單驗證 - 重定向回到原始域
應用= https://test2.mytest.com/MyApplication/Download.aspx
的應用已表單認證啓用在web.config:
<authentication mode="Forms">
<forms loginUrl="https://test.mytest.com/Login/" name=".ASPXAUTH"/>
</authentication>
<authorization>
<deny users="?"/>
</authorization>
當訪問它正確地重定向應用到登錄頁面:
https://test.mytest.com/Login/?ReturnUrl=%2fMyApplication%2fDownload.aspx
何wever,之後,可以成功登錄進入:的
https://test.mytest.com/MyApplication/Download.aspx
代替
https://test2.mytest.com/MyApplication/Download.aspx
它用在何處登錄應用程序是子域名(test.mytest.com),而不是子域名原始請求(test2.mytest.com)。 有沒有辦法將表單認證重定向回原始的請求子域而不是登錄應用程序所在的子域?
任何幫助,將不勝感激。