2010-02-10 221 views
2

我有一個MVC網站,它運行在IIS6上。由於我沒有訪問Web服務器,我使用.aspx擴展名(在global.asax中)。我有一個名爲「測驗」的控制器,並且它們的所有方法都標有authAttribute。當用戶沒有被授權時,它應該重定向到「/Account.aspx/Logon?ReturnUrl=Test.aspx」,但是我得到了一個錯誤的URL:「/Account/Logon?ReturnUrl=Test.aspx」。我該如何解決這個問題?ASP.NET MVC會員供應商

非常感謝您的幫助。

回答

1

更改Web.config

<authentication mode="Forms"> 
    <forms loginUrl="/Account.aspx/Login" /> 
</authentication>