Showing posts with label SP2010. Show all posts
Showing posts with label SP2010. Show all posts

04 July, 2013

SharePoint master page css styles not showing for users other than site administrator- SharePoint 2010

Today I face one tricky problem in SharePoint 2010.
When I login through site administrator then CSS which I apply on master page work fine,
But when I login through other users CSS effects are not visible on master page.


Error Message:

SharePoint master page css styles not showing for users other than site administrator.


Problem Description:

        This usually happens when the CSS file or master page is not published or approved yet or it may be Check-In.

  •  After system administrator login, Menu Bar from Master page look like this.





  •  After normal user login, Menu Bar from Master page look like this.
  •  Here CSS is not apply.



Resolution:

To Approve Master page Follow below steps:

1.             Open the SharePoint Designer using System Administrator Account.



2.             From Site Object select Master Page

3.             Select your default Master page. (E.g. V4.master)



4.             On “Site Page Gallery”, see “View” section and that click on “Approve/reject. Items” view.



5.             You will see the view is “Group By” by “Approval Status. (E.g. Draft, Approved) 
        Basically Approval Status is divided into 4 different status like Draft, Pending, Approved,Reject


6.             Then Search your default Master page in Draft section select it and send for Approval.




7.             Refresh your page, your default Master page will shown in Pending status section, Select and Approve it.




8.             Finally default master page get approved by System Administrator,
          means it get publish for all user on site.




Product Applies To:         SharePoint Server 2010
Feel free to revert in-case of any query... 

01 June, 2013

SharePoint site are slow intermittently: SharePoint 2010.

Issue: We have been experiencing intermittent slowness on the SharePoint Farm.

Background: We are getting intermittent partial outage on the SharePoint Farm. We have assigned dedicated set of WFE’s for different set of web applications and all of sudden without any alert or alarming, user started reporting that SharePoint is taking long time to load or its keep on clocking. Lead time for the sites is min 3-5 min.

Troubleshooting:

We have checked if this issue is occurring for an individual user. It was happening for the large number of groups and people and not region specific.

We have checked on the specific server and sites are slow on the web servers as well.

We have checked on the SAAS, SCOM Alerts and Site Scope system from HP, however, no alert was triggered.

No blocking reported on the SQL server.

From server Event logs we only see an error message that “Cannot connect to SQL Server .”

Temporary Resolution: As a temporary resolution we had recycled the app pool on the webserver running that applications and it worked fine. However, I was not sure that there would be a huge service destruction coming in the next coming day.

You know what; this issue started occurring three to four times a day. And recycling app pool was not the correct choice always.

Permanent Resolution: So one day we have decided to involve the SQL Team as we see from the Event Logs that we get an Error message “Cannot connect to SQL ”.

Based on the MS analysis, we saw there were so many page latches on the TEMP DB by running the sys.dm_os_latch_stats and see what type of latches have increased contention and wait types, compared to previous base-line.

MS recommended splitting the 20 GB of Temp DB in smaller chunks. We divided Temp DB in 5 GB in size with 4 Databases on each SQL Server we have in the farm.

KB Article which support this resolution: http://support.microsoft.com/kb/307487.

Reference:

Diagnosing and Resolving Latch Contention on SQL Server: http://www.microsoft.com/en-in/download/details.aspx?id=26665


If you have any queries/questions regarding the above mentioned information then please let me know.

I would be more than happy to help you as well as resolves your issues, thank you.

Applies to:  SharePoint Foundation Server 2010, SharePoint 2010, SQL Server 2005 and SQL Server 2008.

27 May, 2013

Issues with SharePoint Audit Logs Reports after migration from SharePoint 2007 to SharePoint 2010.

Problem Description: While saving an audit logs to a library user is getting “An Unexpected error has occurred” following a correlation.


Error Message: An unexpected Error has occurred.



Troubleshooting:

We have checked this Audit logs settings and it was enabled.

We have run all the reports one by one and all of them were having problem.

There is only site which was having issue.

Based on the correlation ID in the error message, Checked the ULS logs from the server and found the below logs.


Resolution:

Tried Goggling on the same issue with the keyword: System.InvalidCastException: Specified cast is not valid. at Microsoft.Office.RecordsManagement.Reporting.ReportData.GenerateNextReport().

Found only one reference which talks about the resolution: 


Resolution Steps:

Go to Site Actions.

Choose to select Site Settings.

Under Site collection administration tab.

Choose to select Site collections features.

Look for Reporting feature. (It should be activated by default).


Click Deactivate and a warning message would appear, Select Deactivate this feature.

You will be taken to the site collection administration Feature list. Choose to click Activate. 


And now try to run the Audit Logs Report and now you should be able to save the reports to desired library.

Note: You should have the site collection rights to perform the above given steps.

If you have any queries/questions regarding the above mentioned information then please let me know.

I would be more than happy to help you as well as resolves your issues, thank you.

Applies to: SharePoint Foundation Server 2010, SharePoint 2010.

15 May, 2013

Create Site Collections, Subsites, Custom List by using PowerShell- SharePoint 2010


Creating of subsites, site collections, custom lists, and document libraries can be easily created by using GUI (i.e. Graphical User Interface) – very easy-correct? But let me tell you guys that all this activities are easier if you do it by using PowerShell. That’s why I am sharing the same so that you can use the following things in day to day activities.



What we are going to check in this article?
-Creation of site collections
-Creation of subsites
-Creation of custom list’s

HOW TO CREATE A SUBSITE IN SHAREPOINT 2010 BY USING POWERSHELL?

New-SPWeb –url<new site url> -name <new site name> -template <template name>

SUBSITE CREATION ALONG WITH SOME ADDITIONAL PARAMETERS:

New-SPWeb –url http://sharepoint2010/sites/MOSS2010/SUB2010 -name "All about SUBSITES" -template STS#0 –AddToTopNav –UniquePermissions –UseParentTopNav

HOW TO CREATE SITE COLLECTION IN SHAREPOINT 2010 USING POWERSHELL?

$siteURL = “http://sharepoint2010/sites/MOSS2010;

$owner = “moss2010/SPAdministrator1”

$secondOwner = “moss2010/SPAdministrator2”

$template = “STS#0″

$description = “PowerShell created Site Collection”

New-SPSite $siteURL -OwnerAlias $owner -SecondaryOwnerAlias $secondOwner -name “PowerShell for SharePoint” -Template $template -Description $description

HOW TO CREATE A CUSTOM LIST IN SHAREPOINT 2010 BY USING POWERSHELL?

$SPAssignment = Start-SPAssignment

$SPWeb = Get-SPWeb http://siteURL -AssignmentCollection $spAssignment

$SPWeb.ListTemplates | Select Name, Description

$SPTemplate = $SPWeb.ListTemplates["Custom List"]

$SPWeb.Lists.Add("List Title","Description",$SPTemplate)

If you have any queries/questions regarding the above mentioned information then please let me know, Thank you.

12 May, 2013

Deletion of Subsite, Site Collection, Document Library, SharePoint List- SharePoint 2010

Most commonly used entities in SharePoint are Subsite, site collection, list and libraries. 

GUI mode will be the easiest mode to do any functional activities associated with them. In this article, i am more concentrating on the PowerShell mode because its very easy and efficient way to clean the activity directly from the database. 

Let's try to explore some deletion functionalities by means of PowerShell.

How to delete a site collection by using PowerShell?
Remove-SPSite [-Identity] <SPSitePipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-DeleteADAccounts <SwitchParameter>] [-GradualDelete <SwitchParameter>] [-WhatIf [<SwitchParameter>]]

Example: Remove-SPSite -Identity http://SharePoint2010/sites/test2010

Where:
SharePoint2010: web application URL.
Sites: wildcard entry.
test2010: site collection that you want to delete.

Note: The above will completely deletes an existing site collection and all subsites. This operation cannot be undone.

How to delete a Subsite by using PowerShell?
Remove-SPWeb [-Identity] <SPWebPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-Recycle <SwitchParameter>] [-WhatIf [<SwitchParameter>]]

Example: Remove-SPWeb -Identity http://SharePoint2010/sites/test2010/subtest2010

Where:
SharePoint2010: web application URL.
Sites: wildcard entry.
test2010: site collection
subtest2010: Subsite that you want to delete.

If you want to delete multiple subsites in a single shot from a site collection then please refer the following site: http://get-spscripts.com/2010/10/delete-sharepoint-sub-sites-using.html

How to delete a Document Library by using PowerShell?
Please refer the following code by which you can delete a document library without any issues...

$web = Get-SPWeb urlofweb
$library = $web.lists["listname"]
$library.Delete()

How to delete a SharePoint List by using PowerShell?
Get-SPWeb “site collection link” | % {$_.Lists.Delete([System.Guid]$_.Lists["name of list"].ID)}

The above command will delete the mentioned list without any issues...

If you have any queries/questions regarding the above mentioned information then please let me know, Thank you. I would be more than happy to help you as well as resolves your issues...

03 May, 2013

Content databases contain orphaned items

Problem Description:
The SharePoint Health Analyzer detected an error.  Content databases contain orphaned items.

In some situations, a content database that is used by Microsoft SharePoint Foundation may become corrupted. The corrupted database may contain orphaned items. For example, a document may not have a parent document library or a list may not have a parent Microsoft SharePoint Foundation Web site.  Consequently, you may be unable to create new items with the same URL as the orphaned items, and space in the content database will be consumed unnecessarily.

Error Message:
Content databases contain orphaned items

Resolution:
Perfect article provided by Microsoft on this which helps me to resolve this issue:
http://technet.microsoft.com/en-in/library/ff805076(v=office.14).aspx

Product Applies To:
SharePoint Server 2010.
SharePoint Foundation 2010.

30 April, 2013

A positional parameter cannot be found that accepts argument SharePoint 2010

Problem Description:
Let me tell you that you will face this error while executing PowerShell commands. I have experienced the same while executing ‘add solution’ command.

Error Message:
A positional parameter cannot be found that accepts argument

You might laugh when I will tell you the resolutions in reference to the above as it’s so simple.

Resolution:
-Check the literal path that you have provided, most probably that’s the only reason when this command throws an exception.

Make sure that you providing the path in double quotation marks. That’s it.

Please amend the changes and you will successfully execute the command that you are working on.

In case of any queries/questions then please let me know, Thank you.

26 April, 2013

The local farm is not accessible

Problem Description:
I have my SharePoint development environment and recently install some security updates of Windows Server 2008 R2. When I try to run SharePoint Shell Command i get the error: "The local farm is not accessible.

Error Message:
The local farm is not accessible

I was shocked to see this message and started checking the farm – web applications, site collections, SQL server is accessible or not …so many things...But let me tell you this is a generic error message and nothing to do with the farm availability.

Reason:  This is happening because you tried running the PowerShell with a user account that is not an administrator in SharePoint.

Resolution:  use your farm account by which you have installed SharePoint.

How to change and use the farm account?
-start
-All Programs
-Microsoft SharePoint 2010 Products
-Shift+Right click on SharePoint 2010 Management PowerShell
-You will get the option named as “Run as different user”
-enter the credentials and you are good to go :)

If you have any queries/questions regarding the above mentioned information then please let me know.

24 April, 2013

Kerberos configuration known issues (SharePoint Server 2010)

Kerberos authentication and non-default ports

There is a known issue where some Kerberos clients (.NET Framework, Internet Explorer 7 and 8 included) do not correctly form service principal names when attempting to authenticate with Kerberos enabled web applications that are configured on non-default ports (ports other than 80 and 443). The root of the problem is the client does not properly form the SPN in the TGS request by specifying it without the port number (as seen in the Sname of the TGS request).
Example:
If the web application is running at http://intranet.contoso.com:1234, the client will request a ticket for a service with a SPN equal to http/intranet.contoso.com instead of http/intranet.contoso.com:1234.
Details regarding the issue can be found in the following articles:
To work around this issue, register SPNs with and without port number. Example:
  • http://intranet.contoso.com:12345
  • http/intranet
  • http/intranet.contoso.com
  • http/intranet:12345
  • http/intranet.contoso.com:12345
We recommend that you register the non-default port to ensure that if the issue is resolved in some future service pack or hot fix, the applications using the workaround will still continue to function.
Note that this workaround will not work if the following conditions are true:
  • There is more than one web application running on a non-default port
  • The web applications either bind to the host name of the server or bind to the same host header (on different ports)
  • The web application IIS application pools use different service accounts
  • http://server.contoso.com:5000 AppPool Id: contoso\svcA
  • http://server.contoso.com:5001 AppPool Id: contoso\svcB
If these conditions are true, following the recommendation in this workaround will yield duplicate SPNs registered to different service accounts which will break Kerberos authentication.
If you have multiple web sites sharing a common host name running on multiple ports, and you use different IIS application pool identities for the web applications, then you cannot use Kerberos authentication on all web sites. (One application can use Kerberos, the rest will require another authentication protocol.) To use Kerberos on all applications in this scenario, you would need to either:
  1. Run all web applications under 1 shared service account
  2. Run each site with its own host header


    Reference : http://technet.microsoft.com/en-us/library/gg502606%28v=office.14%29.aspx

SharePoint 2010 - Browser Compatibility

This article explains known limitations of some browsers with SharePoint 2010.

For most interactions with SharePoint an internet browser is required and the choice of browser will affect the experience. Most functionality is available in all browsers, however there are exceptions where certain features require Active X technology which is only available in Internet Explorer and means that some of SharePoint's functionality is lost when using non-IE browsers.

Browser support for SharePoint Server 2010 can be divided into three different levels, as follows:
  • Supported - A supported Web browser is a Web browser that is supported to work with SharePoint Server 2010, and all features and functionality work.
  • Supported with known limitations - These are non-Internet Explorer browsers such as FireFox, Safari and Chrome. They are supported for use with SharePoint but some functionality is missing in these browsers such as opening documents directly in Office applications (although viewing and editing office documents within the browser is fully supported, as is downloading and editing). Documentation on how to resolve these issues is readily available from Microsoft.
  • Not tested - A Web browser that is not tested means that its compatibility with SharePoint Server 2010 is untested, and there may be issues with using the particular Web browser. SharePoint Server 2010 works best with up-to-date, standards-based Web browsers.



Thanks Brent for sharing this

URL path length restrictions in SharePoint 2010

There must always be a series of questions –

Is there any solution for URL maximum length restriction?

I am unable to create consecutive subfolders due to URL length exceeding 260 characters
Is there any proper fix to solve this issue?

Can I increase maximum allowed URL length that SharePoint can work with?

How exactly does that affect opening a nested-folder-document in say Word or Excel?

Is the limit also there for the explorer view? 255 chars isn't a whole lot for a directory and filename structure, so if it also affects the explorer view; is there a way around it?

Reason is pretty much simple: SharePoint limits URL length because all relative URL links are stored in the clear forms on the SharePoint content DB and often this links are used as primary keys to link one table with another. Fields which are used to store these links (for instance tp_DirName from the AllUserData table) allow storing only 256 characters.


If you have any questions/queries regarding the mentioned information then please let me know, Thank you.