Blog - Title

and so it begins.....

  • October Cumulative Updates for SharePoint 2013

    October 2013 Cumulative Update Packages for SharePoint Foundation 2013 and SharePoint Server 2013 have been released

    October 2013 CU for SharePoint Foundation 2013 - KB 2825674
    October 2013 CU for SharePoint Server 2013 - KB 2825647

    Note: This is build 15.0.4551.1001 of the cumulative update package.

    Important: March 2013 PU for SharePoint Server 2013 is mandatory to install this update.

    Updates Center for SharePoint 2013       
    Common Question: What is the difference between a PU, a CU and a COD

  • Upgrading from WSS 2.0 to SharePoint 2013

    There is no direct approach/method to upgrade from WSS 2.0 to SharePoint 2013. The changes between versions are too great, and the hardware requirements differ so much between versions that a direct, in-place upgrade is not possible or supported. You can, however, perform a series of database attach upgrades to first upgrade your content to Windows SharePoint Services 3.0 to Microsoft Office SharePoint Server 2007 to SharePoint Server 2010 and then to SharePoint Server 2013.

    Supported Upgrade Sequence

    To upgrade your content across these versions, follow these steps.

    The supported and tested upgrade path is Windows SharePoint Services 2.0 to Windows SharePoint Services 3.0 to Microsoft Office SharePoint Server 2007 to SharePoint Server 2010 and then SharePoint Server 2013.

    1. First upgrade: Upgrade the content to WSS 3.0

      This upgrade method will ensure the required upgraders are run as intended. One of the most common applications of this upgrade method is an in-place upgrade of Windows SharePoint Services 2.0 to Windows SharePoint Services 3.0 followed by the installation of Microsoft Office SharePoint Server 2007 over the Windows SharePoint Services 3.0 installation.

      • Download the prescan.exe tool and run it on the SharePoint site
      • Check that there are 0 errors and check that the bit flag value on the database for the web site in the table sites is updated.
      • Check for the SQL server having WSS 2.0 sites, stop the services and move the database files over to the new SQL server
      • Run the Products and technologies wizard on the WSS 3.0 environment
      • Create a new web app on port 80 (or a random port)
      • Once the web app is up, detach the content database from Central Admin, Application Management, Manage Content Databases page
      • Attach the restored WSS 2.0 db to the web app in WSS 3.0 and then run the following command to upgrade the database from WSS 2.0 to WSS 3.0

      Stsadm -o addcontentdb -url http://webappUrl -databasename <restoredfromWSSv2> –databaseserver <WSSv3_SQLSvr>

      • Wait for the operation to complete.
      • Once completed, browse to the web app and verify that the sites are browse able.
    2. Second upgrade: Upgrade the content to Microsoft Office SharePoint Server 2007

      You can install MOSS 2007 over the Windows SharePoint Services 3.0 installation.
    3. Third upgrade: Upgrade the content to SharePoint Server 2010 Products

      • Use SQL Server to make a backup of the content databases on the Windows SharePoint Services 3.0 or Office SharePoint Server 2007 farm, restore the backups to the SharePoint Foundation 2010 or SharePoint Server 2010 farm, and then take the old farm offline.
      • Attach the copies of the content databases to the SharePoint Foundation 2010 or SharePoint Server 2010 farm and upgrade them (optionally, you can upgrade them in parallel).
      • Verify that the content was upgraded and that the SharePoint Foundation 2010 or SharePoint Server 2010 farm is working correctly.
    4. Fourth upgrade: Upgrade the content to SharePoint Server 2013 Products

      • Use SQL Server to make a backup of the content databases on the SharePoint Foundation 2010 or SharePoint Server 2010 farm, and then restore them to the SharePoint Foundation 2013 or SharePoint Server 2013 farm.
      • Attach the copies of the content databases to the SharePoint Foundation 2013 or SharePoint Server 2013 farm and upgrade them (optionally, you can upgrade them in parallel).
      • Verify that the content was upgraded and that the SharePoint Foundation 2013 or SharePoint Server 2013 farm is working correctly.
      • Upgrade the site collections.

    More Information

    What does Prescan do and what does it touch in the database?

    PRESCAN.EXE will report on common issues that will result in a failed upgrade; therefore, running PRESCAN.EXE, addressing reported issues, and resolving those issues, and re-running PRESCAN.EXE to verify those fixes is a best practice when planning a Microsoft Office SharePoint Server 2007/Windows SharePoint Services 3.0 upgrade.

    It parses and saves List definitions with the associated Lists. SharePoint Portal Server 2003 Service Pack 2 already incorporates this feature whenever a list is modified; however, this process should be completed for all Lists, so prescan calls the SharePoint Portal Server 2003 Service Pack 2 method to persist that data.

    1. Tp_fields column in the lists table to persist the list schema. This is to facilitate v2->v3 list upgrade
    2. Bitflags column in the sites table to indicate a site collection has been scanned.

    Flips the bitflags field in the sites table in the content database to 262144 if it is ready to be upgraded.

    If you have extensively customized your Microsoft Office SharePoint Portal Server 2003 sites (by using Microsoft Office FrontPage 2003), you need to determine how you want to handle your customized sites when you upgrade. Your approach will vary based on the extent of the customizations, the complexity of your site, and your goals for upgrading.

  • Default Site Templates in SharePoint Server 2010

    Posted @ http://social.technet.microsoft.com/wiki/contents/articles/20100.default-site-templates-in-sharepoint-server-2010.aspx

  • MOSS 2007 - Find the default view url for all lists in a web app using PowerShell

    param
    (
    $url = $(Read-Host -Prompt "WebApp Url")
    )
    # Default View for lists in All Sites
    # Lookup Web Application as specified in the command line parameter
    $wa = [Microsoft.SharePoint.Administration.SPWebApplication]::Lookup($url)
    # Create an array
    $sites =@()
    Write-Output("`nProcessing sites...`n")
    # Loop through all site collections in the web application
    foreach($site in $wa.Sites)
    {
    foreach ($s in $site)
    {
    $spWeb = $s.openweb()
    foreach($list in $spweb.lists)
    {
    Write-Host "list:", $list.defaultview.url
    }
    }
    }

  • Work Management Service Application

    The Work Management Service Application provides functionality to aggregate tasks to a central location on SharePoint Server:

    • Users get the possibility to view and track their to-dos and tasks.
    • Tasks can be cached to a users personal site.
    • Tasks can sync to Outlook where users can edit them wherever they have access to Outlook.
    • Tasks can be aggregated from Exchange, Project Server and SharePoint.
    • Based on 'Provider model' so that other systems can be integrated in the future.

    Work Management Service is usually exposed as part of each users My Site / Newsfeed experience. If you have Project Server, site-level tasks or Outlook/Exchange to-do's, this feature alone can help "sell" social to new users.

    Points to Note:

    1. Make sure you have provisioned your Search Service and that the proper content source is in continuous crawling. Or make sure your incremental crawls happen very often.
    2. The web application pool account you used for My Sites must also have SPDataAccess SQL permissions in your other Content databases of your web applications. If you do not do this, then marking tasks as completed will NOT work.

      # Add the managed account to the SPDataAccess database role in SharePoint content database
      $w = Get-SPWebApplication -Identity $url
      $W.GrantAccessToProcessIdentity("domain\ServiceAccount")

      This should do three things -

      • Add the work management account to the user policy of the web application;
      • Add the work management account to the config database with the permissions of WSS_Content_Application_Pools;
      • Add the work management account to the My Site content database with the permissions of SPDataAccess.

    3. Confirm that these are set.

      You may need to restart the Work Management service and perform an IISReset. A restart of server is recommended if possible.

    4. WMA is one of the new features that is driven by Search. If a crawl hasn't been completed it will not be able to find any tasks to display. The list is based on the tasks that have been indexed as assigned to you and not the ones that have just been added.

    IMPORTANT:

    The tasks are stored in a hidden list called "WmaAggregatorList_User" at the personal site of individual users.
    WMA aggregates tasks from SharePoint lists created in SharePoint Server (internally called TasksWithTimelineAndHierarchy-171) plus upgraded SharePoint lists from earlier versions of SharePoint (internally called Task-107 or GanttTasks-150).

    One of the most commonly reported issues is Work Management Service Application is not aggregating tasks and the “We are having trouble refreshing your tasks” error on the “My Tasks” page with the yellow warning triangle.

    The reasons why the Work Management Service Application may fail to aggregate tasks are as follows:

    • The Work Management Service Application should use the same account as the web application.
    • The service account used for the Work Management Service Application needs Full Control permissions on the User Profile Service
      • Under Application Management section in Central Administration, click Manage service applications.
      • In the list of service applications, click User Profile Service Application.
      • On the Service Applications tab, in the Operations section, click Administrators.
      • On the Administrators for User Profile Service Application page, type the service account of the WMA and then click Add.
      • In the Permissions for Administrator box, check the Full Control permission level, and then click OK.

    • The Task content type should be marked as the Default Content Type for your custom list in order for the tasks to be aggregated by the service.
    • The web application is not associated with the application proxy group which hosts the WMA service application

    References

  • Service Pack 2 and the June Cumulative Update

    A follow-up from last week's post about the release of SP2 for Office and SharePoint 2010: The updates from the June Cumulative Update (KB 2855357) will not install on SP2. The August Cumulative Update will be the first to do so. However, the June Cumulative Update includes some changes that are not available in SP2. If you need those changes, and SP2 is already deployed, you will need to wait until the August Cumulative Update is released and install it to get the changes from June. If the updates from June are already deployed but SP2 is not, our recommendation is to wait until August is available and then install the updates from August and SP2 in any order.

  • Retrieve the list of Content Types in MOSS 2007 using PowerShell

     

    MOSS 2007

    [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") | out-null
    Write-host ".."
    Write-host ".."
    Write-host "Get a list of Content types"
    $site = new-object Microsoft.SharePoint.SPSite("http://spweb/extend"); # specify url here
    foreach ($web in $site.AllWebs) {
    $ctypes = $web.ContentTypes
    foreach ($ctype in $ctypes) {
    $usages = [Microsoft.Sharepoint.SPContentTypeUsage]::GetUsages($ctype)
    foreach ($usage in $usages) {
    Write-Host $web.Name + "," + $ctype.Name + "," + $usage.Url
    }
    }
    }

    SharePoint 2010
    $site = Get-SPSite("http://SPWeb/Site"); # Specify url here
    foreach ($web in $site.AllWebs) {
    $ctypes = $web.ContentTypes
    foreach ($ctype in $ctypes) {
    $usages = [Microsoft.Sharepoint.SPContentTypeUsage]::GetUsages($ctype)
    foreach ($usage in $usages) {
    Write-Host $web.Name + "," + $ctype.Name + "," + $usage.Url
    }
    }
    }

  • “The installation of this package failed” error while installing April 2013 CU (KB 2726992) for SharePoint 2013

    There have been issues reported where the installation of April 2013 CU for SharePoint 2013 fails with the following error:

    “The installation of this package failed”

    If you navigate to the temp file location (open windows explorer and type %tmp% in the address bar) and open the log file, “OPatchInstall(1).log”, located in %Userprofile%\AppData\Local\Temp\2 folder, you will see the following error:

    OPatchInstall: Getting the data from the file 'C:\temp\UBERSRV_1.CAB'
    OPatchInstall: Thrown CDetectionExceptionWin32(2)

    If you extract the contents from the executable ZIP file, you will see it contains two files; an exe and a cabinet file.

    j5ccjl4o

    If you only copy the ubersrv2013-kb2726992-fullfile-x64-glb.exe to a different location and try to install the CU, the operation will fail with the aforementioned error. The is because the CU is dependent on the 'ubersrv_1.cab' file and hence both the exe and the cab file need to be in the same location for the installation to complete successfully.

    To investigate and resolve update installation failures, see KB 954713

    Update

    The issue can also occur while installing June 2013 CU (KB 2817363) for SharePoint 2010.

  • SharePoint – Key Descriptions

    Also posted @ http://social.technet.microsoft.com/wiki/contents/articles/20023.sharepoint-key-descriptions-and-terminologies.aspx

    In this article, I plan to provide information about some of the basic components of SharePoint and the terms that we hear day-in and day-out. Please be advised that most of this information is scattered across multiple locations and I have only attempted to make this available here.

    Web Application

    A Web application is an IIS Web site that is created and used by SharePoint Products and Technologies. Each Web application is represented by a different Web site in IIS. Whenever a new Web application is created, a new content database will be created. By default (unless specified during creation) site collections created in the Web application will be placed in the Web application database.

    SITE

    Site = Web = SPWeb aka sub web

    A site is a collection of lists, libraries, and pages. Whenever you create a new site, a template for the site must be chosen. The templates available out of the box will differ depending on the SharePoint version that is installed. Sites are sometimes referred to as 'webs' also.

    • A site is a web is an SPWeb to developers, and a Sub web to old timers or subsite to those just trying to use something to distinguish it from a site collection.
    • STSADM - Site is a Web; 'Stsadm -o enumwebs' would enumerate a list of sites for a site collection.
    • In the Site Settings UI the site is most often referred to as a site, for example the ability to create sites and workspaces would be referring to sites within the site collection.
    • In the Central Admin UI it would be referred to as a web.
    • SPweb = to a developer they would iterate through a list of SPwebs for an SPsite.

    Site Collection

    Site Collection = SPSite = Portal = Sometimes referred to as a 'Top Level Site'

    A site collection is a set of Web sites that have the same owner and share administration settings. Each site collection contains a top-level Web site and can contain one or more subsites. In short, a site collection is a 'container' that holds sites or webs.

    • STSADM - Site 'Stsadm -o enumsites' would give you a list of site collections in a web application
    • Central Admin Site - Limiting the number of sites in a database is limiting the number of site collections per database
    • Developers - 'Site = SPSite' would be the equivalent. The SPsite would be the container and would have SPwebs on the inside.
    • Smallest unit for controlling storage database
    • Sites are backed up at the site collection level
    • By default, security is managed at the site collection level
    • Quotas can be configured for site collections
    • Sites are confined to share content within their own site collection
    • Level of ownership is defined at the site collection level 

    Page

    In the Office SharePoint Server, the actual "page" is a item a WSS list and the framework knows how to assemble these. This list has columns that are bound to three field controls (title, picture, article). Re-using SharePoint lists for data storage lets us build on existing and new WSS list features like content types, check-in/out, versioning, per item security, workflow and more. In edit mode, the field controls place constraints on the author for what content they can put in the "page".

    Master Pages

    Master pages in SharePoint work the same as they do in traditional ASP.NET applications. They allow designers to control almost all aspects of the overall layout of a SharePoint site. Master pages can be thought of as the glue that holds all of the SharePoint functionality together. In fact every SharePoint site will have a master page, whether it is custom or one of the out-of-the-box master pages. When a designer creates a custom master page, they are typically trying to make a SharePoint site look less like it does out of the box and more like a company’s specific brand.

    Master pages are stored in the master page gallery of a SharePoint site. They can be added to the master page gallery either directly from either SharePoint Designer or the SharePoint Web interface, or they can be deployed via a Feature.

    Master pages are applied to an Office SharePoint Server site via the Master Page settings menu located from the Site Settings of the SharePoint Web interface. One really nice thing about this menu is that it allows the administrator to apply a master page not only to the current site, but to all sub sites below it. Along with this manual method, master pages can also be applied to SharePoint sites via custom Features. Master pages can also be applied to Windows SharePoint Services sites. Like Office SharePoint Server sites, the master page is stored in the master page gallery. Unlike Office SharePoint Server, changing the master page can only be done through a custom solution.

    Themes

    SharePoint themes are different from ASP.NET themes; they are used specifically to change the colors, fonts, and some of the images that are used in SharePoint sites. Unlike master pages though, they cannot be used to move SharePoint elements or change the layout of the page. They are created entirely with CSS and images and cannot use any custom ASP.NET code.

    SharePoint themes are typically added by manually logging into the physical server and copying the various files (images, CSS, and XML) to several folders in the 12 directory. They are applied from the Site Settings menu in the SharePoint Web interface.

    For more information on creating SharePoint themes, refer to the following articles:

    Site Master Page vs. System Master Page

    By default the following rule applies:

    • Site Master Pages: Used by all publishing pages - and only by publishing pages
    • System Master Pages: Used by everything else including forms and view pages

    You cannot change the default behavior - but you can use SharePoint Designer to change the master page assignment for individual pages if required.

    If you open a page in SharePoint Designer you can see a Master Page File setting which can be modified:

    • "~masterurl/default.master": the page will use the system master page
    • "~masterurl/custom.master": the page will use the site master page

    Master Pages vs. Themes

    While both master pages and SharePoint themes can apply branding to a SharePoint site, they differ in a few key ways. The following table highlights these differences.

    Master-Pages

    Site Templates

    A site template is a file that dictates the overall look and feel of a site. It includes all of the design information about a site, such as:

    • The lists within a site.
    • Any Web Part Pages within a site.
    • Any custom pages within a site.
    • The theme or Master Pages applied to a site.
    • Any customizations to the Quick Launch.
    • Site content (list and document library contents — optional).

    Site templates do not include the following items:

    • Security settings, such as a list of users or groups with permissions to the site from which the template was created.
    • Personalizations to Web Part Pages.
    • Web discussions from the original site.
    • Alerts from the original site.
    • Web part assemblies that were added to the original site.


      Default site templates (MOSS 2007)  
      SharePoint Server 2010 site templates

    Content Types

    A content type is a reusable collection of settings you want to apply to a certain category of content. Content types enable you to manage the metadata and behaviors of a document or item type in a centralized, reusable way.

    A content type is an object that defines several elements of a piece of content, including:

    • Document Template that the content will be based on
    • Columns that the content will have associated with it (metadata)
    • Workflows that the content will use
    • Information Management policies that apply to the content
    • Conversion types for the content

    Additionally, content type can include the following information:

    • The metadata, or properties, you want to assign to this type. These are represented by columns added to the list or document library when you add the content type.
    • Custom New, Edit, and Display forms to use with this content type.
    • Workflows available for items of this content type. These can be defined to start automatically based on a selected event or condition, or through user selection.
    • For document content types, the document template on which to base documents of this type.
    • Any information necessary for custom solutions associated with this content type. You can store this information in the content type as one or more XML documents.

    Page Layouts

    Only available in Office SharePoint Server sites, page layouts provide yet another means for designers to style the content of a SharePoint site. While master pages provide a unified outer shell design for a SharePoint site, page layouts define the specific look and the editable data for various types of pages. They allow another level of granularity by allowing the same type of data to be shown in different ways, like an article page or a welcome page, while still utilizing the same master page. Page layouts are created in SharePoint Designer and are based on SharePoint content types and site columns. From an administrative standpoint they are added to Office SharePoint Server sites in a similar fashion to master pages. They are also stored in the Master Page Gallery and can, like master pages, can be added from SharePoint Designer, the SharePoint Web interface, or deployed via SharePoint Features.

    Page layouts help dictate the overall look and feel of a Web page. A page layout relies on a content type to determine the kind of content that can be stored on pages that use the page layout. Content for the page is stored in fields on the page. When you view or edit a page, the content is displayed in field controls. When you create a page layout, you add field controls using a Windows SharePoint Services-compatible Web authoring tool, such as Microsoft Office SharePoint Designer 2007.

    The types of fields on a page are determined by the content type for the page. Each content type contains columns that correspond to the fields on the page. When you create a content type, you add column templates to the content type for each field. Column templates determine the default field control that is associated with the columns as well as the kind of content the field can contain, such as a single line of text, a hyperlink, or a picture.

    Content types for page layouts are based on the Page content type and contain the columns for the fields that can be used on pages based on the page layout. The Page content type is a system content type template created by the Publishing Resources feature. The column templates from Page will be added to all Pages libraries created by the Publishing feature.

    By default, the Page content type contains a number of columns that page layouts require. The following table describes a sample of these default columns.

    Features and Solution Files (.wsp files)

    Features and Solutions are an important concept for administrators to understand. They can make the management and maintenance of a farm much easier when used together. Features provide the ability to define a piece of functionality that can be turned on and off at a given scope, such as the site collection, site, or Web application. Solutions provide the ability to package and install a feature much like a Windows .msi file, and have one installation and deployment point for all servers in the farm. The deployments can be scheduled and whenever new servers are added to the farm, the existing solutions are automatically deployed to the new server. Developing functionality as Features and deploying them as Solutions is the recommend deployment strategy for SharePoint customizations.

    For more information on the benefits of using solutions and features, refer to the following:

  • Intermittent "HTTP 403 – Forbidden" error while trying to browse to a SharePoint web app

    Consider a scenario where you receive the following error when you browse to a SharePoint web app

    The website declined to show this webpage
    HTTP 403 
    Most likely causes:
    This website requires you to log in.

    qxylgifx

    This issue is intermittent. Strangely, if we create a copy of the web.config file, rename the web.config file, refresh the home page, we receive an "HTTP 404 - Page Not Found" error. Rename the web.config file back and refresh the page. The site is browse able for a while before failing after some time

    We see the following error in Failed Request Tracing

    3wjk4xr5

    A procmon trace captured while accessing the web app from the server showed the following:

    w3wp.exe 4180 CreateFile C:\inetpub\wwwroot\wss\VirtualDirectories\Web80.Contoso.com80\bin ACCESS DENIED Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, Impersonating: NT AUTHORITY\IUSR

    5cgganli

    This issue usually occurs when a request from an authenticated user without local admin rights results in a failed read of the /BIN directory by the impersonating w3wp.exe (IIS worker process for ASP.NET) process. This behavior is typically associated with lack of permissions to the temporary folder /BIN where ASP.Net assemblies are Just In Time (JIT) compiled.

    Resolution

    The solution is to ensure that the Authenticated Users or <SERVER NAME>\Users group (which usually contains DOMAIN\Users group) has Read & Execute, List Folder Contents and Read permissions on the /BIN folder below C:\inetpub\wwwroot\wss\VirtualDirectories\{Sitename80}. Follow the steps listed below to grant the required permissions:

    • Open Windows Explorer and navigate to the /bin directory of your web application
    • Right-click on the folder and click on Properties
    • Go to Security tab and click on Edit
    • Click on Add and add the local server group Authenticated Users or <SERVER NAME>\Users (this usually contains DOMAIN\Users group).
    • Select the Read & Execute, List Folder Contents and Read permissions (if you are planning to add Everyone to the /bin folder, grant Read permissions only)
    • Click OK to apply the new settings

    Refresh the page and we should be able to browse to the site.

    There are instances where this permission needs to be re-applied as part of every deployment and we may often find that the permissions have reset after touching the Authentication Providers settings in Central Admin.

    More Information

    If an administrator accesses the site/feature that caused the error, the subsequent requests from non-administrators would succeed. This behavior is typically associated with lack of permissions to the temporary folder where ASP.Net assemblies are Just In Time compiled.

    The freb trace shows a 403.0 for ManagedPipelineHandler

    It seems to go through quite a few ASPNet events - but happens during the ASPNetPageRender - it goes to the ASPNetPageRender Enter, then ASPNetHTTPHandler Leave.Only then does it get a 403.0 which is not an official RFC error. The first sub-status for 403 is 403.0.

    Application pool in Classic or Integrated mode

    1. Application Pool in Classic Mode – In this case, we can configure a Wildcard mapping for ASPNET_ISAPI.dll at the website level. That would propagate to child virtual directories. That should not need any further modifications at the virtual directory level.
    2. Application Pool in Integrated Mode – In this case, all relevant virtual directories would need individual modifications. They need to be set for specific handler. E.g. ‘book’ virtual directory needs mapping for BookAPI and ‘movie’ directory would need mapping for MovieAPI.
  • “Sorry, something went wrong” error message when users try to navigate to Site Collection Features page

    Users receive the following error message when they try to navigate to Site Collection Features page:

    Sorry, something went wrong
    An error occurred during the compilation of the requested file, or one of its dependencies. Could not write to output file
    'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\d9bc15df\5100559f\App_Web_managefeatures.aspx.9c9699a8.qtwjbdlb.dll' -- 'The directory name is invalid. '

    ulvsrtnt

    The error message also appears on other locations as well on the site like while trying to navigate to Site Content Types page, adding a workflow among others.

    The cause turned out to be DisableLoopBackCheck was not enabled on the WFEs.

    Solution

    • DisableLoopBackCheck (As per KB 926642)
    • Using PowerShell
    • New-ItemProperty HKLM:\System\CurrentControlSet\Control\Lsa -Name "DisableLoopbackCheck" -value "1" -Property Type Dword

  • Get a list of web templates and IDs in a SharePoint site

     

    # Find the template name of SharePoint site using PowerShell
    $web = Get-SPweb http://SiteUrl
    Write-host
    Web Template:” $web.WebTemplate ” | Web Template ID:” $web.WebTemplateId
    $web.Dispose()

    # To get a list of all web templates, use the following PowerShell code

    function Get-SPWebTemplateWithId
    {
         $templates = Get-SPWebTemplate | Sort-Object "Name"
         $templates | ForEach-Object {
        $templateValues = @{
         "Title" = $_.Title
         "Name" = $_.Name
         "ID" = $_.ID
         "Custom" = $_.Custom
         "LocaleId" = $_.LocaleId
          }

    New-Object PSObject -Property $templateValues | Select @("Name","Title","LocaleId","Custom","ID")
          }
    }

    Get-SPWebTemplateWithId | Format-Table

    Below is a list of the web templates and their IDs

    sdx5qz5d

    Hope this helps.

  • March 2013 Public Update (PU) for SharePoint Server 2013 is here

    The March 2013 Public Update (PU) for SharePoint Server 2013 and SharePoint Foundation 2013 have been released.

    The Server packages for the Feb CU are contained in the March PU and is available for download here:

    This update package includes all the server component packages. Additionally, this cumulative update package updates only those components that are installed on the system. A change in the package configuration was introduced after SharePoint Server 2013 was released. You must install this public update before you install later SharePoint updates.

    Important

    When you install the update watch out for SharePoint farms where search components and high availability search topologies are enabled. For servers that include search components, you have to follow specific steps to ensure that you install the PU correctly. For a high availability search topology, you use Windows PowerShell cmdlets to patch a Search service application. The steps to follow are mentioned in the following Microsoft website:

    How to install update packages on a SharePoint farm where search component and high availability search topologies are enabled

    Update Center for SharePoint 2013 http://technet.microsoft.com/en-US/sharepoint/jj891062


    UPDATE

    One of the feature updates of the March 2013 Public Update for SharePoint 2013 is that it enables you to use multiple app domains in SharePoint 2013 environments with alternate access mapping or host-header web application configurations. Before the Public Update, you could only host ONE app domain and it had to be in the Default zone. You could not use the app domain on alternate access mappings or host-header web application configurations. The Public Update enables you to configure an app domain for each web application zone and use alternate access mapping and host-header web application configuration.

    Although the Public Update automatically installs the necessary pieces, the feature is not enabled by default. To enable and use this feature, you have to use a reverse proxy to allow traffic for the app domains. The Public Update does not install or configure the reverse proxy. You must set up the reverse proxy.

    See Enable apps in AAM or host-header environments for SharePoint 2013 for more information.

    Important:

    Due to a change in the package configuration introduced after SharePoint 2013 RTM the March Public update is a mandatory requirement in order to install subsequent SharePoint 2013 Updates.

    This is build 15.0.4481.1000 of the update package.

     

  • Warm up script in PowerShell for SharePoint 2010 Environment

     
     
    # Warm up script for web apps along with the site collections within them in SharePoint 2010 environment

    Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

    # The get-webpage function is from http://kirkhofer.wordpress.com/2008/10/18/sharepoint-warm-up-script/

    function Get-WebPage([string]$url)
    {
    $wc = new-object net.webclient;
    $wc.credentials = [System.Net.CredentialCache]::DefaultCredentials;
    $pageContents = $wc.DownloadString($url);
    $wc.Dispose();
    return $pageContents;
    }


    # Enumerate the web app along with the site collections within it, and send a request to each one of them
    foreach ($site in Get-SPSite)
    {
    write-host $site.Url;
    $html=get-webpage -url $site.Url -cred $cred;
    }

  • Farm Communication in SharePoint

     

    The information provided in this article is available at Plan security hardening for SharePoint 2013 (TechNet) and SharePoint 2013 Ports, Proxies and Protocols - An Overview of Farm Communications

    See this table for commonly used ports and protocols in farm communication.

    Ports and Protocols

    Service Application Communication

    By default, communication between Web servers and service applications within a farm takes place by using HTTP with a binding to TCP 32843. When you publish a service application, you can select either HTTP or HTTPS with the following bindings:

    HTTP binding: TCP 32843
    HTTPS binding: TCP 32844

    Additionally, third parties that develop service applications can implement a third choice:

    net.tcp binding: TCP 32845

    You can change the protocol and port binding for each service application. On the Service Applications page in Central Administration, select the service application, and then click Publish.

    The HTTP/HTTPS/net.tcp bindings can also be viewed and changed using the Get-SPServiceHostConfig and Set-SPServiceHostConfig PowerShell cmdlets. Communication between service applications and SQL Server takes place over the standard SQL Server ports or the ports that you configure for SQL Server communication. See Service Application Communication for more information.

    Output of Get-SPServiceHostConfig

    HttpPort : 32843
    HttpsPort : 32844
    NetTcpPort : 32845
    SslCertificateStoreName : SharePoint
    SslCertificateFindType : FindBySubjectDistinguishedName
    SslCertificateFindValue : CN=SharePoint Services, OU=SharePoint, O=Contoso, C=IC

     

    User Profile Service Hardening Requirements

    The User Profile service application uses the Forefront Identity Management agent to synchronize profiles between SharePoint 2013 and Active Directory or a Lightweight Directory Access Protocol (LDAP) directory service. The Forefront Identity Management agent is installed on all servers in a SharePoint farm, but is only required on the server that is set up to synchronize with the directory store.

    The Forefront Identity Management agent includes the following two services that must remain enabled on the server that is set up to crawl Active Directory or another directory store:

    • Forefront Identity Manager service
    • Forefront Identity Manager Synchronization service

    Additionally, TCP 5725 must be open on the server that runs the Forefront Identity Management agent and is set up to crawl a directory store. In Active Directory environments, the following ports must remain open for communication between the SharePoint 2013 server that synchronizes with the directory store and the server that is running Active Directory:

    • TCP & UDP 389 (LDAP service)
    • TCP & UDP 88 (Kerberos)
    • TCP & UDP 53 (DNS)
    • UDP 464 (Kerberos Change Password)

    For more information about hardening requirements for the Forefront Identity Management agent, including port requirements for other directory types, see Management Agent Communication Ports, Rights, and Permissions (http://go.microsoft.com/fwlink/p/?LinkId=186832).

     

    References

    Learn about security hardening for SharePoint web server, application server, and database server roles (blocking the standard SQL Server ports), including specific hardening requirements for ports, protocols, and services.

    The articles and resources on this page provide information about how to plan SharePoint 2013 security for server farms.

    When you install SQL Server, the default settings help to provide a safe database. In addition, you can use SQL Server tools and Windows Firewall to add additional security to SQL Server for SharePoint 2013 environments. Learn how to improve the security of SQL Server for SharePoint 2013 environments.

  • SharePoint 2013 Prerequisites fails with MSI Installer error code 1603 while installing AppFabric 1.1

    When installing SharePoint 2013 prerequisites on Windows Server 2008 R2, the prerequisite installer fails with the following error

    Appfabric installation failed because installer MSI returned with error code:1603

    This is a generic MSI error message and does not give any indication about how to get the issue fixed. Uninstall or reinstalling only makes it worse.

    The issue can be caused due to the following:

    1. The path to the PowerShell executable that is needed for the AppFabric installation is incorrect.
    2. In some scenarios, repeated uninstallation and re-installation does not fix the issue. This is because the installer does not remove the PSModulePath entry in Environment Variables during un-installation and the installation fails because the entry already exists.
    3. If you are trying to install all the prerequisites manually as the server does not have a connection to internet.

      Note
      : Appfabric installation and configuration has to be done by the prerequisite installer ONLY and not in a stand-alone manner.

    You can implement any one of the two solutions listed below

    1. Solution 1

      Append the following path to PSModulePath entry in the environment variables - %SYSTEMROOT%\System32\WindowsPowerShell\v1.0

      • Go to My Computer, right-click Properties
      • On the System' page, click Advanced System Settings on the left-side pane.
      • If you receive a UAC prompt, click on Yes to launch the System Properties dialog box
      • From the Advanced tab, click Environment Variables
      • Within the System Variables section in the lower half, select PSModulePath and click on Edit (or double-click PSModulePath')
      • Append the following path to PSModulePath entry in the environment variables

      %SYSTEMROOT%\System32\WindowsPowerShell\v1.0\

      • Ensure that the PSModulePath entry looks like this:

        C:\Windows\system32\WindowsPowerShell\v1.0\Modules\;c:\Program Files\AppFabric 1.1 for Windows Server\PowershellModules


    2. Solution 2

      • There are chances that other applications might be referencing the same variable and may fail if it is deleted. This is what we can do if solution 1 does not help.
      • Remove the PSModulePath entry from the 'Environment Variables' and re-run the installer. Once it completes successfully, ensure that the PSModulePath entry looks the same as mentioned in solution 1.
    3. Solution 3

    You can download the list of prerequisites from Links to applicable software

    Links to the individual prerequisites:

    The steps listed below are for AppFabric for Windows Server only

    Follow these steps for installing AppFabric for Windows Server correctly

    • Uninstall the Appfabric for Windows Server from Control Panel -> Programs and Features page
    • Download the individual requirements to a network location or a local folder
    • Install prerequisites for SharePoint 2013 manually
    • From the Start menu, open the Command Prompt window using the Run as administrator option.

      - Navigate to the root of the SharePoint 2013 installation media or folder location
      - Type the prerequisite program switch and corresponding argument for the program that you want to install, and then press ENTER.
      For example:

      If
      we have to install AppFabric for Windows Server from a local source, we can run the following command:

      PrerequisiteInstaller.exe /AppFabric:<location Of the Appfabric installation file>

      This will kick off the prerequisite installer wizard which will then use the installation file stored locally on the machine as specified in the command-line to install Windows Server AppFabric. We can also install more than one prerequisite by using different switches with the PrerequisiteInstaller.exe command to install multiple components and specifying the installation path in the command line window. For example:

      PrerequisiteInstaller.exe /AppFabric:<location Of the Appfabric installation file> /IDFX11:<Install Windows Identity Foundation v1.1 from file>

      This command will install Appfabric and Windows Identity Foundation

      For a complete list of prerequisite installer operations and command-line options, see Prerequisite installer operations and command-line options

    • The SharePoint 2013 prerequisite installer (prerequisiteinstaller.exe) installs the following software, if it has not already been installed on the server, in this order (provided you have downloaded the prerequisites locally):

      PrerequisiteInstaller.exe

      /SQLNCli:file - Install Microsoft SQL Server 2008 R2 SP1 Native Client from file
      /PowerShell:file - Install Windows Management Framework 3.0 from file
      /NETFX:file - Install Microsoft .NET Framework 4.5 from file
      /IDFX:file - Install Windows Identity Foundation (KB974405) from file
      /Sync:file - Install Microsoft Sync Framework Runtime v1.0 SP1 (x64) from file

      /AppFabric:<location Of the Appfabric installation file>
      /IDFX11:"<path>\Microsoft Identity Extensions.msi"
      /MSIPCClient:"<path>\msipc.msi"
      /WCFDataServices:"<path>\WcfDataServices.exe"
      /KB2671763:"<path>\AppFabric1.1-RTM-KB2671763-x64-ENU.exe

    • where "<file>" signifies the file location from where you want to install. If you do not specify the <file> option, the installer downloads the file from the Internet and installs it.

    The prerequisite installer creates log files at %TEMP%\prerequisiteinstaller.<date>.<time>.log. You can check these log files for specific details about all changes the installer makes to the server.

    See Install prerequisites for SharePoint 2013 from a network share for information about how to install the SharePoint 2013 prerequisites at the command prompt from a network share or local system. This approach is typically used when the server does not have a connection to internet.

  • Retrieve timer job history for a specified time range using PowerShell

     

     

    # Retrieve timer job history for a specified time range

    # Initial settings
    $Wa
    = Get-SPWebApplication "
    http://WebAppUrl"    # Supply the web app url here
    $From= "2/13/2013 12:00:00 AM
    # mm/dd/yyyy hh:mm:ss
    $To = "2/14/2013 12:00:00 AM"

    # Retrieve all jobs in the time range
    Write-Host "Listing all timer jobs that have run between $From to $To and storing it in CSV format" -ForeGroundColor
    Blue
    $Wa.JobHistoryEntries | Where-Object {($_.StartTime -gt $From) -and ($_.StartTime -lt $To)} | Export-Csv TimerJobHistory.csv –NoType

    Write-Host "Done.." -ForeGroundColor Green

    # Retrieve all failed jobs in the time range
    Write-Host "Listing all timer jobs that have failed to run between $From to $To and storing it in CSV format" -ForeGroundColor Red
    $Wa.JobHistoryEntries | Where-Object {($_.StartTime -gt $From) -and ($_.To -lt $To) -and ($_.Status -ne 'Succeeded')} | Export-Csv FailedTimerJobHistory.csv –NoType

    Write-Host "Done.." -ForeGroundColor Green

     

  • Create a new Search Service Application in SharePoint 2013 using PowerShell

     

    The search architecture in SharePoint 2013 has changed quite a bit when compared to SharePoint 2010. In fact the Search Service in SharePoint 2013 is completely overhauled. It is a combination of FAST Search and SharePoint Search components.

    apxvsdik


    As you can see the query and crawl topologies are merged into a single topology, simply called "Search topology". Provisioning of the search service application creates 4 databases:

    • SP2013_Enterprise_Search - This is a search administration database. It contains configuration and topology information
    • SP2013_Enterprise_Search_AnalyticsReportingStore - This database stores the result of usage analysis
    • SP2013_Enterprise_Search_CrawlStore - The crawl database contains detailed tracking and historical information about crawled items
    • SP2013_Enterprise_Search_LinksStore - Stores the information extracted by the content processing component and also stores click-through information

    # Create a new Search Service Application in SharePoint 2013

    Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

    # Settings
    $IndexLocation = "C:\Data\Search15Index” #Location must be empty, will be deleted during the process!
    $SearchAppPoolName = "Search App Pool"
    $SearchAppPoolAccountName = "Contoso\administrator"
    $SearchServerName = (Get-ChildItem env:computername).value
    $SearchServiceName = "Search15"
    $SearchServiceProxyName = "Search15 Proxy"
    $DatabaseName = "Search15_ADminDB"
    Write-Host -ForegroundColor Yellow "Checking if Search Application Pool exists"
    $SPAppPool = Get-SPServiceApplicationPool -Identity $SearchAppPoolName -ErrorAction SilentlyContinue

    if (!$SPAppPool)
    {
        Write-Host -ForegroundColor Green "Creating Search Application Pool"
        $spAppPool = New-SPServiceApplicationPool -Name $SearchAppPoolName -Account $SearchAppPoolAccountName -Verbose
    }

    # Start Services search service instance
    Write-host "Start Search Service instances...."
    Start-SPEnterpriseSearchServiceInstance $SearchServerName -ErrorAction SilentlyContinue
    Start-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance $SearchServerName -ErrorAction SilentlyContinue

    Write-Host -ForegroundColor Yellow "Checking if Search Service Application exists"
    $ServiceApplication = Get-SPEnterpriseSearchServiceApplication -Identity $SearchServiceName -ErrorAction SilentlyContinue

    if (!$ServiceApplication)
    {
        Write-Host -ForegroundColor Green "Creating Search Service Application"
        $ServiceApplication = New-SPEnterpriseSearchServiceApplication -Partitioned -Name $SearchServiceName -ApplicationPool $spAppPool.Name 
    -DatabaseName $DatabaseName
    }

    Write-Host -ForegroundColor Yellow "Checking if Search Service Application Proxy exists"
    $Proxy = Get-SPEnterpriseSearchServiceApplicationProxy -Identity $SearchServiceProxyName -ErrorAction SilentlyContinue

    if (!$Proxy)
    {
        Write-Host -ForegroundColor Green "Creating Search Service Application Proxy"
        New-SPEnterpriseSearchServiceApplicationProxy -Partitioned -Name $SearchServiceProxyName -SearchApplication $ServiceApplication
    }


    $ServiceApplication.ActiveTopology
    Write-Host $ServiceApplication.ActiveTopology

    # Clone the default Topology (which is empty) and create a new one and then activate it
    Write-Host "Configuring Search Component Topology...."
    $clone = $ServiceApplication.ActiveTopology.Clone()
    $SSI = Get-SPEnterpriseSearchServiceInstance -local
    New-SPEnterpriseSearchAdminComponent –SearchTopology $clone -SearchServiceInstance $SSI
    New-SPEnterpriseSearchContentProcessingComponent –SearchTopology $clone -SearchServiceInstance $SSI
    New-SPEnterpriseSearchAnalyticsProcessingComponent –SearchTopology $clone -SearchServiceInstance $SSI
    New-SPEnterpriseSearchCrawlComponent –SearchTopology $clone -SearchServiceInstance $SSI

    Remove-Item -Recurse -Force -LiteralPath $IndexLocation -ErrorAction SilentlyContinue
    mkdir -Path $IndexLocation -Force

    New-SPEnterpriseSearchIndexComponent –SearchTopology $clone -SearchServiceInstance $SSI -RootDirectory $IndexLocation
    New-SPEnterpriseSearchQueryProcessingComponent –SearchTopology $clone -SearchServiceInstance $SSI
    $clone.Activate()

    Write-host "Your search service application $SearchServiceName is now ready"

    Update

    To configure failover server(s) for Search DBs, use the following PowerShell:

    Thanks to Marcel Jeanneau for sharing this!

    #Admin Database
    $ssa = Get-SPEnterpriseSearchServiceApplication “Search Service Application”
    Set-SPEnterpriseSearchServiceApplication –Identity $ssa –FailoverDatabaseServer <failoverServerAlias\instance>

    #Crawl Database
    $CrawlDatabase0 = ([array]($ssa | Get-SPEnterpriseSearchCrawlDatabase))[0]
    Set-SPEnterpriseSearchCrawlDatabase -Identity $CrawlDatabase0 -SearchApplication $ssa -FailoverDatabaseServer <failoverServerAlias\instance>

    #Links Database
    $LinksDatabase0 = ([array]($ssa | Get-SPEnterpriseSearchLinksDatabase))[0]
    Set-SPEnterpriseSearchLinksDatabase -Identity $LinksDatabase0 -SearchApplication $ssa -FailoverDatabaseServer <failoverServerAlias\instance>

    #Analytics database
    $AnalyticsDB = Get-SPDatabase –Identity <id of database>
    $AnalyticsDB.AddFailOverInstance(“failover alias\instance”)
    $AnalyticsDB.Update()

     

    See the following articles for information about Search Service Application in SharePoint 2013

  • Running PowerShell on MOSS 2007

     

    1. If you are running MOSS 2007 on Windows Server 2003 the you have to download and install PowerShell from http://support.microsoft.com/kb/968930. Windows Server 2008  natively supports PowerShell.
    2. Set the  Execution Policy to 'RemoteSigned'. You can check it by running 'Get-ExecutionPolicy' cmdlet
      The default execution policy for PowerShell is “Restricted” (commands only, not scripts)
           
    # All scripts running locally are allowed
    Set-ExecutionPolicy RemoteSigned

    This means downloaded scripts must be signed by a trusted publisher before they can be run.

         3. You need to load the SharePoint assemblies with the following command

    #    Load the SharePoint assemblies
    [Void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")

    A bunch of PowerShell scripts are available at http://www.powershell.nu/2009/09/08/moss-2007-script-collection

  • Issue found with .NET Framework 3.5.1 Security update KB2756920

    After installing the update KB2756920 on a Windows Server 2008 R2/Windows 7 RTM  computer running SharePoint Server 2010 with previously installed hotfixes for .NET 3.5 SP1. on the server, the following exception is thrown when any WCF service is hosted on IIS using HTTPS

    Server Error in ‘/SecurtyTokenServiceApplication’ Application
    Method not found: ‘System.String System.ServiceModel.Activation.iis7helper.extendedprotectiondotlessspnnotenabledthrowhelper(system.object)’

    An exception occurred when trying to issue security token: The requested service, 'http://localhost:32843/SecurityTokenServiceApplication/securitytoken.svc/actas' could not be activated. See the server's diagnostic trace logs for more information..

    Exception occurred while connecting to WCF endpoint: System.ServiceModel.ServiceActivationException: The requested service, 'http://localhost:32843/SecurityTokenServiceApplication/securitytoken.svc/actas'
    could not be activated due to an exception during compilation. See the server's diagnostic trace logs for more information. Server stack trace:    
    at System.ServiceModel.Channels.HttpChannelUtilities.ValidateRequestReplyResponse(HttpWebRequest request, HttpWebResponse response, HttpChannelFactory factory, WebException responseException, ChannelBinding channelBinding)

    Extended Stack Trace

    [MissingMethodException: Method not found: 'System.String System.ServiceModel.Activation.Iis7Helper.ExtendedProtectionDotlessSpnNotEnabledThrowHelper(System.Object)'.]
    System.ServiceModel.WasHosting.WebConfigurationManagerWrapper.BuildExtendedProtectionPolicy(ExtendedProtectionTokenChecking tokenChecking, ExtendedProtectionFlags flags, List`1 spnList) +0
    System.ServiceModel.WasHosting.WebConfigurationManagerWrapper.GetExtendedProtectionPolicy(ConfigurationElement element) +362
    System.ServiceModel.WasHosting.MetabaseSettingsIis7V2.ProcessWindowsAuthentication(String siteName, String virtualPath, HostedServiceTransportSettings& transportSettings) +217
       System.ServiceModel.WasHosting.MetabaseSettingsIis7V2.CreateTransportSettings(String relativeVirtualPath) +137
       System.ServiceModel.Activation.MetabaseSettingsIis.GetTransportSettings(String virtualPath) +203
       System.ServiceModel.Activation.MetabaseSettingsIis.GetAuthenticationSchemes(String virtualPath) +16
       System.ServiceModel.Channels.HttpChannelListener.ApplyHostedContext(VirtualPathExtension virtualPathExtension, Boolean isMetadataListener) +62
       System.ServiceModel.Channels.HttpTransportBindingElement.BuildChannelListener(BindingContext context) +158
       System.ServiceModel.Channels.BindingContext.BuildInnerChannelListener() +98
       System.ServiceModel.Channels.MessageEncodingBindingElement.InternalBuildChannelListener(BindingContext context) +98
       System.ServiceModel.Channels.BinaryMessageEncodingBindingElement.BuildChannelListener(BindingContext context) +70
       System.ServiceModel.Channels.BindingContext.BuildInnerChannelListener() +98
       System.ServiceModel.Channels.Binding.BuildChannelListener(Uri listenUriBaseAddress, String listenUriRelativeAddress, ListenUriMode listenUriMode, BindingParameterCollection parameters) +172
       System.ServiceModel.Description.DispatcherBuilder.MaybeCreateListener(Boolean actuallyCreate, Type[] supportedChannels, Binding binding, BindingParameterCollection parameters, Uri listenUriBaseAddress, String listenUriRelativeAddress, ListenUriMode listenUriMode, ServiceThrottle throttle, IChannelListener& result, Boolean supportContextSession) +400
       System.ServiceModel.Description.DispatcherBuilder.BuildChannelListener(StuffPerListenUriInfo stuff, ServiceHostBase serviceHost, Uri listenUri, ListenUriMode listenUriMode, Boolean supportContextSession, IChannelListener& result) +1070
       System.ServiceModel.Description.DispatcherBuilder.InitializeServiceHost(ServiceDescription description, ServiceHostBase serviceHost) +2005
       System.ServiceModel.ServiceHostBase.InitializeRuntime() +60
       Microsoft.IdentityModel.Protocols.WSTrust.WSTrustServiceHost.InitializeRuntime() +408
       System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout) +63
       System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) +560
       System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +141
       System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +683

    [ServiceActivationException: The service '/SecurityTokenServiceApplication/securitytoken.svc' cannot be activated due to an exception during compilation.  The exception message is: Method not found: 'System.String System.ServiceModel.Activation.Iis7Helper.ExtendedProtectionDotlessSpnNotEnabledThrowHelper(System.Object)'..]
       System.ServiceModel.AsyncResult.End(IAsyncResult result) +460
       System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +471
       System.Web.AsyncEventExecutionStep.OnAsyncEventCompletion(IAsyncResult ar) +101

    The issue is limited to Windows Server 2008 R2/ Windows 7 RTM machines only.

    The issue occurs due to previously installed hotfixes and NOT the security update KB2756920 itself.

    Recommendations

    • It is recommend that you Install a newer hotfix for 3.5 SP1 like http://support.microsoft.com/kb/2637518 and then install the security update. If you have already installed the security update then simply install the above hotfix.
    • Another workaround would be to upgrade the machines from Windows Server 2008 R2/Windows 7 RTM to SP1.

    You do not have to uninstall the security update as one of the above options will suffice the need.

    MS13-004: Description of the security update for the .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2: January 8, 2013

    UPDATE

    The issue caused by the update KB2756920 - Security update for the .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2 RTM and its solution has been documented in KB2801728 - WCF services that are hosted on IIS on Windows 7 or Windows Server 2008 R2 may receive an exception error message after you install an update for the .NET Framework 3.5 SP1 for WCF for reference.

    The cause section of the KB has been updated with:

    This problem occurs because the computer may have some hotfixes installed that contained only "System.ServiceModel.dll" and not "System.ServiceModel.WasHosting.dll". See the "More Information" section of the KB for a list of hotfixes that are known to contain only these files.

     

    Also see http://social.technet.microsoft.com/forums/en-US/sharepointadminprevious/thread/903d0e22-6419-48c5-8669-a1191c841b76

  • Potential Issues with KB 931125

     

    The KB 931125 package that was posted to Windows Update and WSUS on December 11, 2012, was intended only for client SKUs. However, the package was also offered for server SKUs. Because some customers reported issues after they installed the package on servers, the KB 931125 updates for server SKUs were expired from Windows Update and WSUS. We recommend that you sync your WSUS server and approve the expiry.

    Symptoms include:

    • Clients cannot login to Wireless networks that use IAS or NPS to authenticate users
    • VPN users cannot connect to Microsoft VPN servers or VPN servers that authenticate to IAS or NPS servers
    • Kerberos login failures
    • Exchange or Lync server problems with TLS
    • You may see symptoms described in KB 933430 or 2464556

    If you have already applied the update on a server and are encountering issues, you should use the Fix It solution in the following article in the Microsoft Knowledge Base:

    2801679 -  SSL/TLS communication problems after you install KB 931125

  • SharePoint 2010 Management Shell does not load with Windows PowerShell 3.0

     

    Let’s say that you install PowerShell 3.0 by by installing the Windows Management Framework (WMF) 3.0 from

    However, after you install WMF 3.0 and PowerShell, you may receive one or both of the following error messages when you start SharePoint 2010 Management Shell:

    1. The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered.
    2. A PlatformNotSupportedException occurred while trying to acquire the local farm: System.PlatformNotSupportedException: Microsoft 
      SharePoint is not supported with version 4.0.30319.586 of the Microsoft .Net Runtime.
      at Microsoft.SharePoint.Administration.SPConfigurationDatabase.get_Farm() at Microsoft.SharePoint.Administration.SPFarm.FindLocal(SPFarm& farm, Boolean& isJoined)

    Cause

    .Net 4.5 comes with PowerShell 3.0 which seems to break SharePoint 2010 PowerShell administration. That is because PowerShell 3.0 loads CLR 4.5 and
    SharePoint 2010 needs CLR 3.5 (AKA 2.0).

    How do you get around it:

    • Type "PowerShell -v 2" (without quotes). This loads PowerShell version 2, and you should be able to use it for SharePoint. Just type 'Exit' to get back to PowerShell v3
    • Add '-version 2.0' parameter when executing PowerShell 3.0, and SharePoint integration should work.
    • Change the Target field value for SharePoint 2010 Management Shell to the following:

    C:\Windows\System32\WindowsPowerShell\v1.0\PowerShell.exe -Version 2.0 -NoExit " & ' C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG\POWERSHELL\Registration\\SharePoint.ps1 ' "

    See KB 2796733

    Note: This is not an issue with Windows PowerShell. This is an issue with the SharePoint 2010 compatibility with PowerShell 3.0.

  • Windows PowerShell Command Builder 2.0 is here !!

     

     

    This is an updated version of the Windows PowerShell Command Builder

    Windows PowerShell Command Builder 2.0 constructs commands that can be used with SharePoint Foundation 2010, SharePoint Server 2010, SharePoint Foundation 2013, SharePoint Server 2013, SharePoint Online, and Office 365. Windows PowerShell Command Builder 2.0 provides many of the same capabilities as the previous Silverlight version such as offline access. In addition to providing support for SharePoint Server 2010, SharePoint Foundation 2010, and Office 365, this version also introduces support for SharePoint Server 2013, SharePoint Foundation 2013, and SharePoint Online.

    Click to open the Windows PowerShell Command Builder 2.0 in a new browser window

    Windows PowerShell Command Builder 2.0

    For more information about PowerShell in SharePoint, see Windows PowerShell for SharePoint 2013 IT pros

  • October 2012 Cumulative Update Package for WSS 3.0, MOSS 2007, SharePoint Foundation 2010 and SharePoint Server 2010 have been released

     

     

    October 2012 Cumulative Update Package for WSS 3.0 and MOSS 2007 have been released

    Note This is build 12.0.6668.5000 of the cumulative update package

    October 2012 Cumulative Update Package for SharePoint Foundation 2010 and SharePoint Server 2010 have been released

    Note This is build 14.0.6129.5000 of the cumulative update package.

    Important: SharePoint Server 2010 SP1 is a pre-requisite to install this CU.

    After installing the updated you should run the SharePoint Config Wizard in every server of the farm.

    After you install this hotfix, you must restart the User Profile Synchronization service for profile synchronization to function correctly or follow these steps:

    1. Go to the Central Administration page.
    2. In the System Settings section, click Manage Services.
    3. In the list of services that is displayed, find the User Profile Synchronization service, and then click Stop if the status of the service is Started. As soon as the status is Stopped, click Start, and provide the credentials to start the User Profile Synchronization service.
      For more information about how to start the service, go to the "Start the User Profile Synchronization service" section of
      How to configure profile synchronization in SharePoint Server 2010 

    Note: If SharePoint Server 2010 update is installed then you do not need to install the SharePoint Foundation 2010 update as it is included in the Server 2010 update.

    For more information, see

     

  • Issues Uploading Large Files To SharePoint

     

    To begin with, the Support for Large Files was one of the enhancements made in Windows SharePoint Services SP 1. By default, the maximum size for uploading files is set to 50 MB. The maximum file size that it can go up to is 2,047 megabytes.

    Now it is obvious that any cap on the maximum file size will stop the users from trying to upload larger files (including me!). Though SharePoint is meant to handle files that are up to 2 gigs in size, it is not practically feasible and not recommended as well.

    However, there are circumstances where files of much smaller size fail to upload which makes one wonder as to what could be the reason. Hence I decided to write this post for all those who have come across this issue and are looking for some options to work around it.

    On a SharePoint server (WSS 3.0, MOSS 2007, SharePoint Server 2010 or SharePoint Server 2013) when we upload any document larger that 50 megs on any document library, we can encounter the following error messages

    • "An unexpected error has occurred"
    • "The page cannot be displayed”
    • "An unknown error occurred"
    • "HTTP 404 – Page Not Found”
    • “Request timed Out’

    If you are using explorer view, the error message would be similar to

    Could not find this item --> This is no longer located \\Servername\DavWWWRoot\team. Verify the item's location and try again".

    Before we begin, I would like to mention that SharePoint is not really designed to handle huge files > 300 Mb). It stores all files in the content databases and that's where these large files are going. So I strongly recommend using file shares instead.

    Going ahead, this can occur due to various reasons and I have listed a few of the possible causes and the workarounds for them

     

    WORKAROUND(s)

     

     

    Method 1  Increase the maximum upload size for the web application

     

    Note : The default max single file upload size is 50 megs by default for a web application (in IIS 6.0) and 28 megs for IIS 7.0.

    1. Go to 'Start > All Programs > Administrative Tools > SharePoint Central Administration > Application Management'.
    2. Under SharePoint Web Application Management, click 'Web application general settings’.
    3. On the Web Application General Settings page, choose the appropriate web application.
    4. Under Maximum upload size, type the file size which you want to upload and click on OK. You can specify a maximum
      file size up to 2,047 megabytes.

     

          onb1plhz

    Note:

    Any upload size which is below 50 megs is enforced directly through web app settings. Above 50 megs, you need to make a some small change to the web.config file to allow larger uploads. Repeat the steps listed below for all zones for your web app all the servers which host the web application role.

    • Open the web.config from 'C:\Inetpub\wwwroot\wss\VirtualDirectories\<Virtual Directory>' folder and modify it as follows

    <httpRuntime maxRequestLength="51200" /> with <httpRuntime executionTimeout="999999" maxRequestLength="51200" />

    • Perform an IISReset and you should be good to go.

    See <httpRuntime> element in web.config for more information.   

      

    Method 2  Increase the connection time-out setting in IIS

    While uploading large files, there are chances that the request will timeout. By default, the IIS connection time-out setting is 120 seconds. Follow these steps to increase the connection time-out setting,

    • Click Start, point to All Programs, point to Administrative Tools, and then click Internet Information Services (IIS) Manager.
    • Right-click the virtual server that you want to configure, and then click Properties.
    • Click the Web Site tab. Under Connections, type the number of seconds that you want in the Connection time-out box,
      and then click OK.

    image

    image

     

    Method 3 Increase the maximum upload size in the web.config file of web application

    By default, the web.config file is located in the 'C:\Inetpub\Wwwroot\Wss\Virtual Directories\<Virtual Directory>' folder. Add the following configuration to the web.config, just before the <configuration> section closes out.

    Here’s a screenshot of the web.config file after the change:

    image

    This sets the value of the maxAllowedContentLength property to 52428800 (in bytes) for the web application only.

    See KB944981 - You cannot upload files that are larger than 28 MB on a Windows Server 2008-based computer that is running Windows SharePoint Services 3.0.

    Note:

    The following information is applicable to IIS 7.0 and suggests making a change to the ‘applicationhost.config’ file which is a core configuration file for IIS. For more information, see

    Error message when you visit a Web site that is hosted on a server that is running Internet Information Services 7.0: "HTTP Error 404.13 - CONTENT_LENGTH_TOO_LARGE".

    The maxAllowedContentLength property specifies the maximum length of content in a request in bytes and it needs to be set on a Windows Server 2008 computer that has IIS 7.0-only installations. To change the value of the property, do the following

    • Open command prompt and go to 'C:\windows\system32\inetsrv' directory
    • Run the below command

    appcmd set config /section:requestfiltering /requestlimits.maxallowedcontentlength:unit

    where the variable "requestlimits.maxallowedcontentlength" unit specifies the maximum length of content.

    For example, to specify 2000000000 as the maximum length of content, type the following at the command prompt, and then press ENTER:

    appcmd set config /section:requestfiltering /requestlimits.maxallowedcontentlength:2000000000

    • Perform an IISreset /noforce.

    • More info is available at

    Method 4 Increase the default chunk size for large files

    The large-file-chunk-size property sets the amount of data that can be read from server running SQL Server at one time.

    • If you have a file that is greater than your chunk size (such as 70 MB when the chunk size is set to 5 MB), the file would be read in 14 chunks (70 / 5).
    • The chunk size is not related to the maximum upload file size.
    • The chunk size simply specifies the amount of data that can be read from a file at one time. By default, the large-file-chunk-size property is set to 5 MB.
    • Check if the 'large-file-chunk-size' property is set or not

        Stsadm -o getproperty -propertyname large-file-chunk-size

    • In order to set the large–file–chunk–size property, we need to use the command line. This property is configured for a server or server farm, and cannot be configured for an individual web app server. To set this property, use the following syntax:

       Stsadm.exe –o setproperty –pn large–file–chunk–size –pv <size in bytes>

    More on this command is available at Large-file-chunk-size: Stsadm property (Office SharePoint Server) 

    • After making a change to this property, perform an IISreset /noforce.

     

    See What is the maximum value one can set for the Large-file-chunk-size ?

     

    Method 5  Add the executionTimeout value

     

     

    Increase the execution timeout for the upload page (upload.aspx) to prevent timeouts on the page. The default timeout for ASP.NET 2.0 is 110 seconds, so any uploads that are taking longer than that will result in a request failure. Add the executionTimeout value to web.config in the 'C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS' folder and the  ‘C:\Inetpub\wwwroot\wss\VirtualDirectories\<Virtual Directory>' folder.

    • Navigate to 'C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\LAYOUTS' folder on the SharePoint server.
    • Open the 'web.config' file in notepad or any other text editor and add the executionTimeout parameter. For example, replace the value as follows

    Existing code

    <location path="upload.aspx">
        <system.web>
          <httpRuntime maxRequestLength="2097151" />
        </system.web>
    </location>

    Replacement code

    <location path="upload.aspx">
        <system.web>
          <httpRuntime executionTimeout="999999" maxRequestLength="2097151" />
        </system.web>
    </location>

    • Open the 'web.config' file from the 'C:\Inetpub\wwwroot\wss\Virtual Directories\<Virtual Directory>'folder and modify it as follows

      Existing line :              <httpRuntime maxRequestLength="51200" />
      Replacement line :      <httpRuntime executionTimeout="999999" maxRequestLength="51200" />


    Modify the web.config located in "12\CONFIG" folder

     

    • Navigate to 'C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\CONFIG' folder on the SharePoint server and modify the 'maxRequestLength' property which by default is set to the following

      <httpRuntime
      maxRequestLength="51200"
      />

    • Open the 'web.config' file in notepad or any other text editor and modify the value to match the other web.config files
    • Save the file and perform an 'IISreset /noforce'.

     

    Antivirus Exclusions

    Make sure you have added Antivirus exclusions as per http://support.microsoft.com/kb/952167

    ASP.Net Session State

     

    • Open IIS manager, expand the 'Sites' node and select the SharePoint site
    • Click on 'Session State' under 'Application Development' and verify that the 'Timeout' value is set to '120' minutes

    You can also verify this from the web.config file

    xcdjfpqg

     

    What is ASP.Net Session

    ASP.NET session state enables you to store and retrieve values for a user as the user navigates the different ASP.NET pages that make up a Web application. HTTP is a stateless protocol, meaning that your Web server treats each HTTP request for a page as an independent request; by default, the server retains no knowledge of variable values used during previous requests. ASP.NET session state identifies requests received from the same browser during a limited period of time as a session, and provides the ability to persist variable values for the duration of that session.

    See ASP.NET Session State for more information

     

    Explorer view or Web client issues

    While trying to use the explorer view, you may see the following error despite making the aforementioned changes

    “Error 0x800700DF: The file size exceeds the limit allowed and cannot be saved” message

    If this is the case then the issue is most likely caused by a local restriction set on Web Client service. By default, Web Client file size limit is set to around 47 Mb. To increase this limit:

     

    • Click Start, click Run, type regedit, and then click OK.
    • In Registry Editor, locate the following registry key
      HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClientParameters
    • Right click on the FileSizeLimitInBytes and then click Modify.
    • In the Value data box, click on Decimal, and type 4294967295 and then click OK.
    • Quit Registry Editor
    • Restart Web Client service from Services.msc

     

     

    Large file Support Limitations

    The following features do not support files larger than 50 MB

    • Virus checking
    • Streaming files
    • Client-side restoration of smigrate backup files (limited to 2 GB). The manifest files for an smigrate backup cannot be larger than 2 GB (SPS)
    • Site templates (limit of 10 MB per site template, including content).

     

    NOTE:

    • As mentioned earlier, I would like to mention that SharePoint is not really designed to handle huge files > 300 Mb). It stores all files in the content databases and that's where these large files are going. So I strongly recommend using file shares instead.
    • Also be aware that increasing you upload file size to 2 GB has performance ramifications so it a user uploads a file and there is no memory available no new requests can be handled until the memory is available again.

    Additional Info