Can I customize application.master and aspx files present under _layouts folder? - MOSS 2007 application pages customization

I had a support request from a customer the other day, who did some weird customization to his MOSS 2007 sites. Well, the support incident details did not have specific information on why he had logged this support call, so I called him. After the initial warm greeting with "Hi, how are you..." and stuffs like that, he showed me the remarkable customization he has been able to do with MOSS 2007 sites. "Why remarkable?" - well I don't particularly focus on sarcasm here, but I mean, really that guy had some pretty neat customization in place that I just asked him "Are we dealing with a SharePoint site at all?" - It was too good, polished and compact.

After giving the due complements his work deserved, I asked him what the problem was? He said he followed Customizing Master Pages in Windows SharePoint Services & How to: Create a Site Definition from an Existing Site Definition MSDN articles and a few other posts available online that really helped him a lot in doing what he did. But he said he has a concern. "Tell me customer, I am all ears!". What he said/asked wasn't really "shocking" to me, but I kind of felt the same pain the customer was perhaps in after hearing what he said (put yourself in customer's shoes - as they call it).

Well, the problem really was, though his SharePoint pages/sites reflect his customization, the SharePoint administration pages (those set of aspx pages & application.master file found under LAYOUTS folder) did not. He said, this was not the case in the previous version of SharePoint (SharePoint Portal Server 2003 & WSS V 2.0). I agreed with him and a "seasoned" support professional told him the technical reason for this behavior. The reason is that application pages follow a different (that's actually separate) master page to show itself up. It does not depend on site definitions to define how it should look anymore. I was able to convince him that it's for the good. I should say he also accepted it in a good sense. However, (because I put myself in his shoes) he probably felt that I could help further and I obliged as he told there is a "pressing" business requirement. I told him I'll try my best to help you.

It's unfortunate, application pages are now separated from site pages. I discussed with some colleagues and though they were as willing as I was to help, 898631 stopped us. Okay, we are at the end of a tunnel now, if I could suggest one best approach to customer it is this:

Just back up your LAYOUTS folder (so that you have it handy to revert back to out of the box files if MS support asks) and customize the files in LAYOUTS folder.

This is kind of accepted as this is the only way out if your requirement is to customize application pages. At least that's what I thought until I stumbled upon this article by Michael Yeager.

Actually, it's pretty neat way to customize application pages. See details from the above link, but in crisp, here it is:

  • Copy the TEMPLATE/LAYOUTS folder in TEMPLATE folder with a different name e.g., LAYOUTS<WEBAPPNAME>.
  • Open IIS Manager, expand the web site hosting SharePoint site in question. Right-click _layouts virtual directory, select Properties and use the "Browse..." button in "Home Directory" tab to change the path from LAYOUTS to LAYOUTS<WEBAPPNAME> folder.

(+) of this approach - as I see it:

  • Allows customization of application pages for individual SharePoint web sites.
  • Out of the Box files are intact.
  • Ability to revert back to out of the box installation if needed.

(-) of this approach - as I see it:

  • If public update/hotfix/SP, update files present under LAYOUTS folder, the application folder used by your "customized" SharePoint site will not be updated. If that's a critical update, there's a potential risk involved.
  • This approach might lead to excessive work in terms of managability and maintenance.

I suggested both these approaches to customer and left the "choice open" to him. He appreciated the effort and accepted this as a resolution for the support incident, but did not convey which approch he intends to take (which I was curious and interested in knowing). Anyway, another support incident closed as resolved. But I hope the above information was helpful as it was for this "creative" customer of mine.