Seasoned SharePoint developers can quite easily decipher SharePoint presence behind a Site through browser actions. These days similar kind of practical questions come up in the SharePoint interviews as well. When such questions come out of the blue even a normal developer would stumble upon such questions as the question is a bit trivial in nature.
Let’s see how we can identify SharePoint presence behind the scene, from the browser, by way of quick URL hacks.
We are taking one sample site developed in SharePoint for demo purposes which is Australian Government's Immigration Website . Australian Government have a lot of SharePoint sites as part of their operations, I guess they have realized the potential of SharePoint as a Content Management System.
Option 1: Check the Sites source code
Right click the site home page and within the source itself you can see SharePoint tags.
Within the Meta tags you can see content=“Microsoft SharePoint”. This gets added by default when using the SharePoint master pages. However if the master page has been customized or a .NET master page is being used, this kind of tag would be missing. So let’s continue our investigation within the site.
Option 2: SharePoint specific JS & CSS files
SharePoint inherently relies on a lot of JS functionalities. So if the site is based on SharePoint for obvious reason we can find SharePoint JS file references within the source code. Similarly, SharePoint specific CSS files will also be present.
As you can see above Core15.css is a very common CSS file used within SharePoint. Just below that we can find init.js file. Similarly there would be references to Core.js ,SP.js files which confirms SharePoint presence.
Option 3: Check for SharePoint Hive presence
SharePoint installation creates a hive folder in the file system. Hacking the URL and calling the file from the browser would display the file contents.
_layouts is a very common folder structure which each developer would have visited once in their career. Let’s try calling out one of the layouts file from the browser.
“C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\TEMPLATE\LAYOUTS\1033\IMAGES” folder contains lot of images used referenced from within SharePoint site.
The following link successfully returned the result proving SharePoint’s presence.
Similarly, within the layouts folder there are other xsl style sheets as well. Main.xsl is one such style sheet used within Content Query Web Parts.
Another one is the CSS file Core15.css.
Option 4: Calling out SharePoint web services
SharePoint OOB web services are located at the _vti_bin folder . _vti_bin is nothing but the ISAPI folder at the hive location:
C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI
16 stand for SP 2016. Change it to 15 for 2013, 14 for 2010 and 12 for 2007.
If the Site is based on SharePoint, calling the Web service from the browser would essentially show the Web service description and methods exposed from the Web service.
Webs.asmx is a web service used to work with Sites and Sub sites. Let’s try calling out the web service
This proves that SharePoint is used as the Content Management System of the site.
Option 5: SharePoint Error messages (This happens to be my favorite option)
“While sleeping, a SharePoint developer wouldn’t be counting Sheep instead it would be SharePoint Errors “
If we are successful enough to generate SharePoint error messages it is good enough to state that the Site is based out of SharePoint. It’s quite simple, try to invoke an aspx page that does not exist within the SharePoint Hive folder. SharePoint gets pissed off when we do this and curses us with an unfriendly Correlation ID.
Now that’s a good enough proof!
Option 6: Getting the SharePoint version
Buildversion.cnf is a file located in the inetpub location of the Web application Virtual directory at:
C:\inetpub\wwwroot\wss\VirtualDirectories\1500\_vti_pvt
Calling up this from the browser helps establish SharePoint presence and gives us the SharePoint Build Number as well.
This implies that the Australian Emigration Site is based on SharePoint 2013.15 Conforms to SP 2013.
Calling this on a SharePoint 2016 site would give the following result.
16 Conforms to SP 2016.
Option 7: Let some else does it for you
Please don’t say this as a SharePoint Interview question’s answer. As the Subheading states, we can rely on third party sites that helps identify the underlying technology of a particular Site. Go to Builtwith.com and type in the site name.
Now that’s pretty neat. It even gives us the SharePoint specific version.
There are a lot more options to establish SharePoint presence but these are good enough tools to come to a conclusion. I hope Australian Emigration Team doesn’t sue me for this!