I'm working with a personal ASP.NET MVC5 project, hosted on Azure
I just realized that, every 5 minuts, Session_OnStart
is called
My code looks like this :
public void Session_OnStart()
{
Guid sessionGuid = Guid.NewGuid();
HttpContext.Current.Session.Add("_MySession", sessionGuid);
RegisterSession(sessionGuid);
logger.Log(LogLevel.Info, "Starting session with guid " + sessionGuid.ToString());
}
The idea is to give a GUID to each user coming to the website, to anonymously follow what he is doing and what pages he opens.
However, I didn't go to my PreProd environment this morning, and the fact it's fired every 5 minutes (more or less 5 seconds) shows that it's a background process or something which accesses to the website.
This didn't happen in localhost testing, only when hosted on Azure
How can I stop this to prevent Azure process to fire Session_OnStart
?
Thank you