0

I am trying to write some logging for unexspected session losses, i'm unsure if its a timeout issue or something is cuasing me to loss my sessions.

Following this questions answer ASP.NET SessionState timeout I would like to write my logging in the Application_End and Application_Error sections, but i am unable to find my global.asax file.

The file or Application_End and Application_Error have not show up in my search.

How can i find my global.asax file or Application_End and Application_Error sections, or where else could i log to record the loss of sessions?

Thanks in advance.

Community
  • 1
  • 1
Pomster
  • 14,567
  • 55
  • 128
  • 204

1 Answers1

0

Can you check whether you are using the right project template? Web Application Template or Website Template.

If global.asax file is not there , you can add it manually.

Follow the step by step instruction provided here and you will be able to do so

http://www.aspdotnet-suresh.com/2011/05/how-to-add-globalasaxcs-file-in-aspnet.html

  • How do i check the template? i adopted the project and i am not sure what it was created as? – Pomster Sep 17 '13 at 10:44
  • 1
    In any of the template, whether website or web app, if you wish to add global.asax file, you can do that by right clicking the project, add new item and select 'global application class'. This will add global.asax at the root folder – Varun Sharma Sep 17 '13 at 10:49