14 December, 2013

Error while executing web part


Nowadays pretty much busy in SP2013 assignments and didn’t get a time to publish any article but today I would like to share some useful information about data view webpart.

Before I start writing about the problem description and its resolution, please refer the following links that will give you some insight about data view webpart-



Problem description-
Recently I was working on user ticket in which we have restored one site collection from development environment to production one.  This site has been heavily customized using SharePoint designer. Restore was successful and but while opening the home page of the site, it throws an exception as follows

Error message-
Error while executing web part: Microsoft.SharePoint.WebPartPages.WebPartPageUserException: Personalization has been disabled for this zone.

Let me tell you that this issue was very inconsistent as sometimes it works and sometimes throws the above mentioned error message. It’s been happening with a limited set of users so we checked their permissions; we checked their multiple domains existence etc. but didn’t find any root cause behind the same.

Then we started debugging into SharePoint logs and found the following-

"Error while executing web part: Microsoft.SharePoint.WebPartPages.WebPartPageUserException: Personalization has been disabled for this zone.     at Microsoft.SharePoint.WebPartPages.SPWebPartManager.ThrowIfCantModifyZone(String zoneID, Boolean throwIfLocked)     at Microsoft.SharePoint.WebPartPages.SPWebPartManager.ProcessZoneId(WebPart webPart, Boolean throwIfLocked)     at Microsoft.SharePoint.WebPartPages.SPWebPartManager.SaveChangesInternal(SPLayoutProperties layoutProperties, Boolean skipRightsCheck, Boolean skipSafeAgainstScriptCheck)     at Microsoft.SharePoint.WebPartPages.BaseXsltListWebPart.get_CustomizedXsl()     at Microsoft.SharePoint.WebPartPages.BaseXsltListWebPart.LoadXslCompiledTransform(WSSXmlUrlResolver someXmlResolver)     at Microsoft.SharePoint.WebPartPages.DataFormWe... 97832cag-2721-30a3-8231-7e19h27162g5

From the above error message, we have started investigating the personalization section of the webpart and finally we got it!

Here is the one Resolution:-

To resolve this issue, set the value of the AllowPersonalization attribute to "true" in all Web Parts of the Default.aspx page that has the custom portal site definitions. To do this, follow these steps:

Open the Default.aspx page of the site definition from an editing program.

1- For example, you may find the Default.aspx page in the following location:
C:\Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\1033\Custom Site Definition Folder

2- Locate the following tag in the Default.aspx file:
<WebPartPages:WebPartZone … />

3- Set the value of the AllowPersonalization attribute to "true" as in the following example:
<WebPartPages:WebPartZone AllowPersonalization="true" …/>

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.

12 December, 2013

December 2013 Cumulative Update Packages

December 2013 Cumulative Update Packages for SharePoint Foundation 2010, SharePoint Server 2010 and Project Server 2010 have been released. 

Use the following links to download the update packages:

December 2013 CU for SharePoint Foundation 2010 - KB 2849990 http://support.microsoft.com/kb/2849990


December 2013 CU for SharePoint Server 2010 - KB 2849971 http://support.microsoft.com/kb/2849971

December 2013 CU for Project Server 2010 - KB 2849972 http://support.microsoft.com/kb/2849972

Note - the March 2013 Public Update becomes the new baseline for all subsequent Updates and Service Packs.
 
Any known issues-Please update here!

25 November, 2013

Restore site collection within the same farm

We are aware that requirement can be of any form, it might be logically possible or not but when the requirements arises then clock start ticking and task assignment counter starts! :)

One of our users requested such kind of strange request that he wanted the backup of one of the web application to get restored in the same farm with different web application, I tried my level best to convince him that I can get this one restored in development/stage and not understanding the logic of same replica within same farm! But he seems to get this one done so I tried my research and started taking the backup by SQL console.

Backup completed successfully and now the turn of restore – keeping my fingers crossed! Let me tell you guys- you might have done so many backup-restorations across multiple farms but this seems to be unique.
Why unique? – Because you are restoring that backup within the same farm.

As soon as I hit the restore command-BOOM :) it got failed!

Resolution:-

As per this reference- It is not possible to create a duplicate site collection using Content Database backup method. This is because when you restore the content database backup on another empty database the site collection ID remains the same.

Because of this, even if you add the new restored content database both the content databases will have the same site collection ID and that is the reason why the central admin shows only one site collection.

Pretty straight forward to understand and the only possible way to accomplish this requirement are either by PowerShell or by stsadm.

Step –by- details:-
1)   Create a web application by the generic way either by central administration or by PowerShell
2)   By this way – a new database will be created which has an altogether different ID
3)   Take the backup of the main web application that you want to restore on new one by using PowerShell command- Backup-SPSite -Identity “http://amolsharepointgalaxy.com” -Path "E:\Backup\galaxy.bak"
4)   Restore the backup on to the web application that you have created in the step#1
5)   That’s it- you are done.

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

23 November, 2013

solution deployment stuck on deploying


Solution deployment is the task that we do on daily basis. This is the task in which SharePoint developer and administrator works in proper co-ordination.

Problem description-
I was deploying the solution in our production environment and faced some strange issue. When I add a solution using PowerShell command its says operation completed successful.
Add-SPSolution –LiteralPath "<file_path>\name of the wsp” is stored"

So the next stage is install solution, I executed the following command
Install-SPSolution -Identity "name of the solution.wsp" -WebApplication http://sharepointplanet.galaxy.com –GACDeployment

I checked the statuses of the solution in central administration->system settings->manage farm solutions and the status never changes from deploying.

By means of this article, I will try to share the resolution worked for me and possible recommendations you can try to resolve this issue completely.

Resolution worked for me-
It turned out that one of our servers on which we have stopped the timer service + World Wide Web publishing service due to patches incompatibility and it was waiting on this server to complete.  If you have more than one server in your farm ensure that the SharePoint TIMER services are running on all.

How you can check the above-
1.   On any server->start->run->services.msc->enter->this will open the services console.

2.   Now type s-> this will give you all the services that start with S->look for SharePoint timer service and make sure it’s in started mode.

3.   This service should be started on all the front ends as well as application server.

Possible Resolutions-
1.   Make sure SharePoint timer service should be started on all the servers (web front ends as well as app server)
2.   Try restarting the SharePoint Administration service on all the servers.
3.   Restart all the SharePoint servers
4.   Make sure that all the servers in farm are on the same time zone.
5.   Execute stsadm -o execadmsvcjobs on all the servers of the farm
6.   Cancel the deployment job by means of central administration, remove the solution and try to add the solution again & check the results.
7.   Check the status of the jobs by means of CA-timer job status or use te following command - stsadm -o enumdeployments   - This will give you the list of all the pending & active deployments.

After trying all the steps, nothing works then please checks the logs and find out the root cause.

In case of any problems with respect to logs then please share here so that I can help you out!

I hope the above information will be helpful to deploy the solution successfully. Thank you.

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

Product applies to-
1)   SharePoint Server 2010
2)   SharePoint Foundation 2010
3)   SharePoint Server 2013
4)   SharePoint Foundation 2013

20 November, 2013

Code blocks are not allowed in this file + Performance Point

What is performance point service (PPS)?
PerformancePoint Services is a performance management service that you can use to monitor and analyze your business. By providing flexible, easy-to-use tools for building dashboards, scorecards, reports, and key performance indicators (KPIs), PerformancePoint Services can help everyone across an organization make informed business decisions that align with companywide objectives and strategy.

Functionality: Scorecards, dashboards, and KPIs help drive accountability. Integrated analytics help employees move quickly from monitoring information to analyzing it and, when appropriate, sharing it throughout the organization.

One of our users raised a ticket by mentioning “facing problem while using performance point service w.r.t. BI dashboards. Further probing reflected the fact that he was using site with BI template with PPS activated features.

So far so good but while opening the site i.e. PPSSample.aspx, he was getting the following error message-

An error occurred during the processing of /PerformancePoint/Pages/ppssample.aspx. Code blocks are not allowed in this file.

Further checks provided more details that ppssample.aspx page is by-default one and not a customized. You will find this under every web application’s site collection. Previously I thought it might be web application specific but I was able to reproduce it across all web apps so it’s a farm wide issue.

One thing we need to understand that there is nothing wrong in your activated features or enabled performance point functionality. Also, not all the users use PPS functionality so you need to take the decision very carefully w.r.t. following troubleshooting.

Resolution:

(neat and simple)- 2 step resolution:
Placed this in the web.config file of the web application within the <PageParserPath> header.

1)   <PageParserPath VirtualPath="/BI/Pages/ppssample.aspx" CompilationMode="Always" AllowServerSideScript="true" />

2)   IISRESET

That’s it- Your issue will be resolved.

Note: I mentioned about decision (refer the underlined keyword) - here is the fact- Thanks to Justin Kobel’s article  who have stated- “the page parser solution both open up a huge security hole within the page (allowing server side code to be authored within SPD and executed within your page), as well as causing issues in a farm scenario (trying to keep all of your web.config’s in sync, causing recovery issues, etc.)

So the alternate solution which is little bit tricky and need SPD.
Here are the references:


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.

Product applies to-
-SharePoint Server 2010
-SharePoint Foundation 2010
-SharePoint Server 2013
-SharePoint Foundation 2013

19 November, 2013

Error communicating with Excel Services Application - Event ids 5231 5239 5240

SharePoint monitoring is very necessary and should be done on regular basis as it will give complete idea about any exceptions/errors/if any services are not running/if any servers are not responding etc. so while monitoring the servers, I came these following errors in the event viewer-

Event 5239 (Excel Services Application) of severity 'Error' occurred 10 more time(s) and was suppressed in the event log

Event 5231 (Excel Services Application) of severity 'Error' occurred 10 more time(s) and was suppressed in the event log

To verify this, I tried opening excel dashboards on each servers (WFE’s) to find out which server is the culprit. Before doing this, make sure that excel service application is in started mode as well as app pool is running.

Coming back to dashboard point, you will find the culprit server. Just restart that specific server and check the results. In my case, it fixed the issue and reference is as below:

The above article will be indeed helpful in many scenarios as-
1.   Delayed load times for workbooks.
2.   Workbooks fail to load.
3.   This event appears in the event log: Event ID: 5231 Description: Unable to reach Excel Calculation Server <URL of machine> [Session: <session ID> User: <username>]

Possible resolutions-
1)   Restart excel calculations services
2)   Recycle app pool
3)   Make sure that the account you are using for excel calculation service is working properly i.e. not locked!
4)   Reboot the server

I hope the above info is helpful and will give some directions to resolve the issue.

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

Unable to save site as template + unexpected error has occurred

Here we go, it’s been a long time I didn’t publish an article which consist of hardcore troubleshooting! Yes, you are correct. It took some time to resolve but finally the issue has been resolved. This time it’s regarding problem occurring while ‘save site as template’ and how we found the culprit.

Problem description:-
User has raised the problem ticket by mentioning “facing problem while saving the site as template”, additionally the templates are getting saved in the solution gallery but not able to activate it also.

Error message:-
An unexpected error has occurred.

Troubleshoot issues with Microsoft SharePoint Foundation.

Correlation ID: acd95f50-4049-4625-9682-aa93aded118f

Troubleshooting done:-
Further debugging in the SP ULS logs and we found some strange facts which are based on event receivers- please refer below-

SPSolutionExporter: Microsoft.SharePoint.SPException: Feature definition with Id 77658379-50ff-4e1e-a431-5652bee07a87 failed validation

Looking for 'ReceiverAssembly' attribute in manifest root node for solution

Looking for 'ReceiverClass' attribute in manifest root node for solution

The 'Format' attribute is invalid - The value 'CheckBoxes' is invalid according to its datatype

I debug further to find out where the problem is-

I downloaded the saved wsp's from  /_catalogs/solutions/Forms/AllItems.aspx to my desktop

Renamed it to .cab

Extracted all the contents and found some interesting facts along with manifest.xml file like-

1.      List Instances
2.      Modules
3.      Property bags
4.      web template

Inside List Instances, I found ElementsFields.xml

Once i opened the above xml file, search for the checkboxes and found the following-

Further exploration on this, it seems that the checkbox attribute is invalid and needs to be modified.

Resolution:-
After this one, the solution is pretty much simple, just go ahead and remove that affected column / remove the affected content type – does not require IISRESET also.

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 issue, Thank you.

13 November, 2013

Item level permissions in SharePoint: User should add/edit/read only their own items- SharePoint 2010.


A user requested that he need to have a permission configured on the item level where used can see only their own documents or can read all the items in the list.

As a SharePoint admin the though had some to my mind are:

? Simply deny as it’s only possible with Survey list in SharePoint 2007.

? Can have created a custom list but would be a tedious task.

? Can use the target audience feature but that would be with a complex configuration.  

However, as I was exploring the features of SharePoint 2010, I checked configuration on the List settings of SharePoint 2010 Platform and MS has done a great job to extend the feature from Survey list to all types of list in SharePoint 2010.

You can configure Item level permissions in one go.  You can go to List Settings -&gt; Advance Settings and Item- Level Permissions.


You can also use PowerShell Script to manage the item level permissions:

Manage Read Access:

$SharePointSite = Get-SPWeb http://amar.com/
$list = $web.Lists[“Library Name”]
$list.ReadSecurity = 1
$list.Update()
$SharePointSite.Dispose()

Note: 1 = “Read all items”, 2 = “Read items that were created by the user”

Manage Write Access:

$SharePointSite = Get-SPWeb http://amar.com/
$list = $web.Lists[“Library Name”]
$list.WriteSecurity = 1
$list.Update()
$SharePointSite.Dispose()

Note:  1 = “Create and edit All items”, 2 = “Create items and edit items that were created by the user” 4 = “None”

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 Server 2010.

10 November, 2013

SharePoint: "The storage space allocation page cannot be used for sites that do not have a storage quota defined"

Issue: User was getting error message below while accessing the Storage Space Allocation page:

The storage space allocation page cannot be used for sites that do not have a storage quota defined.


Background:

While doing some regular clean-up of the sites which are over quota, I noticed that site is not having the Site Storage Allocation page in the Site collection administration page, which was quite strange though.
Accessing storage page directly via _layouts/storman.aspx page, shoes the above error message.
Troubleshooting:

Checked the same behaviour on the other site as well and it was not the same.
Tried to activate and deactivate the Office Publishing feature. Storage Allocation link was still not appearing. 


Resolution:
Checking the site storage quota we have noticed a much wired thing is that the site was given quota or you can say it was set to be 0 MB with Warning level of 0 MB.
Not sure that was done, seeming like a human error obvious.
Set the correct quota for the site and Site Storage Allocation page was back.

Applies to Products:
 SharePoint 2007, SharePoint 2010, SharePoint Server 2013


Error: The Compressed (zipped) Folder is invalid or corrupted in SharePoint 2007.

Issue: Whenever my client tried to open a .zip files from SharePoint it throws the below error message.

Background: One of my clients had zipped the .excel files in on his local desktop and uploaded to SharePoint site. There files contains the project level information and was needed to extract after two years. When he clicked the file to open from SharePoint had encountered the issue.

Now the task begins of a SharePoint admin.

Troubleshooting:

Tried to open the file from SharePoint site, no go.

Downloaded the file on desktop of the client, no go.

Tried the same steps at my end, no success.

Strange this accessing file on SharePoint server also does give the same error.

With the above basic stuff, it was clear that it is something to deal with the zip file itself as it doesn’t seems to be SharePoint issue anymore.

Being a digger try to dig some more in it and seems like something to deal with the excel documents zipped may be was in protected mode.

Client was having no clue for this.

Resolution: Tried to find the Repair tool on the internet and million thanks to Christina Marley who created a zip file repair utility which when ran has repaired the file and is available for download here.
http://gallery.technet.microsoft.com/The-Compressed-Zipped-d39407b2

Asked the user to download the files and repair them with the utility.

If you feel any difficulty in understanding the tool or have any query I would be happier to help you.

Applied to: SharePoint 2007, WinZip, and WinRAR. Windows XP.

04 November, 2013

The operation that you are attempting to perform cannot be completed successfully

Problem description:
We have received the following error message while creating the site collection underneath one web application.

Error message:
The operation that you are attempting to perform cannot be completed successfully.  No content databases in the web application were available to store your site collection.  The existing content databases may have reached the maximum number of site collections, or be set to read-only, or be offline, or may already contain a copy of this site collection.  Create another content database for the Web application and then try the operation again.


Troubleshooting done:-
If you see the error message then you will experience it is somewhat misleading. How?
See-
1)     Checked the content database is attached or not [By means of Central Administration] - Yes, it’s already there.
2)     Checked the maximum & minimum site collection number and its already max 5000 and min 2000. The actual numbers of site collections are only 50! Strange!
3)     Checked the status of web application – whether its Read Only / content prevented/locked/unlocked [By means of Central Administration]
4)     Checked the status from SQL end and it was fine.

This issue can be resolved in multiple ways-

Resolution:-
1)     Create a new content database and check new site collections are getting created or not.
2)     You can also test this by creating a site collection in a different web application – By this way you are trying to isolate the problem. Whether it’s restricted to single web app/single content database/complete farm.
3)     Check the database status –
                                i.            Central administration
                              ii.            Application management
                            iii.            Manage content databases
                            iv.            Select the appropriate web application from the dropdown
                              v.            Check the status
                            vi.            In my case, it’s showing error

Note: I would like to highlight that the above mentioned ‘error’ status does not make any impact on the existing site collections so nothing to worry about it.

4)     Execute IISRESET and check the results
5)     Check the status from the SQL end and make sure there is no problem with the logs as the database consists of mdf and ldf files, this problem might be occur due log files gets full!

In my case, it’s showing the database status as “Error” so I performed the following steps-
1.      Detach the content database from the web application
2.      IISRESET
3.      Attach the content database back & check the results.

Now site collections can be created without any problems!

Issue resolved! Happy SharePoint…

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.

Reference:


Product applies to:
1)     SharePoint Server 2010
2)     SharePoint Foundation 2010