Friday, April 16, 2010

What SharePoint Administrators should know about .NET Framework? (Part 1)

SharePoint is based on .NET technology and having knowledge about some of the .NET features and SharePoint Object Model will help administrators fine tune their troubleshooting and server maintenance capabilities. Previously, if we needed a Content Management System/Online Portal, developers need to develop custom applications from scratch. Now, this required creation of classes and pages from scratch. With .NET advancement, Microsoft included the basic set of functionality within the .NET framework which can be re-used and customized for array of common tasks that developers do while building web application. Let me give an example for the same.

If we need to build a calendar from scratch, we need to do a lot of coding, with .NET in picture and Visual Studio for our help; we already have an inbuilt calendar control which can be used on web pages. This greatly reduced the effort on developing such common tasks. Now, at the core, the idea still remains the same. We have a set of classes in .NET framework that renders the output on the page.
Thus, there is lot more functionality added to .NET framework with version 2.0 and 3.5. With such advances, .NET is greatly being adopted by many software professionals.

Now, that we have a “little” bit of understanding about the .NET framework, let us concentrate on what a SharePoint Admin needs to know about the .NET Framework.

1) Common Language Runtime.
As I have mentioned above, there are classes which are installed when we install the .NET framework. Now, to render the output of the code, files need to be processed. Common Language Runtime is a engine in .NET framework which understands the native Microsoft Intermediate Language (MSIL) and gets us the output. We need to understand that SharePoint is not a product alone and the core functionality comes from .NET framework, its classes and other Microsoft Technologies (NOTE: There are other technologies like IIS, SQL also used to help SharePoint Render the output)

When a web part/page is not rendered and we see an error message. It is good idea to turn on .NET tracing that will let us know what went wrong with SharePoint/.NET or any other component involved in the setup.
If you need detailed information on CLR, please refer to:

2) .NET authorization (Security Mechanism) used in SharePoint.
Authorization is different from authentication. Authentication is something handled by IIS. Authorization means which user has access to which content once they are authenticated by IIS. Thus, a user might be able to access the site, but he may not see the "Site Actions" link (because the user has read/limited access). This security is feature in SharePoint is taken from .NET. Also there has been some extensions done to the .NET code base, but the base classes used stay within the .NET framework. Check out New Security Features of .NET 2.0.
Authentication and Authorization.So, when a user gets access denied, we can check if everything is set up properly in SharePoint users and groups. There are situations, where we get only an "Access Denied" or "Unknown Error" error message and that is quite frustrating. We can take help from .NET here. Check for any .NET related errors in the event viewer and at the same time enable .NET tracing. This will again help in finding the root cause and resolve the issue.

3) Garbage Collection
Garbage collection is done by the CLR. Garbage Collection, is usually a termed used to refer a process of cleaning up system memory (once it is not in the scope for any use). CLR does the garbage collection automatically and there is little control a developer has on this. (Although there are ways to tell the CLR when to do the garbage collection, but that's from a developer stand-point). The concept of Garbage Collection can help administrators find out any issues with memory leaks, high performance usage on the server, etc. If the system is taking time we can look out for any issues with the .NET garbage collector process. This is usually done by doing a dump analysis (DebugDiag Tool). Although a dump analysis might not be easy for a SharePoint Admin, but if we find any .NET related errors, we can engage a .NET specialist to do the dump analysis for us. This will tell us if there is any Object that is not getting freed from the memory and what object is that. It can also help us narrow down any issues with custom code.
Garbage Collection (.NET)


  1. SharePoint Development can also be described as an integrated platform which can be used to spread and discuss any kind of information.

  2. More functional added to .NET framework in which with version 2.0 and 3.5. With such advances, many software development professionals are greatly adopting .NET. In addition, in which share point where data transfer with in full security.


You might find these articles useful