<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Just Another Web Application : sharepoint</title><link>http://blogs.technet.com/jasbro/archive/tags/sharepoint/default.aspx</link><description>Tags: sharepoint</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>On the subject of the Central Admin website</title><link>http://blogs.technet.com/jasbro/archive/2008/03/28/doing-unsupported-things-to-sharepoint-all-about-central-admin.aspx</link><pubDate>Fri, 28 Mar 2008 06:22:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3022403</guid><dc:creator>jasbro</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/jasbro/comments/3022403.aspx</comments><wfw:commentRss>http://blogs.technet.com/jasbro/commentrss.aspx?PostID=3022403</wfw:commentRss><description>&lt;P&gt;I've been rooting round in SharePoint internals today, mostly out of curiosity, after&amp;nbsp;a fellow engineer here at the GTSC mentioned changing the port number on which Central Admin is published. We have a supported way, and some unsupported ways, and some ways that are sort of outside the scope of SharePoint entirely. So I figured why not a blog post?&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;The officially supported way:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE style="FONT-FAMILY: monospaced"&gt;psconfig.exe -cmd adminvs -port 5950&lt;/PRE&gt;
&lt;P&gt;Pretty simple, but not commonly known (I had to double-check myself). Reprovisions (or more accurately,&amp;nbsp;&lt;EM&gt;alters the existing provisioned copy of&lt;/EM&gt;) your Central Admin site on the appropriate port. This command can also provision or unprovision Central Admin entirely, and can change the authentication scheme.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;The unsupported way:&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;open inetmgr.exe&lt;/LI&gt;
&lt;LI&gt;right-click the central admin website&lt;/LI&gt;
&lt;LI&gt;click properties&lt;/LI&gt;
&lt;LI&gt;on the first tab, change the port binding, click OK and go merrily about your business.&lt;/LI&gt;&lt;/UL&gt;
&lt;P mce_keep="true"&gt;The downside here? Well the shortcut in your start menu will no longer point at the right port, for one thing. You may be able to live with that, but in addition, our config and deployment&amp;nbsp;tools won't be able to talk to central admin if they need to, service packs and updates may break your changes and indeed future updates may flat-out fail.&lt;/P&gt;
&lt;P mce_keep="true"&gt;Internally, the central admin URL is stored in two places, which won't be updated by this method. First,&amp;nbsp;in the registry, at:&lt;/P&gt;
&lt;P mce_keep="true"&gt;HKLM\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\WSS&lt;BR&gt;CentralAdministrationURL&lt;BR&gt;REG_SZ&lt;/P&gt;
&lt;P mce_keep="true"&gt;Secondly, in the config database in the 'objects' table, as part of the big bad voodoo 'properties' field in one or more rows (in my case, two rows). Exploring this deeply is probably beyond the scope of this post, suffice it to say: &lt;STRONG&gt;don't mess with the config DB, and don't change the Central Admin port this way if you can possibly avoid it.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;A supportable alternative:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;This is how my usual virtual machines are set up. I do not change the port on which Cental Admin was originally configured. I do however, add another IIS binding, &lt;EM&gt;but with a host header.&lt;/EM&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;First, we need a hostname or host header. Often, you can add a DNS name, for example "admin.sharepoint.com", then we once more crack open inetmgr.exe, get the properties of the central admin site, and hit the advanced button in the IP binding section. You then:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Click Add&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Add a new binding with name and port 80 specified.&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Click OK&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P mce_keep="true"&gt;This allows me to contact Central Admin from remote machines without punching holes in the firewall and without actually moving the existing CA site. The downside? If you run the psconfig command mentioned above, it'll wipe your additional bindings. And your menu shortcuts will still point to the original port.&amp;nbsp;The upside? you don't have to remember the port number any more, In fact, I find it so useful that on my VMs I have a HOSTS file entry marked 'admin' pointing to 127.0.0.1 and a host header to match. I can just type 'admin' into the address bar and away we go.&lt;/P&gt;
&lt;P mce_keep="true"&gt;So there are three things you can do to alter the port on which Central Admin is published, one of which puts you way outside supportable territory, and two of which we'll happily support. Go with the good two, guys!&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3022403" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jasbro/archive/tags/sharepoint/default.aspx">sharepoint</category><category domain="http://blogs.technet.com/jasbro/archive/tags/supportability/default.aspx">supportability</category><category domain="http://blogs.technet.com/jasbro/archive/tags/MOSS/default.aspx">MOSS</category></item><item><title>Blogging catchup and mailbox spring clean</title><link>http://blogs.technet.com/jasbro/archive/2008/03/07/blogging-catchup-and-mailbox-spring-clean.aspx</link><pubDate>Fri, 07 Mar 2008 03:50:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:2971386</guid><dc:creator>jasbro</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/jasbro/comments/2971386.aspx</comments><wfw:commentRss>http://blogs.technet.com/jasbro/commentrss.aspx?PostID=2971386</wfw:commentRss><description>&lt;P&gt;Having recently spent some time in India attending training on &lt;A class="" title="Search Server 2008" href="http://www.microsoft.com/enterprisesearch/serverproducts/searchserver/default.aspx" mce_href="http://www.microsoft.com/enterprisesearch/serverproducts/searchserver/default.aspx"&gt;Microsoft Search Server 2008&lt;/A&gt;, and having been quite sick as a result, I've got a bit of a backlog of SharePoint blogging to catch up with. First of all, to comment on Search Server: This is a &lt;EM&gt;great&lt;/EM&gt; product. It significantly builds on the&amp;nbsp;search already offered by WSS and MOSS, streamlines the admin and search&amp;nbsp;interface, adds Ajax functionality and Federation, and comes in a free Express&amp;nbsp;flavour to boot. This is a new, standalone&amp;nbsp;product, but you could potentially&amp;nbsp;also&amp;nbsp;look on it as an expansion/update for your current WSS 3.0&amp;nbsp;installation. An update for MOSS adding this functionality will be available on a provisional timeframe of mid-2008 (calendar).&lt;/P&gt;
&lt;P&gt;MOSS administrators, you may be aware that SQL Database maintenance can be the &lt;A class="" title="You experience issues with portal alerts in SharePoint Portal Server 2003 or with search performance in SharePoint Server 2007 after you create SQL Server 2005 maintenance plans" href="http://support.microsoft.com/kb/930887" mce_href="http://support.microsoft.com/kb/930887"&gt;bane of your existence&lt;/A&gt;, as well as being something of a dark art with documentation having been thin on the ground. The good news is that there is now a whitepaper covering all aspects of DB maintenance for SharePoint. &lt;A class="" title="Database Maintenance for Sharepoint whitepaper" href="http://go.microsoft.com/fwlink/?LinkId=111531&amp;amp;clcid=0x409" mce_href="http://go.microsoft.com/fwlink/?LinkId=111531&amp;amp;clcid=0x409"&gt;Download it here&lt;/A&gt; and get cracking on supported database maintenance scenarios.&lt;/P&gt;
&lt;P&gt;Securing MOSS is a large topic deserving of more than just a throwaway line on a blog, so I intend to develop some content on the subject in the coming weeks, as workload allows. For now, here's the &lt;A class="" title="MOSS Security" href="http://technet.microsoft.com/en-us/library/cc263518.aspx" mce_href="http://technet.microsoft.com/en-us/library/cc263518.aspx"&gt;Roadmap to Security Content for Office Sharepoint Server 2003&lt;/A&gt;, which should be on any admin's bookmark list.&lt;/P&gt;
&lt;P&gt;Unfortunately, I'm short on time to post much more than this for now, but expect more in the near future...&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=2971386" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jasbro/archive/tags/sharepoint/default.aspx">sharepoint</category><category domain="http://blogs.technet.com/jasbro/archive/tags/security/default.aspx">security</category><category domain="http://blogs.technet.com/jasbro/archive/tags/search/default.aspx">search</category></item><item><title>I love Sushi</title><link>http://blogs.technet.com/jasbro/archive/2008/02/19/i-love-sushi.aspx</link><pubDate>Tue, 19 Feb 2008 09:28:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:2909471</guid><dc:creator>jasbro</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/jasbro/comments/2909471.aspx</comments><wfw:commentRss>http://blogs.technet.com/jasbro/commentrss.aspx?PostID=2909471</wfw:commentRss><description>&lt;P&gt;No, I really, &lt;EM&gt;really&lt;/EM&gt; love sushi. Quite often you'll find me dining out at Hamachi-Ya, Sushi Train, Sapporo or Sushi Club, four of my favourite japanese restaurants in Sydney.&lt;/P&gt;
&lt;P&gt;So imagine my joy when I found &lt;A class="" title="SharePoint Sushi" href="http://www.codeplex.com/sushi" mce_href="http://www.codeplex.com/sushi"&gt;SharePoint Sushi&lt;/A&gt;, a neat UI utility to carry out all those day-to-day annoying tasks like backing up, restoring, security checking sites and so on. It's, in essence, a GUI wrapper around many of stsadm's common commands, so it's nothing you can't already do if you're willing to type your fingers to the bone, but oh! It's so much easier and more fun.&lt;/P&gt;
&lt;P&gt;In other news, off to Melbourne this weekend, then I'm in Bangalore for some SharePoint training - will be a new experience for me, first time on the subcontinent. Wish me luck.&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=2909471" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jasbro/archive/tags/sharepoint/default.aspx">sharepoint</category><category domain="http://blogs.technet.com/jasbro/archive/tags/utilities/default.aspx">utilities</category><category domain="http://blogs.technet.com/jasbro/archive/tags/codeplex/default.aspx">codeplex</category><category domain="http://blogs.technet.com/jasbro/archive/tags/sushi/default.aspx">sushi</category></item><item><title>EventID 5566 Troubleshooting in InfoPath Form Services</title><link>http://blogs.technet.com/jasbro/archive/2008/02/05/eventid-5566-troubleshooting-in-infopath-form-services.aspx</link><pubDate>Tue, 05 Feb 2008 05:00:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:2828510</guid><dc:creator>jasbro</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.technet.com/jasbro/comments/2828510.aspx</comments><wfw:commentRss>http://blogs.technet.com/jasbro/commentrss.aspx?PostID=2828510</wfw:commentRss><description>&lt;P&gt;&lt;EM&gt;This post has been snatched from the headlines of Premier Support. The names have been changed to protect the innocent. Now read on...&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Imagine for a moment you're creating a new InfoPath form t recieve user input. Imagine furthermore that you're pre-populating this InfoPath form with information from a web service, in this case based on some sterling advice you &lt;A class="" title="InfoPath get current user wth no code" href="http://blogs.microsoft.co.il/blogs/itaysk/archive/2007/04/05/InfoPath-_2D00_-Get-the-current-user-without-writing-code.aspx" mce_href="http://blogs.microsoft.co.il/blogs/itaysk/archive/2007/04/05/InfoPath-_2D00_-Get-the-current-user-without-writing-code.aspx"&gt;found on a Microsoft blog&lt;/A&gt;. Further imagine that this InfoPath form works perfectly in the InfoPath client application itself, so you pat your own back and deploy it to&amp;nbsp;SharePoint site for initial testing and feedback.&lt;/P&gt;
&lt;P&gt;This is a very common scenario, and most people would never run into the problem my customer did, which was this: When SharePoint users who did not have the InfoPath client app installed came to use the form, it tried to open in InfoPath Forms Services, a wonderful feature of SharePoint. This is fine, the form was designed with this in mind and was set up to be a browser-compatible form. But this happened:&lt;/P&gt;
&lt;P align=center&gt;&lt;IMG title="There has been an error processing the form - Infopath" style="WIDTH: 449px; HEIGHT: 297px" height=297 alt="There has been an error processing the form - Infopath" src="http://mycolleaguesareidiots.com/images/mycolleaguesareidiots_com/37/r_ipath_error.jpg" width=449 mce_src="http://mycolleaguesareidiots.com/images/mycolleaguesareidiots_com/37/r_ipath_error.jpg"&gt;&lt;/P&gt;
&lt;P&gt;In addition, an Event with ID of 5566 was logged to the server's event log.&lt;/P&gt;
&lt;P&gt;Interesting.&lt;/P&gt;
&lt;P&gt;So what did we do here? Well, the first thing was to&amp;nbsp;confirm that the form worked OK in the InfoPath client, which was confirmed. I then set about making sure the steps in the original blog article were valid and didn't contain anything weird. This I achieved by followig the steps myself in my repro environment. During this phase I observed exactly what was going on where for this to work correctly. Mine, &lt;EM&gt;of course&lt;/EM&gt;, didn't work correctly right out of the box, and I discovered there are a&amp;nbsp; number of things that could potentially go wrong here.&lt;/P&gt;
&lt;P&gt;Firstly, Internet Explorer Enhanced Security, which is enabled by default on Windows 2003 servers, may stymie your attempts to even get this working in the&amp;nbsp;InfoPath client, as it did to me while developing on Windows 2003 Server. Create your form on a workstation or turn off IEES by removing it from Add/Remove Programs-&amp;gt; Windows Features&lt;/P&gt;
&lt;P&gt;Second: On some Windows 2003 Sp1 installations, you may possibly run afoul of the LSA Local Loopback restriction. This is designed in order to prevent a class of attacks known as 'reflection attacks', but can, on occasion, have the unfortunate consequence of denying access to code which tries to connect back to the same server to, say, run a web service. There is &lt;A class="" title="LSA Local Loopback Check problem" href="http://support.microsoft.com/kb/896861" mce_href="http://support.microsoft.com/kb/896861"&gt;a KB article&lt;/A&gt;&amp;nbsp;on this, which can be used to eliminate this angle from the enquiry.&lt;/P&gt;
&lt;P&gt;OK, so having eliminated those, we found that my local repro worked fine in both Office Client and IPFS, but&amp;nbsp;the original problem at the customer's end was still extant. &lt;/P&gt;
&lt;P&gt;At this point, we went to the logs. Having set this up myself, I had a set of IIS&amp;nbsp;logs which reflected correct behaviour. I obtained the customer's logs for a similar period and managed to track down the requests in question - which was easy enough to do. IPFS uses /_layouts/FormResource.aspx to render forms and in our scenario I'd expect to see a&amp;nbsp;logged line closely&amp;nbsp;following this which would go to UserProfileService.asmx to do the info retrieval so that IPFS could pre-populate the form.&lt;/P&gt;
&lt;P&gt;What we saw there was of interest.&lt;/P&gt;
&lt;P&gt;Expected behaviour for a secured web service such as this one would be one (or two) HTTP 401 responses, then an HTTP&amp;nbsp;200 response signifying sucess. We saw three 401 responses in a row, and no 200. So IPFS &lt;EM&gt;was&lt;/EM&gt; calling the Web Service, but being denied access.&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;2008-02-01 02:10:33 W3SVC533812677 10.254.72.102 POST /_vti_bin/UserProfileService.asmx - 80 - 10.254.76.37 InfoPathDA 401 2 2148074254&lt;BR&gt;2008-02-01 02:10:33 W3SVC533812677 10.254.72.102 POST /_vti_bin/UserProfileService.asmx - 80 - 10.254.76.37 InfoPathDA 401 1 0&lt;BR&gt;2008-02-01 02:10:33 W3SVC533812677 10.254.72.102 POST /_vti_bin/UserProfileService.asmx - 80 - 10.254.76.37 InfoPathDA 401 1 2148074248&lt;BR&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;More interestingly, from our point of view, the c-ip or Client IP&amp;nbsp;field did not show the IP address of this server. In my good repro, the request came from 127.0.0.1, the local loopback address. The customer's log showed that the request to the web service was coming from a proxy server.&lt;/P&gt;
&lt;P&gt;Light bulbs flashed on in our heads - the call out to the proxy shouldn't have been happening. To solve this, we need to stop IPFS using the proxy. INA quick consultation with the customer revealed that, why yes, we are using a proxy - some custom web parts need to call out to the internet and grab data, so there's a proxy configured in web.config for the MOSS site. Like this:&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;&amp;nbsp; &amp;lt;system.net&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;defaultProxy&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;proxy usesystemdefault="false" proxyaddress="&lt;A href="http://xx.xx.xx.xx:8080/"&gt;http://xx.xx.xx.xx:8080/&lt;/A&gt;" bypassonlocal="true" /&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/defaultProxy&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;/system.net&amp;gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;As you can see, bypass on local is enabled. So why wasn't IPFS bypassing the proxy? The answer lay in the URL used to access MOSS, which in this case was&amp;nbsp;the dot-separated local address moss.company.local. WinHTTP sees this as an FQDN, and doesn't qualify it as local, and WinHTTP does our web service request. The finishing line was in sight. All that remained was to check this MSDN article on &lt;A class="" title="Proxy Bypass in web.config" href="http://msdn2.microsoft.com/en-us/library/aa903323(VS.71).aspx" mce_href="http://msdn2.microsoft.com/en-us/library/aa903323(VS.71).aspx"&gt;enabling bypass lists in web.config or machine.config&lt;/A&gt;, and our troubles were over.&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;&amp;nbsp; &amp;lt;system.net&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;defaultProxy&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;proxy usesystemdefault="false" proxyaddress="&lt;A href="http://xx.xx.xx.xx:8080/"&gt;http://xx.xx.xx.xx:8080/&lt;/A&gt;" bypassonlocal="true" /&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;bypasslist&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;add address="moss.company.local" /&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/bypasslist&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/defaultProxy&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;/system.net&amp;gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;IPFS now works like a charm at the customer's site and serenity has returned to the IT department, just the way we like it.&lt;/P&gt;
&lt;P mce_keep="true"&gt;Incidentally, the &amp;lt;bypasslist&amp;gt; element allows you to use Regular Expression to specify addresses, so you can exclude whole ranges at will - quite neat.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=2828510" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jasbro/archive/tags/troubleshooting/default.aspx">troubleshooting</category><category domain="http://blogs.technet.com/jasbro/archive/tags/sharepoint/default.aspx">sharepoint</category><category domain="http://blogs.technet.com/jasbro/archive/tags/infopath/default.aspx">infopath</category><category domain="http://blogs.technet.com/jasbro/archive/tags/MOSS/default.aspx">MOSS</category><category domain="http://blogs.technet.com/jasbro/archive/tags/Proxy/default.aspx">Proxy</category><category domain="http://blogs.technet.com/jasbro/archive/tags/IPFS/default.aspx">IPFS</category></item><item><title>PSA: Are your customised site definitions supported?</title><link>http://blogs.technet.com/jasbro/archive/2007/12/19/psa-are-your-customised-site-definitions-supported.aspx</link><pubDate>Wed, 19 Dec 2007 06:06:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:2658707</guid><dc:creator>jasbro</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.technet.com/jasbro/comments/2658707.aspx</comments><wfw:commentRss>http://blogs.technet.com/jasbro/commentrss.aspx?PostID=2658707</wfw:commentRss><description>&lt;P&gt;We (Microsoft) have lots published guidance on customising SharePoint for your own specific needs. We provide lots of built-in site definitions for various purposes, but sometimes you need to tweak those to suit your own scenario. But are your tweaks supported?&lt;/P&gt;
&lt;P&gt;Well that depends.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;If you've modified a built-in site definition directly, &lt;STRONG&gt;you are in an unsupported state&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;If you've copied an existing site definition, &lt;EM&gt;then modified the copy&lt;/EM&gt;, &lt;STRONG&gt;you're supported&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Why is this important? Well, a couple of reasons.&lt;/P&gt;
&lt;P&gt;One: we may want to release an update to an existing site definition as part of a service pack or feature pack. This will stomp all over your changes and no doubt you'll be an unhappy bunny about it.&lt;/P&gt;
&lt;P&gt;Two:&amp;nbsp;every so often a case trickles&amp;nbsp;into support&amp;nbsp;where a customer has tried to run an upgrade or migration, and it's failing because of a tweaked&amp;nbsp;built-in site defintion. Eseentially, the upgrade program is utterly baffled that the site def doesn't just upgrade the way it expects. Yes, you will most likely have big problems upgrading a site in which&amp;nbsp;built-in site definitions have been customised.&lt;/P&gt;
&lt;P&gt;So you may find it prudent to check KB 898631&amp;nbsp; when planning custom site or area definitions:&lt;/P&gt;
&lt;P&gt;&lt;A class="" title="KB 898631 on sharepoint customisation support" href="http://support.microsoft.com/kb/898631/en-us" mce_href="http://support.microsoft.com/kb/898631/en-us"&gt;Supported and unsupported scenarios for working with custom site definitions and custom area definitions in Windows SharePoint Services, in SharePoint Portal Server 2003, and in Office SharePoint Server 2007&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;PS: Premier Support here in Sydney &lt;STRONG&gt;IS HIRING&lt;/STRONG&gt;. We're after SharePoint Support Engineers for both development and admin&amp;nbsp;- please feel free to get in touch through the blog and I can get you referred. When I have a public link I'll update to reflect that.&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=2658707" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jasbro/archive/tags/sharepoint/default.aspx">sharepoint</category><category domain="http://blogs.technet.com/jasbro/archive/tags/development/default.aspx">development</category><category domain="http://blogs.technet.com/jasbro/archive/tags/customisation/default.aspx">customisation</category><category domain="http://blogs.technet.com/jasbro/archive/tags/site+definitions/default.aspx">site definitions</category><category domain="http://blogs.technet.com/jasbro/archive/tags/supportability/default.aspx">supportability</category></item><item><title>SPSecurity.RunWithElevatedPrivileges()</title><link>http://blogs.technet.com/jasbro/archive/2007/12/12/spsecurity-runwithelevatedprivileges.aspx</link><pubDate>Wed, 12 Dec 2007 03:09:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:2636833</guid><dc:creator>jasbro</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.technet.com/jasbro/comments/2636833.aspx</comments><wfw:commentRss>http://blogs.technet.com/jasbro/commentrss.aspx?PostID=2636833</wfw:commentRss><description>&lt;P&gt;The subject of today's post: running code in sharepoint with elevated rights, an operation sometimes required, sometimes abused and often misunderstood.&lt;/P&gt;
&lt;P&gt;The WSS Object Model provides a huge number of classes, some of which can carry-out potentially dodgy actions, so require elevation to run. Ordinarily you'd just deal with this by logging in as a user with rights to carry out the operation, but occasionally this isn't practical or possible, and that's where today's subject comes in.&lt;/P&gt;
&lt;P&gt;Let's say, just as an example, you're creating an anonymously-accessible site. In a Control on on of the pages you want to enumerate subsites of your site, and grab some properties thereof, maybe for display, maybe for some other operation in your code - however, this isn't something an anonymous identity can do.&lt;/P&gt;
&lt;P&gt;In steps our hero - RunWithElevatedPrivileges()&lt;/P&gt;
&lt;P&gt;Used correctly, this method allows a specified block of code to run in the context of the SharePoint System Account, a powerful method with much potential. Here's the summary &lt;A class="" title="SDK Reference to SPSecurity.RunWithElevatedPrivileges()" href="http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.spsecurity.runwithelevatedprivileges.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.spsecurity.runwithelevatedprivileges.aspx"&gt;from the SDK&lt;/A&gt;:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;CODE&gt;
&lt;DIV class=CodeDisplayLanguage&gt;[SharePointPermissionAttribute(SecurityAction.Demand, Impersonate=&lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;)] &lt;BR&gt;[SharePointPermissionAttribute(SecurityAction.Demand, ObjectModel=&lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;)] &lt;BR&gt;&lt;SPAN style="COLOR: blue"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt; RunWithElevatedPrivileges (&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CodeToRunElevated secureCode&lt;BR&gt;)&lt;/DIV&gt;&lt;/CODE&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;Now the CodeToRunElevated parameter can be a reference to a void, parameterless method or an anonymous method via&amp;nbsp;delegate() - please, follow the SDK link if that's unclear.&lt;/P&gt;
&lt;P&gt;Pretty simple, huh? Yep, well as always there's a catch or two.&lt;/P&gt;
&lt;P&gt;1. If you're manipulating any Object Model elements within your elevated method, you need to get a fresh&amp;nbsp;SPSite reference inside this call. For example&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;CODE&gt;SPSecurity.RunWithElevatedPrivileges(delegate(){&lt;BR&gt;&amp;nbsp;&amp;nbsp; SPSite mySite = new SPSite(&lt;A href="http://sharepoint/"&gt;http://sharepoint/&lt;/A&gt;);&lt;BR&gt;&amp;nbsp;&amp;nbsp; SPWeb myWeb = SPSite.OpenWeb();&lt;BR&gt;&amp;nbsp;&amp;nbsp; // further implementation omitted&lt;BR&gt;});&lt;/CODE&gt;&lt;/BLOCKQUOTE&gt;
&lt;P mce_keep="true"&gt;2. You can't just use &lt;CODE&gt;SPContext.Current.Site&lt;/CODE&gt; to get your SPSite reference - or you'll ber handed the object with the security context of the anonymous (or non-elevated)&amp;nbsp;user and &lt;EM&gt;your elevation will not work as expected&lt;/EM&gt;.&lt;/P&gt;
&lt;P mce_keep="true"&gt;3. If you need to Update() anything inside this block, you'll need to call SPSite.AllowUnsafeUpdates() on your new site reference (or web reference) &lt;A class="" title="AllowUnsafeUpdates in the SDK" href="http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.spsite.allowunsafeupdates.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.spsite.allowunsafeupdates.aspx"&gt;as per this SDK entry&lt;/A&gt;.&lt;/P&gt;
&lt;P mce_keep="true"&gt;So those are the gotchas. Following those we have the obvious security warnings - be careful what you do within this call, as the system identity has full control over SharePoint and could do Very Bad Things if incorrectly used. Sanitise any user input very carefully if you're going to let it anywhere near this method - you certainly&amp;nbsp;don't want a user finding some injectable exploit into this code. Exercise caution over what you do, for this power must be used wisely. But you knew that, right?&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=2636833" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jasbro/archive/tags/sharepoint/default.aspx">sharepoint</category><category domain="http://blogs.technet.com/jasbro/archive/tags/sdk/default.aspx">sdk</category><category domain="http://blogs.technet.com/jasbro/archive/tags/security/default.aspx">security</category><category domain="http://blogs.technet.com/jasbro/archive/tags/elevated/default.aspx">elevated</category></item><item><title>Quickie blog post: SharePoint SDK available, quick note on discusson lists</title><link>http://blogs.technet.com/jasbro/archive/2007/08/22/quickie-blog-post-sharepoint-sdk-available-quick-note-on-discusson-lists.aspx</link><pubDate>Wed, 22 Aug 2007 07:51:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:1800316</guid><dc:creator>jasbro</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/jasbro/comments/1800316.aspx</comments><wfw:commentRss>http://blogs.technet.com/jasbro/commentrss.aspx?PostID=1800316</wfw:commentRss><description>&lt;P&gt;The Sharepoint SDK (officially, the "SharePoint Server 2007 SDK: Software Development Kit and Enterprise Content Management Starter Kit") is &lt;A class="" title="Sharepoint SDK" href="http://www.microsoft.com/downloads/details.aspx?FamilyId=6D94E307-67D9-41AC-B2D6-0074D6286FA9&amp;amp;displaylang=en" mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyId=6D94E307-67D9-41AC-B2D6-0074D6286FA9&amp;amp;displaylang=en"&gt;downloadable from microsoft.com&lt;/A&gt;. If you develop .NET applications for SharePoint, or support said applications, then you're going to need this sooner or later. Note: it's also viewable online.&lt;/P&gt;
&lt;P&gt;the second quick note: if you plan on developing anything for MOSS 2007 that modifies discussion list posts, you're going to need to remember: updating the 'body' property of the SPListItem object is all very well, but you&amp;nbsp;may also need to update the SPListItem["TrimmedBody"] property too - this is the version of the body text which shows up in &lt;EM&gt;unquoted&lt;/EM&gt; view. This came up in a recent support case&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN: 0cm 0cm 0pt"&gt;&lt;FONT face=Courier size=3&gt;li["Body"] = helper.DoSomethingToBodyText(li["Body"].ToString());&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN: 0cm 0cm 0pt"&gt;&lt;FONT face=Courier size=3&gt;li["TrimmedBody"] = helper.DoSomethingToBodyText(li["TrimmedBody"].ToString());&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN: 0cm 0cm 0pt"&gt;&lt;FONT face=courier size=3&gt;li.SystemUpdate();&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;A popular thing to do with these programatically is to auto-hyperlink or auto-format&amp;nbsp;certain keywords in text - if you don't update both variables you end up with only the quoted view showing your changes.&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=1800316" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jasbro/archive/tags/developer/default.aspx">developer</category><category domain="http://blogs.technet.com/jasbro/archive/tags/sharepoint/default.aspx">sharepoint</category><category domain="http://blogs.technet.com/jasbro/archive/tags/development/default.aspx">development</category><category domain="http://blogs.technet.com/jasbro/archive/tags/sdk/default.aspx">sdk</category></item><item><title>Quickie: Broken web part page? We can help!</title><link>http://blogs.technet.com/jasbro/archive/2007/07/05/quickie-broken-web-part-page-we-can-help.aspx</link><pubDate>Thu, 05 Jul 2007 05:11:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:1442240</guid><dc:creator>jasbro</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.technet.com/jasbro/comments/1442240.aspx</comments><wfw:commentRss>http://blogs.technet.com/jasbro/commentrss.aspx?PostID=1442240</wfw:commentRss><description>&lt;P&gt;I'm called upon to troubleshoot numerous errors with SharePoint on a day-to-day basis, and some of the most frustrating are "Unexpected Error" messages which occasionally crop up on web-part pages. This is worst for administrators when they occur on hitting 'edit page' - worried admins can't then edit the page and end up running round in small circles, flapping their arms and screaming.&lt;/P&gt;
&lt;P&gt;Well, there's an easy trick to get to the web part maintentance page.*&lt;/P&gt;
&lt;P&gt;Let's say your malfunctioning page is:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://sharepoint.contoso.com/pages/default.aspx"&gt;http://sharepoint.contoso.com/pages/default.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;simply tack a querystring onto the end of the URL as follows&lt;/P&gt;
&lt;P&gt;&lt;A href="http://sharepoint.contoso.com/pages/default.aspx?contents=1"&gt;http://sharepoint.contoso.com/pages/default.aspx?&lt;STRONG&gt;contents=1&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;and hit enter. This will drop you straight into Web Part Maintenance, and you can remove the offending web part and get it fixed.&lt;/P&gt;
&lt;P&gt;finally, don't forget if you have to check out the page to make changes, you'll need to check it back in afterwards - if you have full admin access, just hit 'publish', if not, get an &lt;STRIKE&gt;adult&lt;/STRIKE&gt; admin to help you.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;* I can never remember this when called upon to do it. I'm hoping posting it will make it stick in my memory&lt;/EM&gt;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=1442240" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jasbro/archive/tags/troubleshooting/default.aspx">troubleshooting</category><category domain="http://blogs.technet.com/jasbro/archive/tags/web+parts/default.aspx">web parts</category><category domain="http://blogs.technet.com/jasbro/archive/tags/sharepoint/default.aspx">sharepoint</category></item></channel></rss>