July 24, 2012

Blank IIS Manager ( No website )

Sometimes, in Moss 2007, we try to open a site but it doesn’t. Then we try to reset the IIS and got the following error.

Then, try to open the IIS Manager, and we are surprised to see it blank.

After, having a headache, we trying to run the IIS admin service, we again get the following error.

To find the cause for the error , we open the event viewer and get the following error description.


So, the main reason for this blank IIS manager and errors are the problem in the MetaBase.xml file, which can be found at C:\WINDOWS\system32\inetsrv location.


Look for the Date Modified and Size attributes of both the above files. There is a backup (or History) of these files in the History folder which can be found at the location C:\WINDOWS\system32\inetsrv\History. The folder contains backup of both MBSchema.xml and MetaBase.xml files. Now, we have to replace the either of the files MBSchema.xml or MetaBase.xml at C:\WINDOWS\system32\inetsrv, with the latest History found at C:\WINDOWS\system32\inetsrv\History location. 
 Suppose, if the Date Modified attribute of the MetaBase.xml file has the latest date, and then replace this file with the MetaBase.xml file found at location C:\WINDOWS\system32\inetsrv\History.(remove the appended _0000121786_0000000000 like strings). Now, reset the IIS and your IIS manager will get populated.

Drag Drop of webparts functionality is not working in Moss 2007

In Moss 2007, most of the times we want to move the added webparts from one webpart zone to another webpart zone by drag and drop. But sometimes, this functionality is missing in moss 2007 customised pages. The solution of this problem is to add the script to the master page of the site.

Refer to the below image :



Add the script between the <WePartPages:SPWebPartManager> and <form> tag.

        <script language="javascript" type="text/javascript">
            function MSOLayout_GetRealOffset(StartingObject, OffsetType, EndParent)
            {
                var realValue=0;
                if (!EndParent) EndParent=document.body;
                for (var currentObject=StartingObject; currentObject && currentObject !=EndParent && currentObject != document.body; currentObject=currentObject.offsetParent)
                {
                    var offset = eval('currentObject.offset'+OffsetType);
                    if (offset) realValue+=offset;
                }
                return realValue;
            }
        </script>


July 8, 2012

Apply Custom CSS in MOSS 2007 through aspx pages

In Moss 2007, sometimes we want to apply CSS through the aspx pages. Instead of including the complete css file, to write only few css we can use the PlaceHolderAdditionalPageHead content placeholder to include the custom css.

For example, the below code can be used.

<asp:Content id="Content11" runat="server" contentplaceholderid="PlaceHolderAdditionalPageHead">
    <link rel="stylesheet" type="text/css" href="/_LAYOUTS/1033/STYLES/CustomCSSFileName.CSS">
</asp:Content>

May 9, 2012

Creating Site Content Types in Moss 2007

Following are the steps to create content types in moss 2007.

• From any team site, on the Site Actions menu, click Site Settings.
                                                 OR
• From any portal area, click Site Actions, point to Site Settings, and then click Modify All Site Settings.
• On the Site Settings page, under Site Collection Administration, click Go to top level site settings.
• Under Galleries, click Site content types.
• On the Site Content Type Gallery page, on the menu bar, click Create.









• In the Name box, type the name for this content type. This name will appear in the Content Types list when we will create the page layout.
• In the Description box, type a description for this content type
• In the Select parent content type from list, click Publishing Content Types.
• In the Parent Content Type list, click Page.
• Under Put this site content type into, click Existing group, and then click Page Layout Content Types in the list.





Start workflow to approve content on Publishing sites in Moss 2007

a.    Click on View All Site Content , then click on Pages Document Library
b.    Select Settings on Pages document Library then Document Library Settings
c.    Under Permission and Management click Workflow Settings and do the following changes.

  • Select Approval from workflow
  • Enter Workflow Name as HRPagesApproval
  • Check Start this workflow when a new item is created and start this workflow when an item is changed and click next.
  • Enter the Name of the person who will approve the newly created pages
  • Under complete this workflow, select Document is Rejected.





Enable the Content Approval in Publishing sites in Moss 2007

To Enable the Content Approval for the new pages in Pages Document library in Sharepoint publishing sites.
 

a. Click on View All Site Content , then click on Pages Document Library
b. Select Settings on Pages document Library then Document Library Settings
c. Under General Setting click Versioning Settings and do the following changes.





Creating Sharepoint Groups in Moss 2007

Group can be created at the site collection level. The following example will create group with Read only permission.

1)  On the Site Actions menu, point to Site Settings.
2)  On the Site Settings page, under Users and Permissions, click People and groups.
3)  On the People and Groups page, Click New > New Group.
4)  On Next page, Enter Group Name, Group Owner Name and select Read from the Permission Level.














Error installing .Net Framework 3.5 in Sql Server 2012

During installation of Sql Server 2012 on Windows server 2012 or addition of roles and features for SharePoint 2013, the setup wizard will...