Showing posts with label SharePoint. Show all posts
Showing posts with label SharePoint. Show all posts

Tuesday, August 4, 2015

Windows Process Activation Service (WAS) encountered a failure when it started a worker process to serve the application pool.

If there are GPO in place, you should make sure service accounts have Log on as a Batch Job permissions

Because of this STS Token service - SecurityTokenServiceApplicationPool will not run or keeps stopping.
Central Admin site application pool keeps stopping

You will see the following error in the event log -

Windows Process Activation Service (WAS) encountered a failure when it started a worker process to serve the application pool.

Wednesday, July 1, 2015

Internet Explorer cannot display this feed - REST api not working in IE


If IE is responding correctly to REST api calls and you get a message like

Internet Explorer cannot display this feed

To fix the problem we need to disable feeds in IE. Go to the browser settings and select the Content tab, and click on the Feeds Settings button:


Then uncheck the "Turn on feed reading view" (it defaults to on, naturally).

This is for IE10. Other versions might look slightly different.




Friday, June 12, 2015

Cannot access Host Named Site Collection on a local server ( BackConnectionHostNames / DisableLoopbackCheck )

Method 1 (recommended): Create the Local Security Authority host names that can be referenced in an NTLM authentication request

To do this, follow these steps for all the nodes on the client computer:
  1. Click Start, click Run, type regedit, and then click OK.
  2. Locate and then click the following registry subkey:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0
  3. Right-click MSV1_0, point to New, and then click Multi-String Value.
  4. In the Name column, type BackConnectionHostNames, and then press ENTER.
  5. Right-click BackConnectionHostNames, and then click Modify.
  6. In the Value data box, type the CNAME or the DNS alias, that is used for the local shares on the computer, and then click OK.

    Note Type each host name on a separate line.

    Note If the BackConnectionHostNames registry entry exists as a REG_DWORD type, you have to delete the BackConnectionHostNames registry entry.
  7. Exit Registry Editor, and then restart the computer.

Method 2: Disable the authentication loopback check

Re-enable the behavior that exists in Windows Server 2003 by setting the DisableLoopbackCheck registry entry in the
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa registry
subkey to 1. To set the DisableLoopbackCheck registry entry to 1, follow these steps on the client computer:
  1. Click Start, click Run, type regedit, and then click OK.
  2. Locate and then click the following registry subkey: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
  3. Right-click Lsa, point to New, and then click DWORD Value.
  4. Type DisableLoopbackCheck, and then press ENTER.
  5. Right-click DisableLoopbackCheck, and then click Modify.
  6. In the Value data box, type 1, and then click OK.
  7. Exit Registry Editor.
  8. Restart the computer.
Using PowerShell:
New-ItemProperty HKLM:\System\CurrentControlSet\Control\Lsa -Name "DisableLoopbackCheck" -Value "1" -PropertyType dword

Unexpected response from server. The status code of response is 500. The status text of response is system.servicemodel.serviceactivationexception - When accessing TERM-Driven-page link on Term Store Management

If you encounter this weird error message while accessing TERM-Driven-page link on Term Store Management, don't get panic.. the solution is very simple :-)

'iisreset /noforce' 

Happy Sharepointing!

Wednesday, January 22, 2014

'DisableLoopbackCheck' to fix - Error: Access is denied. Verify that either the Default Content Access Account has access to this repository .........


Error:
Access is denied. Verify that either the Default Content Access Account has access to this repository, or add a crawl rule to crawl this repository. If the repository being crawled is a SharePoint repository, verify that the account you are using has "Full Read" permissions on the SharePoint Web Application being crawled.

Root Cause :
This issue occurs when the Web site uses Integrated Authentication and has a name that is mapped to the local loopback address.

This is because your operating system(Windows 2008 in my case) include a loopback check security feature that is designed to help prevent reflection attacks on your computer. Therefore, authentication fails if the FQDN or the custom host header that you use does not match the local computer name.

Resolution:
Following instructions would disable the LoopBackRequest in registry. 

1. Run regedit.exe from the command prompt
2. In the registry editor navigate to "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa"
3. Right click on "Lsa" and create a new 32bit DWORD value called DisableLoopbackCheck
4. Right click  and Modify the value of "DisableLoopbackCheck" as "1"
6. Close the registry editor.

You may now restart the crawl and hopefully it will work.

Monday, April 15, 2013

One or more field types are not installed properly. Go to the list settings page to delete these fields.

This errors occurs when using CAML query with display names rather than internal names.

Solution is to use the internal name in the query. You can find out the internal names of the list columns using SharePoint Manager (http://spm.codeplex.com/releases/view/51438)

Happy coding!

Sunday, April 7, 2013

An update conflict has occured, you must re-try this action again.The object SPProcessIdentity was ...

Error :
An update conflict has occured, you must re-try this action again.The object SPProcessIdentity was ...
This error occurs when any timer job task is underway and it is preventing another task. For example when you are configuring service accounts I got this error.
The solution is to clear and reset the SharePoint timer job 'Cache' by doing following steps: 
  1. Stop the Windows SharePoint Services Timer service (Found in Windows Services)
  2. Navigate to the cache folder
    In Windows Server 2008, the configuration cache is in the following location:
    Drive:\ProgramData\Microsoft\SharePoint\Config
    In Windows Server 2003, the configuration cache is in the following location:
    Drive:\Documents and Settings\All Users\Application Data\Microsoft\SharePoint\Config
    Locate the folder that has the file "Cache.ini"
    (Note: The Application Data folder may be hidden. To view the hidden folder, change the folder options as required)
  3. Back up the Cache.ini file.
  4. Delete all the XML configuration files in the GUID folder. Do this so that you can verify that the GUID folder is replaced by new XML configuration files when the cache is rebuilt.
  5. Note When you empty the configuration cache in the GUID folder, make sure that you do not delete the GUID folder and the Cache.ini file that is located in the GUID folder.
  6. Double-click the Cache.ini file.
  7. On the Edit menu, click Select All. On the Edit menu, click Delete. Type 1, and then click Save on the File menu. On the File menu, click Exit.
  8. Start the Windows SharePoint Services Timer service
  9. Note The file system cache is re-created after you perform this procedure. Make sure that you perform this procedure on all servers in the server farm.
  10. Make sure that the Cache.ini file in the GUID folder now contains its previous value. For example, make sure that the value of the Cache.ini file is not 1.

Saturday, March 16, 2013

Wednesday, January 9, 2013

Options to refresh the content in Staging with Production environment


  1. Use STSADM -o backup/restore
  2. Use STSADM -o export/import
  3. Use Content Deployment Wizard, you can download it from CodePlex SharePoint Content Deployment Wizard 
When you use backup/restore, you get everything - including recycle bin content, running workflows, alerts etc. This may or may not be what you want. Such 'environment-specific' things are not captured in 2 and 3 - the principle difference between 2 and 3 is that you can specify you wish all the objects (e.g. lists) to keep the same IDs. Any customizations made in the 12 or 14 hive  folder, none of these options would capture these. Such customization would need to be deployed  using WSP packages separately.

Wednesday, December 5, 2012

Get-SPDatabase – How to see the SharePoint content DB size

Get-SPDatabase | ForEach-Object {$db=0} {$db +=$_.disksizerequired; $_.name + " - " + $_.disksizerequired/1024/1024} {Write-Host "`nTotal Storage (in MB) =" ("{0:n0}" -f ($db/1024/1024))}

image
Get-SPDatabase | Sort-Object disksizerequired -desc | Format-Table Name, @{Label ="Size in MB"; Expression = {$_.disksizerequired/1024/1024}}

Get-SPContentDB

Friday, November 2, 2012

User Information List– the hidden list in SharePoint


User info list can be accessed using following URLs. This is a hidden list there is no out of the box option to edit or delete the users from here. Initially I thought it requires custom solution to delete the users from here.

Simple view : ../_catalogs/users/simple.aspx
Detail view: ../_catalogs/users/detail.aspx

However if you delete the user from ‘People and Groups’ (All people view) using the following URL user info list also reflects it :-)

_layouts/people.aspx?MembershipGroupId=0&FilterField1=ContentType&FilterValue1=Person

Tuesday, February 28, 2012

HTTP 503-Service Unavailable error in SharePoint - HTTPERR log

C:\WINDOWS\system32\LogFiles\HTTPERR

HTTP/1.1 GET / 503 565877983 Disabled

The above problem can be fixed by recyling the associated application pool and restting IIS.

Custom timer job stuck in Initialized state - Solved

1. Stop Windows SharePoint Services Timer on Windows Services
2. Go to ‘C:\Documents and Settings\All Users\Application Data\Microsoft\SharePoint\Config’ on front-end server
3. Clear xml files from the above folder.
4. Open cache.ini file and restart the number into ‘1’
5. Start Windows SharePoint Services Timer on Windows Services

The above steps clear SharePoint Config cache and allow the timer jobs to run properly

Sunday, February 14, 2010

Enabling IntelliSense in Visual Studio to author a custom feature easily

Inside the TEMPLATE directory there is a directory named XML that contains several XML schemas, including one named wss.xsd. If you associate this schema file with feature files such as feature.xml and elements.xml, Visual Studio will provide IntelliSense, which makes it much easier to author a custom feature. You may also copy these XSD files into C:\Program Files\Microsoft Visual Studio 8\Xml\Schemas\.

Programming Against the WSS Object Model

 

Another important aspect of WSS development is programming against the WSS object model. The core types provided by the WSS programming model are exposed through a standard WSS assembly named Microsoft.SharePoint.dll.

Let’s look at a simple example. Imagine you have just created a console application, and you have added a reference to Microsoft.SharePoint.dll. The WSS object model exposes an SPSite class that serves as an entry point into the WSS object model at the site collection level. Each site within a site collection is represented as an SPWeb object. Each list within a site is represented as an SPList object. Here’s a simple example using the WSS object model to access the top-level site within a target site collection and discover all its lists.

using Microsoft.SharePoint;
namespace Hello_WSS_OM {
  class Program {
    static void Main() {
      string sitePath = "http://litwareinc.com";
      // enter object model through site collection.
      SPSite siteCollection = new SPSite(sitePath);
      // obtain reference to top-level site.
      SPWeb site = siteCollection.RootWeb;
      // enumerate through lists of site
      foreach (SPList list in site.Lists) {
        Console.WriteLine(list.Title);
      }
      // clean up by calling Dispose.
      site.Dispose();
      siteCollection.Dispose();
    }
  }
}

You should observe the two calls to the Dispose method at the end of this code example. Several object types in the WSS object model, such as SPSite and SPWeb, use unmanaged resources and must be disposed of in a timely manner. If you fail to do this and simply rely on the garbage collector of the .NET Framework to reclaim memory, your code can cause problems by consuming far more memory than it needs. As a rule of thumb, when you create a disposable object, you are also responsible for calling Dispose on it. However, object references obtained through the WSS Web application’s SPContext should not be disposed.

The STSADM.EXE Command Line Utility

WSS ships with a handy command-line utility named STSADM.EXE. This utility allows you to run interactive commands from the Windows command line and to script batch files that accomplish administrative tasks such as creating, backing up, and restoring site collections. When you run this utility from the command line or from a batch file, you must pass the –o parameter followed by one of the supported operations. Here’s an example of a command line instruction to create a new site collection at a specific URL.
STSADM.EXE –o CreateSite –url http://localhost/sites/Sales
                         -ownerlogin LitwareServer\BrianC
                         -owneremail brianc@litwareinc.com
                         -sitetemplate STS#0
Note that this example has introduced line breaks between the parameters to make things more readable. However, you cannot actually use line breaks between the parameters when running the STSADM utility from the command line or from a batch file.
Keep in mind that the installation of WSS adds the STSADM.EXE utility to a WSS system directory deep within the Windows Program Files directory. If you want to be able to call this utility directly from the command line on your development workstation, you should add the following path to your configured System path.
c:\program files\common files\microsoft shared\web server extensions\12\bin\
When you write a batch file, you should also assume that it might be run on a machine that does not have the proper System path configured. Therefore, you should write batch files that explicitly specify the location of the STSADM.EXE utility.
@SET STSADM="c:\program files\common files\microsoft shared\
             web server extensions\12\bin\stsadm"

%STSADM% –o CreateSite –url http://localhost/sites/Sales
                         -ownerlogin LitwareServer\BrianC
                         -owneremail brianc@litwareinc.com
                         -sitetemplate STS#0

The WSS Decoder Ring - WSS Object Model confusion

When developers begin to use WSS, there is often confusion surrounding different terminology used between WSS and its version 1.0 predecessor SharePoint Team Services (STS). For example, the WSS term Site Collection is the equivalent of the old STS term Site. The new WSS term Site is the equivalent of the old STS term Web. The new WSS term Top-level Site is the equivalent of the old STS term Root Web.
Though the WSS team has been consistent using the new WSS terminology in the product documentation, there are still many places that use the term Web when you expect Site and that use the term Site when you expect Site Collection.
For example, the names of classes in the WSS object model are based on the old STS terms. As a result, you program against a site collection using an SPSite object, and you program against a site using a SPWeb object. An SPSite object provides a public property named RootWeb that returns an SPWeb object representing the site site. Once you understand this potential point of confusion, getting up to speed on various aspects of WSS becomes less confusing.

SharePoint Terminology

To help you familiarize yourself with the SharePoint vocabulary:

Application page. Allows the use of inline custom code. Application pages or "_layout" pages are stored on the SharePoint Web server and made available via a Microsoft Internet Information Services (IIS) virtual directory. Though application pages behave much like other ASPX pages and allow the use of inline custom code, they differ from content pages in that they cannot be used to host SharePoint features such as dynamic Web Parts and Web Part zones.

Content type. A reusable collection of settings to apply to a certain category of content such as documents and folders. Content types are designed to help users organize their SharePoint content in a more meaningful way.

Custom action. Represents a link, toolbar button, menu item, or any control that can be added to a toolbar or menu that appears in the UI. You define custom actions by using a custom action element within a feature definition file. You can bind custom actions to a list type, content type, file type, or programmatic identifier (ProgID).

Event receiver. Evaluator of an event and definer of the behavior of an application. Windows SharePoint Services 3.0 allows you to define event handlers within libraries, lists, and sites. Event receivers can be defined by using a receiver element within a feature definition file.

Feature. A package of Windows SharePoint Services elements that can be activated for a specific scope and that helps users accomplish a particular goal or task. Windows SharePoint Services 3.0 introduces this inherently portable and modular functionality, which simplifies modification of sites through site definitions.

Master page. Pages that provide a consistent layout and appearance (look and feel) for SharePoint sites. They allow you to factor out layout, structure, and interface elements such as headers, footers, navigation bars, and content placeholders. Master pages in ASP.NET 2.0 and master pages in Windows SharePoint Services work in the same way.

Module. A file or collection of file instances that define the location where the files are installed during site creation. Modules are frequently used to implement a Web Part Page in the site. You can define modules by using a module element within a feature definition file.

SharePoint site: A Web site hosted in a virtual URL. A SharePoint site is a place for collaboration, communication, or content storage. Depending on your business needs, you can create sites such as team sites, blog sites, wiki sites, and others. You can customize a site's appearance, users, user permissions, galleries, and site administration by using the Site Settings administration pages.

SharePoint site collection: A collection of SharePoint sites that share common administration pages and site settings. Site collections allow you to share content types, site columns, templates, and Web Parts within a group of SharePoint sites.

SharePoint Web farm: A group of Office SharePoint 2007 servers that share the same configuration database. All site content and all configuration data is shared for all front-end Web servers in a server farm.

Site definition. A set of files that includes a master XML configuration file that is stored on all front-end Web servers. A site definition provides the basic blueprint for how sites look, what lists they include, their default navigational structures, and so on.

Site template. A package containing a set of differences and changes from a base site definition that is created through the UI or through implementation of the object model. The site template package is stored as a .cab-based file that can be downloaded or uploaded to site collections by users with the appropriate rights. Site templates offer a measure of portability to SharePoint applications.

Solution. A file that is a bundling of all the components for extending Windows SharePoint Services in a particular way. A solution file has a .cab-based format with a .wsp extension. A solution is a deployable, reusable package that can contain a set of Features, site definitions, and assemblies that apply to sites, and that you can enable or disable individually. You can use the solution file to deploy the contents of a Web Part package, including assemblies, class resources, and other package components.

Theme. A group of files (CSS, images) that allow you to define the appearance (look and feel) of Web pages. Themes in ASP.NET 2.0 and themes in SharePoint Products and Technologies work in the same way. Themes are used to help organizations to brand their portals and team sites. Office SharePoint Server 2007 includes a set of predefined themes. However, as a developer, you can create custom themes for your company.

SharePoint Technologies Overview







Overview

SharePoint Products and Technologies provide an extensible solution platform for the professional Microsoft .NET developer, and offer a wide array of built-in features and application hosting using well-known .NET development tools and technologies. SharePoint Products and Technologies offer a manageable and scalable server platform that employs the benefits of the 2007 Microsoft Office system client for hosting applications on an internal or Internet Web site.

The.NET developer creates Web-based solutions by using the Web development platform of ASP.NET. ASP.NET allows you to build Web-based solutions by using managed code. The ASP.NET page framework also provides new Web platform capabilities, features, and enhancements such as master pages, Web part controls, and data source controls.

Marrying the advantages and power of both platforms, with the release of the 2007 Microsoft Office system, Microsoft provides products and technologies such as Windows SharePoint Services 3.0 and Microsoft Office SharePoint Server 2007 that are built on top of ASP.NET 2.0. Now you, the professional .NET developer, can use your knowledge of .NET technologies to develop on the SharePoint platform to create a new set of Web solutions.

The goal of this article is to introduce you to some of the most powerful SharePoint development features. This article walks you through key concepts, developer terms, developer components used to build enterprise solutions, and pointers to resources to help you get started learning about SharePoint development. It also explores tools you can use to create solutions by using SharePoint Products and Technologies.

Benefits Offered to .NET Developers

SharePoint Products and Technologies introduce a number of benefits that help not only developers and the solutions they build, but also individual users and organizations of all sizes.

SharePoint Products and Technologies offer additional overall benefits to .NET developers. Highlights of these benefits include the following:

A familiar development environment for .NET developers. Windows SharePoint Services 3.0 is built entirely on ASP.NET, so you use the same familiar .NET Framework and .NET languages, the same .NET Framework and ASP.NET class libraries, and the same development tools.

Built-in features that developers can extend. Windows SharePoint Services 3.0 adds foundational components that are valuable for creating Web-based applications such as a Web Part framework, data lists, document libraries, a workflow engine, and Web site templates. Office SharePoint Server 2007 adds major application features on top of Windows SharePoint Services 3.0. These include user site provisioning, business intelligence features, forms services, enterprise content management, integrated search, and social networking features. All of these features can be extended by developers to implement something as simple as a Web dashboard to a complex line-of-business (LOB) application.

The best integrated server for Office applications. If you need to store documents as part of your Web application, Office SharePoint Server 2007 is the answer. Office client applications including Word, Excel, Outlook and InfoPath can be easily used as part of an enterprise solution built on SharePoint.

The foundation for a wide variety of Intranet or Internet applications. For end users, SharePoint Products and Technologies have numerous easy-to-use and desirable features. For developers, SharePoint Products and Technologies is a platform to build on. Because when you develop on the SharePoint platform you are building on the same application foundation that SharePoint uses for end user functionality, the applications that you can create have a consistent common look, and can be managed in a consistent way. If a company already has SharePoint deployed, it is easy to add applications to the existing deployment.

What are SharePoint Products and Technologies?

SharePoint Products and Technologies provide a foundation for collaboration, business intelligence, enterprise content management, people and personalization services, Enterprise Search, integration of LOB data, and processes.

SharePoint Products and Technologies include the following:

Windows SharePoint Services 3.0. A set of services for collaboration and a foundation for building Web-based applications on Windows Server. Windows SharePoint Services 3.0 is included in Windows Server 2003 and in Windows Server 2008, and is also available separately as a download.

Microsoft Office SharePoint Server 2007. A single, integrated application that provides sites (locations) where employees can efficiently collaborate with team members, find organizational resources, search for experts and corporate information, manage content and workflow, and make use of business insight to reach better-informed decisions. Office SharePoint Server 2007 is part of the 2007 Microsoft Office system. For more information, see the Microsoft Office SharePoint Server 2007 frequently asked questions.

Microsoft Office SharePoint Designer 2007. A designer and developer tool that enables you to quickly build solutions that include both design and workflow.

Windows SharePoint Services 3.0 and Office SharePoint Server 2007 are built on top of the ASP.NET 2.0 Framework and the Microsoft .NET 3.0 Windows Workflow Foundation (WF) as shown in Figure.

Source :
http://msdn.microsoft.com/en-gb/library/cc537498.aspx#MOSSIntroToNet_Overview