Unable to display this Web Part: Unable to cast object of type ‘System.Reflection.RuntimeMethodInfo’ to type ‘System.Type’


You get the “Unable to display this Web Part.” error message on any modified view.


Tracking down SharePoint Logs for the correlation id contain the following:

Error while executing web part: System.InvalidCastException: Unable to cast object of type ‘System.Reflection.RuntimeMethodInfo’ to type ‘System.Type’.     at Microsoft.Xslt.MethodCollection.MethodDescription.DeclareDynamicMethod(MethodCollection methodColl)     at Microsoft.Xslt.MethodCollection.CreateDynamicMethods()     at Microsoft.Xslt.MethodCollection.GetMethodInfoInternal(Int32 methodNumber)     at Microsoft.Xslt.MethodCollection.GetMethodInfo(Int32 methodNumber)     at Microsoft.Xslt.STransform.GetCompiledTransform()     at Microsoft.SharePoint.WebPartPages.BaseXsltListWebPart.LoadXslCompiledTransform(WSSXmlUrlResolver someXmlResolver)     at Microsoft.SharePoint.WebPartPages.DataFormWebPart.GetXslCompiledTransform()     at Microsoft.SharePoint.WebPartPages.DataFormWebPart.PrepareA…
…ndPerformTransform(Boolean bDeferExecuteTransform)


This seems to be a Microsoft bug and only occurs after occasional app pool resets


IIS Reset


Open the view in SharePoint Designer and Save the view again.

Thanks you Smile

Enjoy SharePointing Open-mouthed smile Open-mouthed smile Open-mouthed smile


The amount of data that was returned by a data connection has exceeded the maximum limit that was configured

If you are using Info Path to develop web forms you might have faced this issue. Follow below steps as described in “Resolution” in order to overcome this issue.

When you try to get data from Data Connection for e.g. web service. You get the following error:
“The amount of data that was returned by a data connection has exceeded the maximum limit that was configured by the server administrator. Form elements, such as drop-down lists may be blank.”


The Default data connection response size if set to 1500kb for Form Services, If the response from the data connection size exceeds the default limit the warning will be shown on screen.


01. Click on General Application Settings in Central Administration
02. Click on Configure InfoPath Forms Services under InfoPath forms Services

03. Change the Response Size in kilobytes (Increase the number).

SharePoint Services Stuck in Starting

This post is about an issue that I had to face today. If you have more than one server in your SharePoint Farm you also might have face the same.

In my case the issue was when I try to start a service on Newly Joined server to the Farm (WFE02) it stuck in Starting State.

Tried using restarting IIS, restart server, run farm configuration wizard, disconnect and reconnect server to the farm still no luck. And thought of using SharePoint Management Shell using Start-SPServiceInstance – Identity <GUID of Service> still its the same. (user Get-SPServiceInstance to get the list of GUID of the service) It says “The service is already started in WFE01” but I was trying to start it in WFE02.

The root cause is both servers are in different time zone. When I set both into same zone whooaa it worked 😀

Hope this will be useful 🙂

Customize SharePoint URL using AAM and DNS

1. Configure DNS

  • Open DNS Manager
  • Navigate to respective forward lookup zone.
  • Create a CNAME record by right clicking  in the zone and selecting “New Alias (CNAME)

Select relative host record of the CNAME.


Once you add the CNAME you can see an entry as below.


  • Update Group Policy

Make sure you run a Group Policy update after adding the record.


  • Check connectivity from CNAME record

And then you can check whether the CNAME is being resolved.  You can monitor that CNAME is being resolved.


2. Configure IIS

If the web application is hosted in port 80 you don’t have to edit the IIS host header as you will be redirected to port 80 when enter the CNAME.

If you are using a different port other that 80 you might have to IIS website.

  • To add an entry right click the web site in IIS manager, then select edit bindings.


  • Add Host name and Port. Note that you should CNAME record and the Host Name should be identical.


3. Add Alternate Access Mapping in SharePoint Central Administration

Central Administration -> Application Management -> Configure Alternate Access Mapping -> Edit Public URLs

Select the web Application, then add the URL to Preferred zone.


Now you can access SharePoint site by entering the Customized URL (CNAME).