-1

I am using [Authorize] tags to ensure a user is logged in before viewing a controller or action. However, it redirects to :

Account/Login?ReturnUrl=%2f_internal%2fHome%2f

and I would like to change this to redirect to /Account/Account/Login (to include the area), but I can't seem to find where I can go to change this link?

4

1 回答 1

5

If you are using Forms Authentication you can edit the URL in the web.config file in the root of your application. The section will look something like the following.

<system.web>
    <authentication mode="Forms">
        <forms loginUrl="~/Account/Login" timeout="2880" />
    </authentication>
</system.web>

Change the loginUrl attribute and you are good to go :)

于 2013-06-26T22:52:08.910 回答