Development With A Dot

Blog on development in general, and specifically on .NET

Sponsors

News

My Friends

My Links

Permanent Posts

Portuguese Communities

What Makes SharePoint SharePoint

Introduction

SharePoint is ASP.NET, it is well known. Yet, sometimes, it may be difficult to understand why/how some features work, because we don’t usually see them in regular ASP.NET development. However, all of them are build upon standard ASP.NET/IIS functionality, which you can easily duplicate on non-SharePoint environments. Here are some clues.

Pages That Do Not Exist On The Filesystem

Most of your SharePoint content does not exist in the filesystem (the “14 hive”), but instead is stored in a content database. How come, then, are we able to access them through a standard URL? In order to achieve this, SharePoint uses a Virtual Path Provider. This is an interesting and mostly underused mechanism that exists since ASP.NET 2.0, which allows obtaining a file stream dynamically. Typical examples are loading pages from a database or from a compressed file. The provider SharePoint uses is called Microsoft.SharePoint.ApplicationRuntime.SPVirtualPathProvider and it is set by the Microsoft.SharePoint.ApplicationRuntime.SPRequestModule module, which, in turn, is set on the Web.config file.

Common Files On All Sites

All SharePoint sites feature the _layouts, wpresources folders and its pages and web services, however, these do not physically exist for every site, but only on the 14 hive. There’s a call to TransferRequest inside the Microsoft.SharePoint.ApplicationRuntime.SPRequestModule module which internally redirects to the proper location while preserving the browser URL whenever these paths are being accessed.

Event Handlers, Code Blocks On Markup Are Disabled

As you may know, event handler declarations such as OnClick=”…” on markup files (ASPX, ASCX, Master) are prohibited if these files are not located on the 14 hive. Also, the CompilationMode and AutoEventWireup attributes are also not allowed, as are code blocks (<% … %> and <%= … %>). This is caused by applying a custom page parser filter, Microsoft.SharePoint.ApplicationRuntime.SPPageParserFilter, which is registered on the Web.config file, on the pages section.

The owssvr.dll Module

The SharePoint Foundation RPC Protocol allows some interesting functionality on contents such as lists and document libraries, on any site. It is invoked by sending requests to an URL with the format http://[site_name]/_vti_bin/owssvr.dll?Cmd=Method_name[&Parameter1=Value1&Parameter2=Value2...]. This is a native ISAPI global module (meaning, written in C/C++ and leveraging the Win32 API plus the Internet Server API) called SharePoint14Module which is registered on the %WINDIR%\System32\inetsrv\config\applicationHost.config file.

Conclusion

This was just a basic description of some of the features that are less known. As always, your feedback and questions/corrections are greatly appreciated!

Comments

ügyviteli szoftverek said:

Sharepoint is one of the illusory systems: you never know the whole truth.

Be aware and it will your good friend.

- SPS 2k3 developer

# August 28, 2012 8:08 AM

Ricardo Peres said:

Quite true!

:-)

# August 28, 2012 9:12 AM

macaulayrhodes said:

Great Post Simply Describe about Sharepoint.

# August 30, 2012 12:58 AM

Jerry White said:

you have a great blog here! would you like to make some invite posts on my blog?

# September 17, 2012 12:39 AM

Gil Walker said:

Most of your SharePoint content does not exist in the filesystem (the “14 hive”), but instead is stored in a content database.

# December 10, 2012 6:26 AM

Reese Mcconnell said:

In order to achieve this, SharePoint uses a Virtual Path Provider.

# December 11, 2012 3:10 AM