Thursday, March 26, 2015

Handling Custom Error Pages


1) Browse to C:\inetpub\custerr\en-US on the Server.
2) Open the folder you want to edit and modify the error pages for 401,403,404 and 500. Bottom section of the page holds the error message. Top section of the page holds the code for portal header.

3) Browse to C:\inetpub\wwwroot\wss\VirtualDirectories\ and open the folder associated to the Sharepoint site you would like to affect.

4) Edit the file web.config and find the keyword customErrors. Replace the complete customErrors code block with:

<customErrors defaultRedirect="404.htm" mode="On">
       <error redirect="401.htm" statusCode="401" />
       <error redirect="403.htm" statusCode="403" />
       <error redirect="404.htm" statusCode="404" />
       <error redirect="500.htm" statusCode="500" />
</customErrors>

5) Now find the keyword <system.webServer>. Inside this block, place the following block code. (If the httpErrors block already exists, replace it completely!)

<httpErrors errorMode="Custom" existingResponse="Auto">
</httpErrors>

6) Save web.config file.

7) Perform the step 4 and 6 in both the virtual directories (internal and external) for the SharePoint site.

8) Run iisreset command if needed

9) Do step 1 to 8 on all the 3 servers (for staging or production environments).




Farm Admin Do and dont's

Never delete any site collection without taking a backup

Don’t restore any site collection without checking the database allocated site collection numbers

Restore site collections using Powershell Assigning individual database

Never make any changes to web.config files before keeping a copy of original

Don’t delete a farm solutions using UI, Preferably use the PS commands

Never restart any SP timer service without having latest Image backup in place

Avoid IIS reset during Working hours

Don’t  restart any SP services without going through the reverse stop procedure similar to activating
the service

Never Change user account of FIM service manually, use proper user account change and password change through PowerShell

Additionally never delete and create the user profile service application with same name of the service application created previously. Internal name references clashes could lead to more issues

Never do any registry settings without backup.

Make sure that after registry settings servers are restarted.

Distributed cache in SharePoint Farm

During maintainence and operational work there is specific sequence that needs to be followed for Dsitributed cache to disconnect and conne...