Thursday, November 2, 2017

SharePoint 2013 Distributed Cache service

This post is meant to give SharePoint Administrators an deeper look into the Distributed Cache along with some links to other resources on the internet.

Background
SharePoint 2013 uses the AppFabric (Caching) by Microsoft. Read here for a background on AppFabric. AppFabric Caching stores serialised managed objects in a ‘cache cluster’. The cache cluster consists of one or more machines (Cache Hosts) that pool their available physical memory. This pooled memory is presented  and used by SharePoint as a single source of caching memory.

How is it used in SharePoint
SharePoint uses the Distributed Cache to store data for very fast retrieval across all entities. The Distributed Cache service provides in-memory caching services to several features in SharePoint Server 2013. Some of the features that use the Distributed Cache service include:
· Newsfeeds
· Authentication
· OneNote client access
· Security Trimming
· Page load performance

In SharePoint Server 2013, there are several caches that exist, all of which depend on the Distributed Cache service.
Different caches that depend on the Distributed Cache service as indicated in the following table:

Name

Cache name

Login Token Cache

DistributedLogonTokenCache

Feed Cache

DistributedActivityFeedCache

This cache stores activities and conversations for use by the feeds on a user’s My Site.

Last Modified Time Cache

DistributedActivityFeedLMTCache

This cache stores time stamp information for all Feed Cache entities

OneNote Throttling

DistributedBouncerCache

Access Cache

DistributedAccessCache

Search Query Web Part

DistributedSearchCache

Security Trimming Cache

DistributedSecurityTrimmingCache

App Token Cache

DistributedServerToAppServerAccessTokenCache

View State Cache

DistributedViewStateCache

Default Cache

DistributedDefaultCache

This cache can be used by any feature.

Source: http://technet.microsoft.com/en-us/library/jj219700.aspx

Installation
AppFabric is a required component for SharePoint 2013 and is installed as part of the prerequisite installer. Thus each server automatically becomes part of the ‘cache cluster’. There is nothing to configure here as SharePoint does this automatically.

Farm Architecture – modes
Here is some terminology that will be useful when talking SharePoint architecture and topology:
There are two ‘modes’ for Distributed Cache – A collocated mode or a dedicated mode. The Distributed Cache is started and run on all WFE and APP servers by default. If you have over 10000 users, you should look into a dedicated server (dedicated mode) Distributed Cache. Dedicated Mode simply means all other services are turned off and more memory is allocated to the Distributed Cache.

Farm design
While designing your topology, could consider starting the Distributed Cache service on your WFE servers (for redundancy) and stop the Distributed Cache Service on the APP server if you are concerned with ‘overhead’ caused by all the other services running on the APP server. You can consider a scale up plan if you are low on resources or scale out (by starting the Distributed Cache on other servers in the farm).
Finally it boils down to memory allocation at the end of the day. By default, the Distributed memory allocation size defaults to a value of 10 percent of total physical memory when SharePoint Server 2013 installs. You can change the memory allocation with the Update-SPDistributedCacheSize cmdlet.

Here is a link that may help on the ‘right approach’: http://technet.microsoft.com/library/jj219572%28office.15%29.aspx (note the ‘Capacity planning for the Distributed Cache service’ section).

Management
The Distributed Cache service can be stopped or started via the Central Administration or via PowerShell.

Servers can be added or removed from the ‘Cache cluster’ too. When removing the server, the Distributed Cache service is stopped, then unregistered from the server. Unregistering the Distributed Cache service means that you will not see the Distributed Cache service listed on the Services on Server page in Central Administration. Adding a server means that you will see the Distributed Cache service listed on Services on Server page in Central Administration.

To add a server and start the service in PowerShell: Add-SPDistributedCacheServiceInstance

To remove a server and stop the service in PowerShell:
Remove-SPDistributedCacheServiceInstance

To stop (not remove) the Distributed Cache service by using Central Administration: In Central Administration, click Application Management. In Service Applications, click Manage Services on Server. On the Services on Server page, locate the Distributed Cache service. If the Distributed Cache service is started and you want to stop the service, under Action, click Stop.

To stop (not remove) the Distributed Cache service by using Windows PowerShell: At the Windows PowerShell command prompt, run the following command: $instanceName =”SPDistributedCacheService Name=AppFabricCachingService” $serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername} $serviceInstance.Unprovision()

To check existing memory allocation of the Distributed Cache Host:
Use-CacheCluster
Get-AFCacheHostConfiguration -ComputerName ComputerName -CachePort “22233”

To reconfigure the cache size of the Distributed Cache Service:
Update-SPDistributedCacheSize -CacheSizeInMB CacheSize


Firewall configuration considerations

The Distributed Cache service uses the following communication ports:
22233
22234
22235
22236

Monitoring
The Distributed Cache can be monitored using below performance counters in Perfmon:


SharePoint Distributed Cache Counters
Cache Data Transferred Per Sec
Cache Hit Count
Cache Hit Ratio
Cache Miss Count
Cache Read Requests per sec
Cache Write Requests per sec
Total Cache Read Requests
Total Cache Write Requests


Additionally, there are three groups of ‘AppFabric’ counters available. Note there are multiple instances – indicating the different caches present in the Distributed Cache.
AppFabric Caching:Cache
AppFabric Caching:Host
AppFabric Caching:Secondary Host

Important Distributed Cache resource
Manage the Distributed Cache service in SharePoint Server 2013
Plan for feeds and the Distributed Cache service in SharePoint Server 2013

The above link shows how you can:

  • Change the memory allocation of the Distributed Cache service
  • Add or remove a server in a Distributed Cache cluster
  • Perform a graceful shutdown of the Distributed Cache service
  • Change the service account
  • Repair a cache host

 

Friday, February 10, 2017

SharePoint Alert Notifications Not Working - Checklist for Troubleshooting

Before proceeding with the checklist, analyze and isolate the issue:

  • Whether E-mail Infrastructure is working on your environment
  • Whether in all SharePoint web applications alerts are not working? SharePoint alerts not working for one site?
  • SharePoint alerts not working after upgrade or migration 
  • Alerts not working after restore or Service pack?
  • Alerts not working all the time? or Stopped working Recently?
  • SharePoint alerts not being sent to All the user? or some users? or distribution groups, ad group members?
  • Whether SharePoint alerts not working for document library? list alerts not working? calendar alerts not working ? or everywhere?
  • Only SharePoint daily alerts not working? etc. 
This will help you to troubleshoot the SharePoint email alerts not working issue, quickly.

Here is the checklist for troubleshooting:
1. Check alerts are enabled for your web application:
How to check? execute this stsadm in your SharePoint Server:
Stsadm.exe -o getproperty -url http://SharePoint-web-App-URL -pn alerts-enabled

This should return <Property Exist="Yes" Value="yes" />

If you don't get this, Enable alerts by:
stsadm.exe -o setproperty -pn alerts-enabled -pv "true" -url http://SharePoint-web-App-URL

If its already enabled, try turn off and turn on it back.

2. Is your SharePoint Server configured for Out-going E-Mail settings?
Go to Central Administration > Operations > Click on Outgoing e-mail settings Link under Topology and Services, Make sure you have valid settings for these fields. Usually you have to provide your Exchange server's HUB or any valid SMTP server's address.

3. Is your Exchange server allows SharePoint to Send Mails? 
In Exchange Server, If anonymous Relay settings is not enabled, then you must add your WFE/App Servers to the Exchange Server allowed hosts relay list! Make sure your ALL Sharepoint WFE's IPs are added in allowed Relays or Receive connectors in Exchange Server. If you use multiple domains, add all of them.
http://technet.microsoft.com/en-us/library/cc288949.aspx
Watch the  'DROP' folder in the mailroot of the SMTP server.

4. If you are using SMTP Server for E-mail communication, Make sure SharePoint Servers are allowed to Send Mails and Port 25 is open.Go to SMTP Virtual Server Properties >> Setting >> Access TAB >> Select "All except the list below"

5. Verify the Timer Jobs & Properties:

MOSS 2007:  Central Administration > Operations > Timer Job Definitions (under Global Configuration)
In SharePoint 2010: Central Administration > Monitoring > Review Job Definitions 

Check whether the "Immediate Alerts" job is enabled for your web application. check these properties:
  1. job-immediate-alerts
  2. job-daily-alerts 
  3. job-weekly-alerts
stsadm.exe -o getproperty -url "http://Your-SharePoint-web-App-URL" -pn job-immediate-alerts

The expected output is:

<Property Exist="Yes" Value="every 5 minutes between 0 and 59"/>.  

If you don't get this, run the following command to change its value.

stsadm.exe -o setproperty -pn job-immediate-alerts -pv "every 2 minutes between 0 and 59" -url http://Your-SharePoint-web-App-URL
More info: http://technet.microsoft.com/en-us/library/cc262432.aspx

6. Whether the user account subscribed for alerts has E-mail account associated?
In one of my case, user has two accounts, One normal account and another one for Administrative
purpose. He logged in with Admin account, created alerts, and then complained that he didn't receive
alerts! LOL

7. Try these Resets:
Do stsadm -o execadmsvcjobs. Do restart SharePoint Timer services and IISReset.
Is it happening only to a particular user? try remove/re-add em.

8. Check the Permissions: 
The initial alert is not security trimmed. Whether the user has access to the list or not, He will receive the initial alert. If the user is not getting alert for any changes, then check whether the user has at-least Read permission on the list/library.

If item level permission and Read Access to Only their own items is enabled, Alerts wont work!

9. Re-register the alert template:
Try re-registering the alert template:
stsadm -o updatealerttemplates -url http://Your-SharePoint-Web-App-URL -f  "c:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\XML\alerttemplates.xml" -LCID 1033

More info: http://technet.microsoft.com/en-us/library/dd278299.aspx

10. Check your Alternate access mapping
Is your Site URL's/AAM entries changed recently? Check the below tables in your content databases, and verify you dont have any old URL in "SiteUrl" column  in these tables, if you find, replace them.

- ImmedSubscriptions (Stores the alerts for emails that are sent immediately when changes occur)
- SchedSubscriptions (Stores daily or weekly scheduled alerts)
- EventLog (This table contains events for which only non-immediate alerts exist)
- EventCache (This table contains a list of site events for which users have requested alerts. WSS inserts events into this table as they occur)

setting up in the Alternate Access Mappings in Central Admin will correct this issue.

11. Clear the SharePoint configuration cache http://support.microsoft.com/kb/939308

12. Migrated or Changed the Site URLs?
Are you migrated from existing versions of SharePoint/ Changed your SharePoint Site URLs?
You have to update your alerts. Have you performed some database restored in your environment from a different server? Follow my article to fix the alerts: Fix Alerts in SharePoint Migration

13. Export-Import, Backup/Restore:
If you conclude alerts are not working for a entire sub-site but works well with another sub-site, then take the export of the sub-site, delete it, restore it again.

14. Is your SharePoint Up-to-Date?
Make sure your SharePoint is updated with latest service packs/patches.

15. Want to send SharePoint alert to distribution list? SharePoint alert email to distribution list not working?
Make sure your group is E-mail enabled and has at-least read-only permission on the site/list where you are creating alerts. It must be Security group and not distribution list. SharePoint can recognize one users and security groups. So, you can create a Mail for the security group.

Go to distribution group properties and un-check "Require that all senders are authenticated" or create a outgoing connector in Exchange, so that exchange server authenticate SharePoint

Same applies, When you send E-mail from SPD Workflow (or any other workflow). Make sure that the group has at least read permission to the site and the group can be viewed by "everyone".


16. Changes to the user profiles happened wont affect immediately. sync it back.

17. Make sure your timer job account has dbo access to SharePoint content databases.

18. If your Task assignment mails are not delivered, toggle the value for "Send e-mail when ownership is assigned".

19. Task Assigned notification e-mail: If the user synchronized the tasks list with Outlook 2007 the e-mail will not be sent and he will receive the notification in his task pane

20. Content database: Try Re-Attaching the content database (stsadm -o deletecontentdb and addcontentdb)


Alternates: you can simply design a SharePoint designer workflow to send E-mails. or you can have a event receiver to do the same!


Read more:

Sunday, February 5, 2017

Lets talk about SharePoint Auditing and EffectiveAuditMask

 Everyone loves auditing, it fills the content DBs with such useful information. It's like Christmas came early for the SQL storage vendors!!
Seriously, I was attempting to use PowerShell to pull Auditing settings from our farm. Who has turned it on, what trimming settings have they selected, and what items are being audited?
Pretty simple stuff:
(Get-SPSite <siteURL>) | select -expand Audit
Returns something like this for a site with no Auditing enabled
UseAuditFlagCache      AuditFlags      EffectiveAuditMask
———————–      ————-       ———————–
False                                None                 None
Great. Now if you find a site with Auditing enabled, that's where things get really wonky.
If someone has selected just "Opening or downloading documents, viewing items in lists, or viewing item", you get:
UseAuditFlagCache      AuditFlags      EffectiveAuditMask
———————–      ————-       ———————–
False                                View                   View
Oooookkkk, not really a bit-on flag, but let's see where this goes.
If someone enables "Editing item", it looks like this:
UseAuditFlagCache      AuditFlags      EffectiveAuditMask
———————–      ————-       ———————–
False                                Update              Update
And if someone enables "Checking out or checking in items", it looks like this:
UseAuditFlagCache      AuditFlags      EffectiveAuditMask
———————–      ————-       ———————–
False                                3                         3
Well, of course it does. Looks like the helpful folks at Microsoft decided that some Auditing options will return a word, and some will return a bit-on mask. Super helpful, great, thanks. Awesome.
Fear not, I'm here to help, and help I will. Below is a handy table showing you how to figure some of this mess out. If you look at the Audit Settings section under Site Settings, this will show you what you will see from PowerShell, and what the corresponding bit on equivalent is.
Documents and Items:
PowerShell      Setting in Site Settings
————-      —————————
View(4)           Opening or downloading documents, viewing items in lists, or viewing item properties
Update(16)     Editing items
3                       Checking out or checking in items
6144                Moving or copying items to another location in the site
520                  Deleting or restoring items
Lists, Libraries, and Sites
PowerShell                      Setting in Site Settings
————-                       ————————-
160                                     Editing content types and columns
Search(8192)                   Searching site content
SecurityChange(256)     Editing users and permissions
So, using some quick bit on math you can finally start to understand, from PowerShell, what auditing options your happy Site Collections Admins have selected. Now the fun part, go figure out how much space Auditing is taking up…
Open, Edit: 20
Open, Edit, check Out: 23
Open, Edit, check Out, Moving: 6167
Open, Edit, check Out, Moving, Delete: 6687
All Lists, Libraries, and Sites: 8608
All On: 15295
Hope that helps… 

Wednesday, February 1, 2017

Restoring user profile service application with existing databases

Issue: Restoring user profile service with existing database / After restoring a farm from a backup using the Restore-SPFarm PowerShell command the User Profile Synchronization service fails to start
Resolution: To resolve the issue deleted the User Profile Application that was created during the restore process and then recreated it.    To ensure that you do not lose any user profile content there are a few steps that must be followed:
  1. Using central administration, stop the user profile application service on all servers in the farm.
  2. Using central administration, delete the user profile application.   DO NOT check the option to "Delete data associated with the Service Applications".
  3. Identify the names of the user profile, social, and sync databases.
  4. Run the New-SPProfileServiceApplication PowerShell command passing in parameters for: ApplicationPool, Name, MySiteHostLocation, ProfileDBName, ProfileSyncDBName, and SocialDBName.     This will create a new profile service application using your restored profile databases.
  5. Run the New-SPProfileServiceApplicationProxy PowerShell command passing in parameters for: ServiceApplication and Name.   Also include the DefaultProxyGroup parameter.
  6. Start the User Profile Service on Application sever
  7. Run an IISReset command on each server.
  8. Start the User Profile Synchronization Service on the application server.  Wait for 5 – 10 minutes for the service to start.   Ensure that it is started before proceeding.
  9. Ensure that the User Profile Synchronization Timer job is enabled and set properly and then start a full import.
Always remember to test out your disaster recovery plan in a development or QA environment prior to your production launch of SharePoint 2010.

Wednesday, December 14, 2016

Folders that may have to be excluded from antivirus scanning when you use file-level antivirus software in SharePoint

Folders that may have to be excluded from antivirus scanning in SharePoint

Note In the following sections, the placeholder Drive represents the letter of the drive on which you have your SharePoint application installed. Typically, this drive letter is C.

SharePoint Server 2016

You may have to configure your antivirus software to exclude the following folders and subfolders from antivirus scanning:
  • Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions

    If you do not want to exclude the whole Web Server Extensions folder from antivirus scanning, you can exclude only the following folders: 
    • Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16
    • Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16/Logs
  • Drive:\Program Files\Microsoft Office Servers\16.0\Data\Office Server\Applications
  • Drive:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files
  • Drive:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config
  • Drive: \Users\ServiceAccount\AppData\Local\Temp\WebTempDir

    Note The WebTempDir folder is a replacement for the FrontPageTempDir folder.
  • Drive:\ProgramData\Microsoft\SharePoint
  • Drive:\Users\account that the search service is running as\AppData\Local\Temp

    Note The search account creates a folder in the Gthrsvc_spsearch4 Temp folder to which it periodically must write.
  • Drive:\WINDOWS\System32\LogFiles
  • Drive:\Windows\Syswow64\LogFiles

    Note If you use a specific account for SharePoint services or application pools identities, you may also have to exclude the following folders:
    • Drive:\Users\ServiceAccount\AppData\Local\Temp
    • Drive:\Users\Default\AppData\Local\Temp
You should also exclude all the virtual directory folders under Drive:\inetpub\wwwroot\wss\VirtualDirectories and all the folders under Drive:\inetpub\temp\IIS Temporary Compressed Files.

SharePoint Server 2013

You may have to configure the antivirus software to exclude the Drive:\Program Files\Microsoft Office Servers folder from antivirus scanning for SharePoint Server 2013. If you do not want to exclude the whole Microsoft Office Servers folder from antivirus scanning, you can exclude only the following folders:
  • Drive:\Program Files\Microsoft Office Servers\15.0\Data

    (This folder is used for the indexing process. If the index files are configured to be located in a different folder, you also have to exclude that location.)
  • Drive:\Program Files\Microsoft Office Servers\15.0\Logs
  • Drive:\Program Files\Microsoft Office Servers\15.0\Bin
  • Drive:\Program Files\Microsoft Office Servers\15.0\Synchronization Service
  • Any location in which you decided to store the disk-based binary large object (BLOB) cache (for example, C:\Blobcache).
Note If you have SharePoint Server 2013, these folders should be excluded in addition to the folders that are listed in the "SharePoint Foundation 2013" section.

SharePoint Foundation 2013

You may have to configure your antivirus software to exclude the following folders and subfolders from antivirus scanning:
  • Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions

    If you do not want to exclude the whole Web Server Extensions folder from antivirus scanning, you can exclude only the following two folders:
    • Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\Logs
    • Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\Data\Applications

      Note The Applications folder must be excluded only if the computer is running the SharePoint Foundation Search service. If the folder that contains the index file is located elsewhere, you must also exclude that folder.
  • Drive:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files
  • Drive:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config
  • Drive: \Users\ServiceAccount\AppData\Local\Temp\WebTempDir

    Note The WebTempDir folder is a replacement for the FrontPageTempDir folder.
  • Drive:\ProgramData\Microsoft\SharePoint
  • Drive:\Users\account that the search service is running as\AppData\Local\Temp

    Note The search account creates a folder in the Gthrsvc_spsearch4 Temp folder to which it periodically has to write.
  • Drive:\WINDOWS\System32\LogFiles
  • Drive:\Windows\Syswow64\LogFiles

    Note If you use a specific account for SharePoint services or application pools identities, you may also have to exclude the following folders:
    • Drive:\Users\ServiceAccount\AppData\Local\Temp
    • Drive:\Users\Default\AppData\Local\Temp

    You should also exclude all the virtual directory folders under Drive:\inetpub\wwwroot\wss\VirtualDirectories\ and all the folders under Drive:\inetpub\temp\IIS Temporary Compressed Files\.

SharePoint Foundation 2010

You may have to configure your antivirus software to exclude the following folders and subfolders from antivirus scanning:
  • Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions

    If you do not want to exclude the whole Web Server Extensions folder from antivirus scanning, you can exclude only the following two folders:
    • Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Logs
    • Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Data\Applications

      Note The Applications folder must be excluded only if the computer is running the SharePoint Foundation Search service. If the folder that contains the index file is located elsewhere, you must also exclude that folder.
  • Drive:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files
  • Drive:\Windows\Microsoft.NET\Framework64\v2.0.50727\Config
  • Drive: \Users\ServiceAccount\AppData\Local\Temp\WebTempDir

    Note The WebTempDir folder is a replacement for the FrontPageTempDir folder.
  • Drive:\ProgramData\Microsoft\SharePoint
  • Drive:\Users\account that the search service is running as\AppData\Local\Temp

    Note The search account creates a folder in the Gthrsvc_spsearch4 Temp folder to which it periodically has to write.
  • Drive:\WINDOWS\system32\LogFiles
  • Drive:\Windows\Syswow64\LogFiles

    Note If you use a specific account for SharePoint services or application pools identities, you may also have to exclude the following folders:
    • Drive:\Users\ServiceAccount\AppData\Local\Temp
    • Drive:\Users\Default\AppData\Local\Temp

    You should also exclude all the virtual directory folders under Drive:\inetpub\wwwroot\wss\VirtualDirectories\ and all the folders under Drive:\inetpub\temp\IIS Temporary Compressed Files\.

SharePoint Server 2010

You may have to configure your antivirus software to exclude the Drive:\Program Files\Microsoft Office Servers folder from antivirus scanning for SharePoint Server 2010. If you do not want to exclude the whole Microsoft Office Servers folder from antivirus scanning, you can exclude only the following folders:
  • Drive:\Program Files\Microsoft Office Servers\14.0\Data

    (This folder is used for the indexing process. If the Index files are configured to be located in a different folder, you also have to exclude that location.)
  • Drive:\Program Files\Microsoft Office Servers\14.0\Logs
  • Drive:\Program Files\Microsoft Office Servers\14.0\Bin
  • Drive:\Program Files\Microsoft Office Servers\14.0\Synchronization Service
  • Any location in which you decided to store the disk-based binary large object (BLOB) cache (for example, C:\Blobcache)

    For more information about the binary large object cache, go to the following Microsoft website:
Note If you have SharePoint Server 2010, these folders should be excluded in addition to the folders that are listed in the "SharePoint Foundation 2010" section.

Windows SharePoint Services 3.0

You may have to configure your antivirus software to exclude the following folders and subfolders from antivirus scanning:
  • Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions

    If you do not want to exclude the whole Web Server Extensions folder from antivirus scanning, you can exclude only the following two folders:
    • Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Logs
    • Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Data\Applications

      Note The Applications folder must be excluded only if the computer is running the Windows SharePoint Services Search service. If the folder that contains the index file is located elsewhere, you must also exclude that folder.
  • Drive:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files
  • Drive:\Windows\Microsoft.NET\Framework\v2.0.50727\Config

    Note If you are running a 64-bit version of Windows, you should also include the following directory:
    • Drive:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files
    • Drive:\Windows\Microsoft.NET\Framework64\v2.0.50727\Config
  • Windows Server 2003: Drive:\Documents and Settings\All Users\Application Data\Microsoft\SharePoint\Config
    Windows Server 2008 and later versions: Drive:\ProgramData\Microsoft\SharePoint\Config
  • Drive:\Windows\Temp\WebTempDir

    Note The WebTempDir folder is a replacement for the FrontPageTempDir folder.
  • Drive:\Documents and Settings\account that the search service is running as\Local Settings\Temp\
  • Drive:\Users\the account the search service is running as\Local\Temp\

    Note The search account creates a folder in the "gthrsvc Temp" folder to which it periodically has to write.
  • Drive:\WINDOWS\system32\LogFiles
  • Drive:\Windows\Syswow64\LogFiles

    Note If you use a specific account for SharePoint services or application pools identities, you may also have to exclude the following folders:
    • Drive:\Documents and Settings\ServiceAccount\Local Settings\Application Data
    • Drive:\Users\ServiceAccount\Local
    • Drive:\Documents and Settings\ServiceAccount\Local Settings\Temp
    • Drive:\Users\ServiceAccount\Local\Temp
  • Drive:\Documents and Settings\Default User\Local Settings\Temp
  • Drive:\Users\Default\AppData\Local\Temp

SharePoint Server 2007

You may have to configure your antivirus software to exclude the Drive:\Program Files\Microsoft Office Servers folder from antivirus scanning for SharePoint Server 2007. If you do not want to exclude the whole Microsoft Office Servers folder from antivirus scanning, you can exclude only the following folders:
  • Drive:\Program Files\Microsoft Office Servers\12.0\Data.

    (This folder is used for the indexing process. If the index files are configured to be located in a different folder, you also have to exclude that location.)
  • Drive:\Program Files\Microsoft Office Servers\12.0\Logs
  • Drive:\Program Files\Microsoft Office Servers\12.0\Bin
  • Any location in which you decide to store the disk-based binary large object (BLOB) cache (for example, C:\Blobcache)

    For more information about the binary large object cache, go to the following Microsoft website:
Note If you have SharePoint Server 2007, these folders should be excluded in addition to the folders that are listed in the "Windows SharePoint Services 3.0" section.

Note When you install SharePoint Server 2007 or apply a hotfix to an existing installation of SharePoint Server 2007, you may have to disable the real-time option of the antivirus software. Or, you may have to exclude the Drive:\Windows\Temp folder from antivirus scanning if this is required.

For more information about error messages that may occur when antivirus software scans occur in SharePoint Portal Server 2001 and in SharePoint Portal Server 2003, click the following article number to view the article in the Microsoft Knowledge Base:
320111 Random errors may occur when antivirus software scans Microsoft Web Storage System in SharePoint Portal Server 2001 and in SharePoint Portal Server 2003
For more information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
910449 Troubleshooting common permissions and security-related issues in ASP.NET
813833 PRB: "Access Denied" error messages when you do not put strong-named assemblies in the global assembly cache

Tuesday, December 6, 2016

Convert Visual Studio Sharepoint 2010 project to Sharepoint 2013 project

Are you working on migration of the several sites from Sharepoint 2010 to Sharepoint 2013, having several standard Sharepoint 2010 Visual Studio projects (wsps) in solution which contain customizations. As we didn't find standard way of changing target platform in Visual Studio from Sharepoint 2010 to 2013,normally developers create new empty Sharepoint 2013 project in Visual Studio 2012 and manually copied all files there. Also we changed references to Microsoft.SharePoint.dll and all other Sharepoint assemblies from 14 to 15 (Sharepoint 2013 is built on top of .Net 4.5, so its assemblies are located in different GAC: C:\Windows\Microsoft.NET\assembly\, not in C:\Windows\assembly\ as it was before. Here is the good forum thread about why MS put .Net 4 to the new GAC: .NET 4.0 has a new GAC, why?). After that we packaged wsp and compare content with comparison tool.

The above described way worked, but it took some time to move all files from old project and verify that we didn't miss anything.

There are a better way to do it quickly and to ensure nothing left behind.

In order to change target platform to Sharepoint 2013 you need to do the following. Edit your .csproj file in the notepad and replace value for TargetFrameworkVersion tag from v3.5 to v4.5. Then add TargetOfficeVersion tag right after it:

<TargetOfficeVersion>15.0</TargetOfficeVersion>

So it should look like this after the changes:

image
Then go to Package subfolder in your project folder and edit Package.package file: add attribute sharePointProductVersion="15.0" after existing resetWebServer attribute.
After that just reload your .csproj in Visual Studio 2012 (it will automatic upgrade of .csproj), change references to the 15 API, recompile it and package wsp.