Here is the quick way to implement
Maintenance page in SharePoint, during upgrade/service pack patching: Create
a app_offline.htm file in IIS Root folder of your SharePoint site.
Place some descriptive text/images to the file, Make sure the file size is at
least 512 bytes (otherwise, you will get 404 page not found error!). That's
all!
File Location: C:\Inetpub\wwwroot\wss\VirtualDirectories\80
When you have a file called app_offline.htm in your website,
ASP.Net will show the content of this file instead of processing all the
regular stuff that should happen.
What does that mean for SharePoint?
Sometimes you have to run an update, and you wish that no
user accesses the site you are updating.
App_Offline.htm and working around the “IE
Friendly Errors” feature
I've placed the
maintenance page content like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Application offline</title>
</head>
<body>
<h1>This application is offline for maintenance</h1>
<p>
We are running updates in this system. The application will be available as soon as possible. We are sorry to cause inconvenience.
</p>
<!--
Add some more stuff, so the file size will reach 512 bytes minimum:
12345678901234567890123456789012345678901234567890
12345678901234567890123456789012345678901234567890
12345678901234567890123456789012345678901234567890
12345678901234567890123456789012345678901234567890
12345678901234567890123456789012345678901234567890
12345678901234567890123456789012345678901234567890
12345678901234567890123456789012345678901234567890
12345678901234567890123456789012345678901234567890
12345678901234567890123456789012345678901234567890
12345678901234567890123456789012345678901234567890
-->
</body>
</html>
It’s important to place this file into the inetpub-directory.
You cannot use this functionality, when you place this file into the root of a
SharePoint-site using SharePoint Designer.When ASP.Net finds this file in the
directory of the site, its content is sent back to the requesting client.
Now, we can run our update procedure. But remember, you
cannot access the SharePoint site using a browser. You have to use
STSADM-commands, PowerShell-cmdlets or your own commandline tools.
No comments:
Post a Comment