---
title: "How to expire session after 10 minutes?"  
description: "How to expire session after 10 minutes?"  
author: "Anonymous User"  
published: 2014-10-08  
updated: 2014-10-08  
canonical: https://www.mindstick.com/forum/2334/how-to-expire-session-after-10-minutes  
category: "asp.net"  
tags: ["asp.net", "c#"]  
reading_time: 1 minute  

---

# How to expire session after 10 minutes?

I have to expire a [session](https://www.mindstick.com/articles/12042/session-in-c-sharp) after 30 [minutes](https://www.mindstick.com/articles/23598/best-wedding-photographer-inspire-the-best-to-protect-your-valuable-minutes) when [user](https://www.mindstick.com/articles/13001/multi-statement-table-valued-user-defined-function-in-sql-server) doesnt do any work for 30 minutes But when user does any work then session should not expire.

How can I do this?

## Replies

### Reply by Anonymous User

Set your Session.Timeout to be 30\

Session.Timeout = 30;

You can do this on the session start event in the global.asax file, or in your web.config file\

```
<configuration>  <system.web>    <sessionState timeout="20"></sessionState>  </system.web></configuration>
```


---

Original Source: https://www.mindstick.com/forum/2334/how-to-expire-session-after-10-minutes

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
