---
title: "Authorize attribute not working MVC 5"  
description: "Authorize attribute not working MVC 5"  
author: "Anonymous User"  
published: 2018-04-10  
updated: 2018-04-12  
canonical: https://www.mindstick.com/forum/34466/authorize-attribute-not-working-mvc-5  
category: "asp.net mvc"  
tags: ["mvc"]  
reading_time: 1 minute  

---

# Authorize attribute not working MVC 5

I have use [MVC](https://www.mindstick.com/forum/155803/define-cache-profile-in-mvc) [default](https://www.mindstick.com/interview/12771/what-is-the-importance-of-default-resources) [[Authorize](https://www.mindstick.com/forum/326/integrating-authorize-dot-net-in-vb6-application)] [attribute](https://www.mindstick.com/blog/221/attributes-reflection) but it is not working in my project.

When I try to [login](https://www.mindstick.com/articles/12852/styles-login-form-in-android) the [application](https://www.mindstick.com/articles/12824/calculator-application-in-android) it is not login the application and it is not redirecting to the specific [page](https://www.mindstick.com/articles/13031/why-to-make-a-wikipedia-page)

## Replies

### Reply by Anonymous User

You need to check following code in web.config

```
<authentication mode="Forms">
 <forms loginUrl="~/Account/Login" timeout="2880" />
</authentication>
```

\


---

Original Source: https://www.mindstick.com/forum/34466/authorize-attribute-not-working-mvc-5

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
