Quantcast
Channel: and so it begins…..

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

0
0

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.

SharePoint – Key Descriptions

0
0

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:

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

0
0

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.

Retrieve the list of Content Types in MOSS 2007 using PowerShell

0
0

 

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
}
}
}

Service Pack 2 and the June Cumulative Update

0
0

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.

Work Management Service Application

0
0

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

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

0
0
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
}
}
}

Default Site Templates in SharePoint Server 2010


Upgrading from WSS 2.0 to SharePoint 2013

0
0

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.

October Cumulative Updates for SharePoint 2013

0
0

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





Latest Images