Reputation: 721
The situation is weird. We've developed a deployment system for our internal use. The system downloads precompiled binaries and copy to application directory using robocopy, excluding unchanged files.
The problem is, after this operation, the application doesn't hit application_start
. Even we restart application domain. (I even restarted the IIS itself but no luck) I even change web.config
manually after auto-deployment, again no luck. I run iisreset
, the same, did not hit application_start
. But the application is running! we use a state server, and we continue to use application like nothing happend (except application variables, they all disappear)
In application_start
, we initialize some Application variables by adding like following:
logger.info("bla bla");
Application.Add("KEY",somevaluefromdb);
We do not see any log messages too.
But when i deploy same binaries manually (by copying and pasting.), the application_start
hits, we see log message, and the variables are initialized.
Did anyone encounter such situation?
Upvotes: 1
Views: 1507
Reputation: 328
If PrecompiledApp.config file does not exist at publishing app root folder, the events would not execute. I spend hours for this meaningless error :(
Related answer: Global.asax not firing for Release build
Upvotes: 1