Sunday, July 02, 2017

serviceHostingEnvironment serviceActivations could not be found



Server Error in / 'WCF application. The type 'WCFNameService.ClassName' provided as the Service attribute value in the ServiceHost directive, or provided in the configuration
element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

And

This simple exception started to nagging me nearly 30 minutes. It error message were so clear and precise, that the name namespace in my service and the class implementation is not available.

I have double checked every thing is fine and my solution also rebuild without error and warning. Still I am not able to access the service end point.

To resolve this problem,

Open your service end point file in markup mode, hitting the F7 key is handy.
Check the Service and Code behind attributes are correctly pointing the namespace and class.

In my case, both are correct, still I am not able to access the service end point (.svc) file with ?wsdl query parameter on my IIS hosted WCF service application.

Solution is very straight forward, you simply need to "Rebuild the Solution" not just project.

Later I have realized, without rebuild the solution, I have started the IIS hosting process on my server.

Skipping this simple step, took my nearly an hour .

Hope it will be useful to someone.


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.

If there is any problem with this timer job, you cannot able to see the correct size and track the all the site storage.

In the next blog, I will give you the brief about "SharePoint 2013 Storage Metrics" and how its useful to track and monitor of the file size and the quota of the file occupied in the site collection.




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=15.0.0.0, 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"