Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebActivatorEx.ApplicationShutdownMethod doesn't get invoked #34

Open
kiran512 opened this issue Jul 29, 2020 · 1 comment
Open

WebActivatorEx.ApplicationShutdownMethod doesn't get invoked #34

kiran512 opened this issue Jul 29, 2020 · 1 comment

Comments

@kiran512
Copy link

I have an application and configured PreApplicationStartMethod and ApplicationShutdownMethod , the PreApplicationStartMethod get invoked when I am starting the application but the ApplicationShutdownMethod doesn't get invoked when I stop the application(I am trying to run the application from visual studio in debug mode, I tried deploying the same in azure app service also , it doesn't work)

@davidebbo
Copy link
Owner

Is this an ASP.NET app or something else? See

if (HostingEnvironment.IsHosted)
{
Type startMethodType = typeof(StartMethodCallingModule);
if (isRunningMono)
{
HttpModuleActionCollection modules = (WebConfigurationManager.GetWebApplicationSection("system.web/httpModules") as HttpModulesSection).Modules;
modules.Add(new HttpModuleAction(startMethodType.FullName, startMethodType.AssemblyQualifiedName));
}
else
{
Microsoft.Web.Infrastructure.DynamicModuleHelper.DynamicModuleUtility.RegisterModule(startMethodType);
}
}
for the logic used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants