Custom "System is restarting..." page?
Is it possible to have a custom "System is restarting..." page? Has anyone ever tried to do this?
Hello Mark,
The system is restarting message is not generated by Sitefinity it is comming from .NET framework. I don`t think it can be changed, I was searching for a way, but didn`t find any. I've never actually seen it fire off on a live site either. I think it's a local, in debug, and/or iis express/cassini related page.
Regards,From Sitefinity 7.1 it is possible to customize the default message: "The system is restarting message".
Here is the solution:
1.Create custom SitefinityHttpModule:
namespace
SitefinityWebApp.Tests
/// <summary>
/// Custom Sitefinity HTTP module - customize the default
"The system is restarting..." message
/// </summary>
public class CustomSitefinityHttpModule : SitefinityHttpModule
/// <summary>
/// Called on begin request
during system restarting. The request should be completed here, because the
system will not be able to handle the request at this time.
/// By default sends 'The system
is restarting...' message and completes the request.
/// Can be overridden to
implement different behavior.
/// </summary>
/// <param name="context">The HTTP context.</param>
protected override void OnSystemRestarting(HttpContext context)
SitefinityHttpModule.SendDelayedRedirect(context, "<h2>Custom restarting
message</h2><p>Please wait a few seconds. You will be redirected
automatically.</p>");
2.Register the module in the web.config replacing the default one:
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
<add name="Sitefinity" type="SitefinityWebApp.Tests.CustomSitefinityHttpModule,
SitefinityWebApp" />
...
Regards,
Vladimir
I'm running Sitefinity 7.1.5200.0, but receive a "No suitable method found to override" for OnSystemRestarting. Am I missing something?
www.sitefinity.com/.../internal-hotfix-builds
It stats that it is fixed 7.1.5205. So Rich that might be the problem, not.
Markus
Hi,
As Markus mentioned since the release of Sitefinity 7.1.5205 version it is possible to customize the default "The system is restarting..." server message while the website is restarting.
Regards,
Stefani Tacheva
Telerik