Saturday, March 13, 2010

Moss 2007 Site Action -> Site Settings have disappeared

For some unknown reason for the admin user of our Moss site (and all other users who had full control permissions) the Site Action -> Site Settings menu option have disappeared from the home page. I can navigate to it by going to mysite/_layouts/settings.aspx but I can't change anything it says I do not have permissions.

IF the user logged IS the Site Collection administrator and still gets theses access denied messages, your Content Database seems to be locked. This happens during backups or when backups go wrong (get interrupted for example)
stsadm -o getsitelock -url http://server_name

if it is not showing as 'none', it is locked. fix command:
stsadm -o setsitelock -url http://server%5Fname -lock none

Thursday, March 11, 2010

How to change the Maximum File Upload Size

When a custom master page is applied, editing a list in Datasheet View causes IE to just hang. I found this script hich solved my problem:
<script type="text/javascript">

function GCComputeSizing(GCObject)
{
if (TestGCObject(GCObject))
{
var fBIDI=(document.documentElement.currentStyle.direction=="rtl");
var lGCWindowWidth=document.documentElement.scrollWidth;
var lGCWindowHeight=(document.documentElement.scrollHeight>document.documentElement.clientHeight) ? document.documentElement.clientHeight : document.documentElement.scrollHeight;

var lGCObjectOffsetLeft=0;
var lGCObjectOffsetTop=0;
if (fBIDI)
{
lGCObjectOffsetLeft=-180;
lGCObjectOffsetTop=120;
}
else
{
lGCObjectOffsetLeft=32;
lGCObjectOffsetTop=-2;
}
var lGCObjectWalker=GCObject.parentElement;
while (lGCObjectWalker !=document.body)
{
lGCObjectOffsetLeft+=lGCObjectWalker.offsetLeft;
lGCObjectOffsetTop+=lGCObjectWalker.offsetTop;
lGCObjectWalker=lGCObjectWalker.offsetParent;
if (fBIDI)
if (lGCObjectWalker.offsetLeft > 0)
break;
}
lGCObjectOffsetLeft+=GCObject.parentElement.offsetLeft;
lGCObjectOffsetTop+=GCObject.parentElement.offsetTop;
glGCObjectHeight=lGCWindowHeight - lGCObjectOffsetTop;
if (glGCObjectHeight > lGCWindowHeight)
glGCObjectHeight=lGCWindowHeight
if (glGCObjectHeight < cGCMinimumHeight)f
glGCObjectHeight=cGCMinimumHeight;
if (fBIDI)
{
glGCObjectWidth=lGCWindowWidth+lGCObjectOffsetLeft;
}
else
glGCObjectWidth=lGCWindowWidth - lGCObjectOffsetLeft;
if (glGCObjectWidth > lGCWindowWidth)
glGCObjectWidth=lGCWindowWidth;
if (glGCObjectWidth < cGCMinimumWidth)
glGCObjectWidth=cGCMinimumWidth;
}
}

</script>
place it after core.js in your master page.

How to change the Maximum File Upload Size

By default SharePoint allows a maximum file size of 50MB that can be uploaded into any document library. This might be too much as you might not want users downloading 50MB files over your LAN/WAN. To change the maximum file size
1. Goto SharePoint Central Administration > Configure Virtual Server Settings from Virtual Server List Page.
2. Select your server
3. Goto Virtual Server General Settings (in Virtual Server Management)
4. Change the value of the Maximum Upload Size in MB's.

If you increase the file size limit, your site might occassionally time out for users while they are uploading files. To accomodate this increase the default time out property for IIS.