2011-02-14 72 views
1

這裏是我的問題在asp.net窗體身份驗證動態設置默認網址

我在我的網站的索引頁兩個登錄控制,每兩個不同usertypes的。

there are two user types brands and creatives. 
the branded user will log in to brands bin(brandsbin.aspx) 
the Creative user will sign in to creativebin(creativebin.aspx) 

我正在使用表單身份驗證登錄。 所以我很困惑這裏要重定向到每個用戶類型的默認路徑。 如何爲每個用戶類型設置默認頁面。

在Web配置文件

我添加了一些類似這樣的

<authentication mode="Forms"> 
<forms name="forms" loginUrl="Index.aspx" defaultUrl="brandsbin.aspx" path="/" timeout="15" slidingExpiration="true"></forms> 
</authentication> 

回答

0

我相信你應該從登錄頁面(Index.aspx的)重定向到根據用戶類型的兩個不同的頁面。例如,您可以使用Login1和Login2,並且必須將這些頁面設置爲web.config中的所有人都可公開,以避免重定向到任何頁面後IIS將您帶回index.aspx。

相關問題