0

I am developing classified ads application in ASP.NET MVC3 using Entity Framework 4.3 for database.

I am facing problem when user session is active and execute any database query by entity framework then application session time's out unexpectedly.

Note that the query gets execute successfully and I can see my results as well but after a little while asp.net session terminates.

This only happen when I host my application to the live server (Arvixe). On my Local IIS it is working fine.

If I use any other source for database query then it is working fine.

I have also reset session time-out in web.config. I am using MYSQL. Any thoughts?

Yasser Shaikh
  • 46,934
  • 46
  • 204
  • 281
Shoaib Ijaz
  • 5,347
  • 12
  • 56
  • 84

1 Answers1

0

try setting values for wait_timeout & interactive_timeout in MySQL configuration file my.cnf as:

interactive_timeout = 120
wait_timeout = 120

then restart MySQL server.

Omesh
  • 27,801
  • 6
  • 42
  • 51
  • Sorry I forgot to mention this is not the db session it is the asp.net session the times out. My query gets executes in a fraction of second but once it is executed something goes wrong with my application session. I can understand that query has not to do any thing with application session but it only happens in case of Entity Framework. It seems like the application pool is getting recycled or something else I am not sure. – Shoaib Ijaz Jul 30 '12 at 06:23
  • Is there any solution...I have done lot of search but cant figure out! – Shoaib Ijaz Jul 31 '12 at 09:47
  • no idea about asp.net. as per database is concerned that's the only solution I can think of. don't forget to mark up and accept answer. – Omesh Jul 31 '12 at 10:15