Saturday, June 24, 2017

SharePoint Storage and Recycle Bin - Revisit

The Recycle Bin is a location where deleted files or folders are temporarily stored ,this feature is available in every version of Microsoft Window OS.

When you purposely or unknowingly you  delete the file or folder, it will be sent to recycle bin. You can restore it later to where it was actually stored earlier.

But reminder, if you choose to delete the file through DOS command or Shift +Delete, then you cannot retrieve it .

Its a different story on recovering the file from your disk through third party software.

The same analog available on the Microsoft SharePoint too. When the user collaborating with each users, there could be a chance to create the version of the document and finally check in the major version.

This approach considerably occupies the storage space available or allocated to the Site collection.

In SharePoint, when you upload any documents or creating the page, it will be stored in the SQL table as Binary format. There will not be physical location on the SharePoint server.

you can modify the site quota by going into your SharePoint Central Administration page.

Click on Application Management link from the left hand side menu. On the Application Management Page, Click "Configure quotas and lock" on the page , select the site collection in which you want to allocate more storage.

By default "No quota" template will be applied to the site collection, that means unlimited storage available.

You can also create the "Storage quota" template by clicking the "Specify quota template".

 That will help you to manage the storage quota and send the email warning to use when the site collection reaches the specified storage.

Here I have created my own quota template, Central Admin->application Management->Site Collections->specify quota template.

I have set the 25 MB size and name the quota template. By default SharePoint 2013 team site template occupies 1.94 MB , So I can use only 23.06MB and uploaded the documents more than 15.3MB and SharePoint does not save the document that exceeds the quota template size.

Your changes could not be save because this SharePoint website has exceeded the storage quota limit, you must save your work to another location.Contact your administrator to change the quota template for the website.

SharePoint Recycle Bin always connected with your Storage quota and keep on monitoring the size of your site collection.

If any user delete the document sized 2 MB, It will go to the first stage recycle bin and storage will never gets decreased.

You can determine the SharePoint site collection's storage through this code snippet
using (SPSite site = new SPSite(SPContext.Current.Site.Url))
         Decimal SiteSize = new Decimal((site.Usage.Storage / 1024f) / 1000);
         Response.Write(SiteSize.ToString() +"MB");

Another way of finding the site collection's size will be using SharePoint Designer.
Open the site collection through SharePoint Designer on the Site's Dashboard page, you can see the site the "Total storage used" underneath "Site Information".

Earlier my site collection was .2.51 MB and then added 3.13 MB sized video file to SharePoint and checked and now site collection became 5.64 MB fat.

When your site collection administrator delete the document from second stage storage will be freeze.

To manage the storage on your site collection , you can do some capacity plan and set it at your "Web application".

It precisely, help you to control, how long your deleted items can be stayed in the first stage and second stage recycle bin. To do this, Go to Central Administration->Select your webapplication-> General Settings, Under Recycle bin change these values as per your  storage capacity plan.

This process will be managed and governed by the timer job called "Recycle Bin" You can find it under "Monitoring-> Timer Job - > Review Job Definition.

Monday, June 12, 2017

How to resolve the SharePoint 2013 Update error

One this, weekend when I am trying to open the SharePoint my local server at my home , this unusual error message popped up,

I would suggest you not to panic at this point, please follow the steps I have followed to resolve this error.

Usually this happen because of windows or SharePoint update interruption while installing the patches on your SharePoint server.

Derived method 'Requires WebPartClientScript' in type 'Microsoft.SharePoint.Taxonomy.TermProperty' from assembly 'Microsoft.SharePoint.Taxonomy version=, Culture=neutral, PublickKeyToken=71e9bcs111e9429c' cannot reduce access

As usual I have checked the below points,

  1. In IIS Manager, all application pools and sites are up and running
  2. On Service console, I have checked the SharePoint and SQL related services are up and running.

In my case all of the stopped and stuck.

To resolve this problem, I tried to ran the SharePoint Configuration Wizard , exactly on second step , It failed and given me the suggestion to look into the log file.

Honestly , I did not get anything from the log file to narrow down this problem.

But I recollect my previous activities on this server , Late night I was trying to update the Windows 2008 R2 SP through windows updates and it failed.

Now I have checked the Installed updates for the SharePoint 2013 on Control Panel\Programs\Programs and Features and then click the link "View Installed Updates" on the right hand side.

It shows all my SharePoint related upgrades are failed.

Now I clicked the each individual item and it gives the me the Knowledge Base with code and downloadable link. This time I have ensured all the updates are installed on my server.

This time,My server started to working correctly.

Wednesday, April 19, 2017

Office UI Fabric for SharePoint and O365

Microsoft Introduce the new official UI framework for SharePoint and Office 365 Development called "Office UI Fabric"

Saturday, April 15, 2017

SharePoint 2013 Workflow Troubleshooting

Features of SharePoint 2013 workflows Troubleshooting.

SharePoint 2013 workflows are powered by Windows Workflow Foundation V4. Its built on the WCF Messaging functionality.

Now SharePoint workflow transform itself from process to platform.

Means WCF can communicate within machine and network level using TCP/IP and capable of communicating outside of your network using Web service call using http/https.

Windows Workflow Foundation 4 workflows are a structured collection of workflow "activities" that creates the relationship to SharePoint as "action".

To start the workflow development activities, you need to install the Workflow Manager.
This will be installed on out of your SharePoint Server. This is the new feature introduced in SharePoint for isolating the workflow process and Scaling the Workflow services for SharePoint.

You can also use the SharePoint 2010 workflow activities for backward compatibility purpose only. If you are creating the new workflow from the scratch then you should choose the "SharePoint 2013 as platform type".

To install and Configure the workflow for  SharePoint, please follow up this link

I managed to install and configure it, but still I am not able to see the "SharePoint 2013 workflow" on the platform type in SharePoint Designer. It shows the below error.

"The Option for the SharePoint 2013 workflow platform is not available because
the workflow service is not configured on the server.
Please contact your server administrator."

First you need to ensure the "Workflow Service application proxy" has been associated with your Web Application in central administration page as shown in this image.

To resolve this problem,you need to register the workflow service to your site.

Register-SPWorkflowService -SPSite 'http://win-236tjq4buqi' -WorkflowHostUri 'https://localhost:12290/'

After this command , I have received the error "The root of the certificate chain is not a trusted root authority"

To resolve this problem, you need install the SSL certificates on the server where Workflow Manager installed and also your SharePoint Server configured to use the SSL.
Please see this MSDN link that helps your how to install the workflow Manager Certificates on the SharePoint 2013

Another troubleshoot , An error says " The underlying connection was closed:An unexpected error occurred on a received with Client Activity Id.

Resolution for this, You have to use the WorkhostUri URL without HTTPS

Finally, I am managed to install and configure the "Workflow Manager" on my server and set to go for exploring the SharePoint 2013 Workflow Development.

For best practices, you should not install the Workflow Manager on the server where the server elevated to AD and SharePoint installed machine.

For development purpose, you can use the workflow without SSL and ignore the above best practices.

After this, I was trying to create the simple workflow that logs the message the workflow history, My workflow started and few minutes it cancelled its self  automatically.

Upon digging the reason for this cancel problem further through fiddler, the workflow attached to the list failing with HTTP 401- Unauthorized despite I am logging in as Administrator and configured the Workflow Manager with the administrator account.

Workflow need to have read and write permission on . To elevate this permission to workflow, you need to activate the site feature called "Workflows can use app permissions"