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.