1

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?

Roli
  • 11
  • 1
  • If the application is idle it's the default behaviour. You can prevent that by having a keep alive. http://stackoverflow.com/questions/1306380/can-you-prevent-your-asp-net-application-from-shutting-down – brduca May 18 '15 at 16:57
  • the shutdown just happens some seconds! after the deployment so it shouldn't be idle. – Roli May 19 '15 at 08:00
  • Other default behaviour of the IIS is shutting down when some amount of errors occurs. Did you checked the logs? – brduca May 19 '15 at 09:33
  • yes we don't have exceptions in our log or even in the windows event log. also in this case the error would occur on second startup two and then should do the same shutdown again. but only the first app is shutdown the second keeps running – Roli May 19 '15 at 11:21
  • The application that shutdowns after some seconds has following shutdown message in logs: Change in C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\myapp\b38c4481\2aa9ec95\hash\hash.web HostingEnvironment initiated shutdown HostingEnvironment verursachte ein Herunterfahren – Roli May 19 '15 at 13:13

0 Answers0