We are deploying our asp.net 4.5 application with msdeploy to an iis 7.5 on our ci-server. Before the msdeploy step we shutdown the application pool and after the deployment we start the application pool again.
Now the problem is that we get Application_Start event 2 times for the application and after some seconds one Application_End event for the first application that was started.
In Logfile we get something like this:
2015-05-18 16:12:16 Application Startup (id=10e4b1a9-dc9c-471b-bf92-bb172677f3a4)
2015-05-18 16:12:12 Application Shutdown (id=83aa3b76-ae4d-4433-a1a7-df3a7756af7e)
2015-05-18 16:11:54 Application Startup (id=83aa3b76-ae4d-4433-a1a7-df3a7756af7e)
How can i prevent that application is started multiple times?