Thursday, March 12, 2015

Some farm products and patches were not detected in sharepoint CA product and patch installation status


Issue : While running psconfig , ask SharePoint Products Configuration Wizard  getting below error below patch were missing in your farm.  

All  patches installed without error in all servers.

verified these patches were installed in Programs and Features, recently installed updates.  Restarted each SharePoint server after the updates. Still SharePoint thought we hadn't patched one of the servers.

Solution :

Get-SpProduct -Local
(Get-SpServer $env:ComputerName).NeedsUpgrade

Thursday, February 19, 2015

The server was unable to save the form at this error in SP 2013 Site

While working with SharePoint 2013 list, saving the data I got an error saying that “The server was unable to save at this time. Please try again.” As shown the image below.

By checking the logs I have found following error

Event errors :

“Memory gates checking failed because the free memory is less than 5% of total memory. As a result, the service will not be available for incoming requests. To resolve this, either reduce the load on the machine or adjust the value of minFreeMemoryPercentageToActivateService on the serviceHostingEnvironment config element"

Solution :

To fix this error we have to restart “SharePoint Search Host Control” and “SharePoint Administration service”. By refreshing this error we can have a lot of memory will be freed. We have same error when custom application deployed without disposing object. In that case we need to reset the IIS. By resetting the IIS We can save the list data without error.

Refernce: msdn

Monday, July 14, 2014

SharePoint error: This service instance 'Microsoft SharePoint Foundation Usage' cannot be provisioned on server 'WFE1' because it is mapped to server 'WEF2'.


While working with Configure web analytics and health data collection
,got an error saying that “This service instance 'Microsoft SharePoint Foundation Usage' cannot be provisioned on server 'WFE1' because it is mapped to server 'WEF2'.




ULS Logs : Microsoft.SharePoint.SPException: This service instance 'Microsoft SharePoint Foundation Usage' cannot be provisioned on server 'WFE1' because it is mapped to server 'WFE2"

Troubleshooting steps:
1) Stop All web analytical Services in all servers
2) Went to Manage Services on the Server, switched the view to WFE1 and WFE2, noticed the services were Stopped. I started them so now they are running on all server in Farm  but no luck
3)     Next actions would be  Deleted both services (Usage and Health Data Collection Service  and Web Analytics Service Application) and recreated.
4) Started services again but no results
 5) After long research and found another way to achieve this issue.
6) Stop web analytics service in all Servers using services.msc
7) Restarted the service again
8) Checked all Sharepoint services are running or not on a farm using stsadm -o enumservices
9) Observed Microsoft.SharePoint.Administration.SPUsageService Provision service was disabled in one of the WFE server()
10) Start service using  below command
11) stsadm -o provisionservice -action start -servicetype Microsoft.SharePoint.Administration.SPUsageService
12) Again stop all services in both services as well application server
13) Recreate services (Web Analytics Service Application) and configured
14) After that ,Configured events in usage and health data collection
15) Started Web Analytics Web Service  services in all the servers using  CA .
16) After that web analytics reports has been working in all prod Sites.
 


 







Thursday, June 5, 2014

Hiding 'Top Visitors' Web Analytics report from users in SharePoint 2010




Addd  the Java script below the tag line in report page under layout 

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\WebAnalytics\reports.aspx

  asp:Content ID="Content1" runat="server" ContentPlaceHolderID="PlaceHolderLeftNavBar" 



</SharePoint:VersionedPlaceHolder>

      <script type="text/javascript">
if (window.location.href.indexOf("/_layouts/WebAnalytics/Report.aspx?t=TopVisitorsReport") != -1)
{
alert ("This function is not allowed");

url = window.location.href;
url = url.replace(/TopVisitorsReport/g, "SummaryReport");

window.location.href = url;
}

        var cc = document.getElementsByTagName("a");

        for (var i = 0; i < cc.length; i++)
{
        var link = cc[i];


  if (link.href.indexOf("/_layouts/WebAnalytics/Report.aspx?t=TopVisitorsReport") != -1)
           //link.parentNode.style.display = "none";
                    link.parentNode.removeChild(link);
               
        }
     </script>

</asp:Content>

Saturday, February 22, 2014

Recover a Deleted Site Collection in SharePoint 2010 SP1 and above


Unfortunately, there is no user interface for restoring deleted site collections. Managing deleted site collections requires using PowerShell. SharePoint 2010 introduces 3 new PowerShell CmdLets for managing the Recycle Bin for site collections.
When users delete a site, they are presented with the following page:
image
As you can see from the message, the entire site including its contents, permissions are sent to recycle bin.
When you click Delete, you are prompted with another message box, which may be confusing:
image
Even though it says the site will be deleted permanently, it is not.
Hit OK.
If you are a PowerShell user, you can use the Remove-SPWeb cmdlet to delete the web instead of the UI. Just use the –Recycle parameter:
Remove-SPWeb http://site -Recycle
After the site is deleted, it will be available in the top-level site’s recycle bin to restore:
image
 
The easiest way to get a list of all the deleted site collections is to just call Get-SPDeleteSite without any parameters. In the following example, for brevity, I have formatted the output as a table and filtered the columns displayed. In the second sample, I have added a wildcard filter to the command that can be used to easily filter sites based on relative paths.

 
Once you have identified the site you want to restore, you call the Restore-SPDeletedSite. To restore one or more sites, it is easiest to just pipe the results from Get-SPDeletedSite. By default, the command will ask you to confirm the restore. To eliminate the confirmation, just add "Confirm:$true" to the end of the command.
 
 
 

Error: The report server installation is not initialized in SharePoint 2010 farm

Interesting problem whilst configuring SQL Server Reporting Services (SSRS) integration on the web front end in a new SharePoint 2010 farm
I’m using SharePoint Server 2010 fundation with Service Pack 2 and the Augest 13 CU applied. SQL Server 2008 R2 is the DB latest version. Using the Reporting Services Configuration Manager I’d configured Reporting Services on the server to point to the Reporting Services DB on the back-end database server and created the relevant virtual directories on the server. For the time being the service account is being used for the Reporting Services integration.
Next I’ve gone to Central Admin –> General Application Settings and selected Reporting Services Integration and successfully completed the configuration as you can see from the picture below.
The next step is usually to return to the General Application Settings page and select Set server defaults under Reporting Services but as soon as I did this I received the following error…
 
Resolution :
The tip was to return to Reporting Services Configuration Manager and click on Encryption Keys in the left menu and then delete the encrypted content.
 
and when I returned to the General Application Settings page and ran Set server defaults it now worked as expected and allowed me to maintain the default settings for Reporting Services

SharePoint 2010 Foundation + SQL Server Reporting Services Integrated mode installation issues

When trying to configure the SQL Reporting Services Add-in for SharePoint 2010 from Central Admin you might see the following error: