Microsoft Channel9 Videos about SharePoint 2007
I have selected a targeted set of videos that helps Information Technology Administrators, Developers, and Project Managers understand the capabilties of Microsoft Office SharePoint Server 2007 (MOSS 2007). The videos I am highlighting are from channel9.microsoft.com. Please review them at your convenience. I have specified links to the videos in case you are reading this blog entry through an RSS feed.
Here are the videos...enjoy!
SharePoint 2007: Developing Workflows
MOSS 2007: Business Data Catalog and Dashboards
SharePoint 2007: Configuring Security
SharePoint 2007: InfoPath 2007 - Web Enabled
Hi,
I am a beginner for Moss 2007. I wrote a code for adding a Role into the SubSIte I have copied all code here and error too. I need to find out why after Breaking Role Inheritance I am getting the
Error: cannot customize permissions level in a website with inherited permissions level.
try
{
//create the instance of site and web
SPSite TopLevelSite = new SPSite(txtSiteUrl.Text.Trim());
SPWeb webInstance = TopLevelSite.AllWebs[txtWebUrl.Text.Trim()];
//allow all updates
webInstance.AllowUnsafeUpdates = true;
webInstance.BreakRoleInheritance(true);
webInstance.HasUniquePerm = true;
webInstance.Update();
//get the role definition of web
SPRoleDefinitionCollection roleDefinitions = webInstance.RoleDefinitions;
//create a new instance of roledefinition
SPRoleDefinition roleDefinition = new SPRoleDefinition();
//set the parameters for the roledefinition
roleDefinition.Name = txtRoleDefName.Text.Trim();
roleDefinition.Description = txtRoleDescription.Text.Trim();
//set the permission masks
SPBasePermissions permissionMask = new SPBasePermissions();
if (chkBoxFullCtrl.Checked)
{
permissionMask = webInstance.RoleDefinitions["Full"].BasePermissions;
}
else if (chkBoxContribute.Checked)
{
permissionMask = webInstance.RoleDefinitions["Contribute"].BasePermissions;
}
else
{
permissionMask = webInstance.RoleDefinitions["Read"].BasePermissions;
}
roleDefinition.BasePermissions = permissionMask;
//add the role
roleDefinitions.Add(roleDefinition);
MessageBox.Show("Role Added Successfully");
//dispose the objects
webInstance.Dispose();
TopLevelSite.Dispose();
}//end of try
catch (Exception ex)
{
MessageBox.Show("Error in maskig" + ex.Message.ToString());
}//end of catch
}//end of else
I need little guidance.Can somebody help me out.
Thanks in advance
Posted by: Soni | June 10, 2009 at 05:11 PM