Click here to Skip to main content
15,886,067 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to find out if my web app is started for the first time.I need to check it on daily basis so that i could send reminder emails.As soon as my app is browsed for the first time the mails should be sent.How to check it? Help Me..



Thanks in advance..
Posted
Comments
Philippe Mori 2-Aug-14 23:16pm    
It is per user behavior or global one?
pwavell 4-Aug-14 5:13am    
global
Philippe Mori 4-Aug-14 8:03am    
What if no user log during that day or if the first user log in really late. You surely don't want that the time remainder are sent depend on weither someone log on and at which time.

1 solution

The first time it runs the Application_Start event will execute in your global.asax file. http://msdn.microsoft.com/en-us/library/vstudio/ms178473(v=vs.100).aspx[^]

However, that is the first time someone visits the application after the App pool instance has been started.

To check for first time in the day you'll just have to record it in the db somewhere and you could use Session_Start in Global.asax to check to see if that user is the first for the day or not.
 
Share this answer
 
Comments
pwavell 6-Aug-14 5:07am    
How to use Session_Start in Global.asax to check to see if that user is the first for the day or not?
ZurdoDev 6-Aug-14 7:55am    
You'll have to store the information in the database and then check.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900