SharePoint 2010 anonymous access

To enable anonymous access in SharePoint 2010 the following steps will need to be completed.

It may look like there is a lot of steps to follow but it will only take a couple of minutes to complete and is actually very simple once you have learned the location of the required ribbon buttons:

1. Go to the Central Administration web application.
2. Select the Manage Web Applications option from the Application Management category.
3. Highlight the web application you wish you enable anonymous access on (i.e. SharePoint – 80) by clicking on the application row from the list but being careful not to click on the link text.  This will enable a number of new options on the ribbon bar.
4. From the ribbon bar choose the Authentication Providers button.
5. From the modal dialog pop-up check the Enable anonymous access option and hit the save button.
6. Now choose the Anonymous Policy ribbon button.
7. From the modal pop-up select the required zone and ensure that the Permissions are set to None and hit the save button.
8. Now browse to the root Site Collection of the web application to have anonymous access enabled.
9. Select Site Settings from the Site Actions drop down menu.
10. Select the Site Permissions link from the Users and Permissions category.
11. From the ribbon choose the Anonymous Access button.
12. From the modal pop-up select the level of anonymous action to be granted (i.e. Entire Web site) and hit the OK button to save.

Anonymous access should now be enabled.

Posted in Security, SharePoint 2010 | Tagged , | 1 Comment

The search request was unable to connect to the Search Service

I had an issue on a SharePoint 2007 server recently that wasn’t immediately obvious to me (it may well have been obvious to you however).

Whenever searching using the Microsoft Search product the following error would be returned immediately:

The search request was unable to connect to the Search Service

After a little bit of head scratching, checking options in Shared Services and checking of Application Poole accounts I was looking at the list of services in Windows Service Manager and noticed that the Office SharePoint Server Search service had stopped (unbeknown to me).  Restating this service fixed the issue immediately.

Happy days!

Posted in MOSS, Search, services, SharePoint, SharePoint 2010, Windows | Tagged , , , , | 1 Comment

Creating new CustomActionGroups for CustomAction items

I recently wanted to add some links to the Site Settings page of a SharePoint 2010 server when installing a custom feature.  By default there were seven groups available to choose from where I could place my feature related links, on my environment these were as follows:

  • Users and Permissions
  • Galleries
  • Site Administration
  • Site Collection Administration
  • Look and Feel
  • Site Actions
  • Reporting Services

When adding new links via a CustomAction it is possible to choose the location for the links by supplying a Location and GroupId attribute in the CustomAction XML.  In order to add links to the Site Settings page the Location attribute needs to be set to Microsoft.SharePoint.SiteSettings (a full list of available locations can be found by following the links at the end of this post).  Then the GroupId can be set to one of the predefined groups (i.e. SiteAdministration, SiteCollectionAdmin, UsersAndPermissions etc).

I did not however wish to add my links to any existing group, instead I wanted to create a brand new group relating to my new custom feature.  In order to create a new group it is possible to add a CustomActionGroup element to the feature’s Elements.xml file as follows.

Title =”Custom Feature Links”
Sequence=”1000″                                                                                   Location=”Microsoft.SharePoint.SiteSettings”

I think the attributes above are reasonably self-explanatory but the important thing to note is the Id attribute.  This is the value our CustomActions must use in order to be added to this new group, as follows:

Title=”Custom Feature Settings”>

When the above feature is activated a new group would be created in Site Settings called Custom Feature Links which would have one link beneath it called Custom Feature Settings which links to the /_layouts/CstmFeat/settings.aspx page.

The only other thing to note is that in SharePoint 2010 the CustomActionGroup element can take an ImageUrl attribute and this is the large icon that will be displayed next to the group, in this case on the Site Settings page.  It is possible to either use a custom image or reuse one of the existing images supplied with SharePoint.

The following links may be useful for further information about CustomAction and CustomActionGroup usage:
CustomAction Element
Default Custom Action Locations and IDs
CustomActionGroup Element (Custom Action)

Posted in MOSS, SharePoint, SharePoint 2010, XML | Tagged , , , | Leave a comment

SQL Management Studio – Supply specific windows credentials

I had an issue recently where I needed to connect to a SQL Server 2008 database using SQL Server Management Studio with a specific set of credentials via windows authentication.

You will no doubt have noticed that by default when a user selects windows authentication the username and password fields are greyed out and the username is populated with the user  account currently logged in to Windows.  This meant that I didn’t have access to the database that I required and I was unable to proceed unless I had a valid SQL Authentication account.

Having spent ten mins looking into this it turns out it is entirely possible to run SQL Management Studio from the command prompt and supply the username and password it should use.  Below is the command to do this:

>runas /user:DOMAIN\USERNAME “C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe”

Assuming the path is correct you will be prompted for the password associated with the account and if supplied correctly SQL Management Studio will open with the supplied details populated for windows authentication.

Very handy!

Posted in Security, SQL, SQL Server Management Studio, Windows | Tagged , , , | 8 Comments

HttpWebRequest and SSL

I had a problem recently with a custom SharePoint page attempting to perform a HTTPWebRequest on an SSL enabled site.  When taking a look at the event log it became clear that this was due to SSL certificate errors.

An operation failed because the following certificate has validation errors:\n\nSubject Name: CN=CERTIFICATENAME\nIssuer Name: CN=CERTIFICATENAME\nThumbprint: 3B3059FD6EEB4C3116658947159A1966EB9C50BB\n\nErrors:\n\n SSL policy errors have been encountered.  Error code ‘0x2’..

I had a number of events like this in the event log and after a little digging it turns out that this is due to mismatched security between the user that installed the SSL certificate and the user requesting the certificate.  You can see these certificate warnings in IE if you attempt to access some HTTPS addresses and it is necessary to confirm that you wish to proceed.

In code it is possible to ignore certificate errors and always return true.  This may or may not be desirable but can be implemented as follows:

HttpWebRequest httpReq = (HttpWebRequest)HttpWebRequest.Create(strUrl); ServicePointManager.ServerCertificateValidationCallback += delegate { return true; }; HttpWebResponse httpRes = (HttpWebResponse)httpReq.GetResponse();

This solved a problem that I was facing but it should be noted that ServicePointManager is an application setting so it may be worthwhile setting this when the application first starts.

I found Rick Strahl’s page extremely valuable when looking into this issue, so do take a look there for further info:

Posted in .Net, ASP.Net, C#, IIS, SharePoint, SharePoint 2010 | Tagged , , , , | 1 Comment

Easily Configure SSL Using Self Signed Certificates on IIS 7.0

Have you ever needed to run an SSL server in a development environment?  Or test validation against an SSL URL?  I know I have and fortunately it is extremely easy when using IIS 7.0 due to Self-Signed Certificates.

Configuring a development site to use SSL is just a case of creating a Self-Signed certificate within IIS (IIS > machine node >  Server Certificates > Create Self-Signed Certificate) and then adding an SSL binding to the desired website (IIS > website > Bindings > Add > select http, choose a port  and finally select the previously created SSL certificate).

Take a look at Scott Gu’s blog post with lots of screen shots for more info:

Posted in .Net, IIS, IIS 7 | Tagged , , , , | 1 Comment

SharePoint Base Content Type Hierarchy

Every now and again I need to remind myself of the SharePoint Content Type hierarchy and I have to go and search for it so I figured I should probably add it here for reference.

This is very useful information and critical to understand when working with Content Types in SharePoint. 

Having a good understanding how the Content Type GUIDs are constructed is also extremely useful because from the GUID you can quickly work out the line of descent.

The list below comes from:

This is also worth reading for further information regarding Content Type IDs:

Name ID
System 0x
Item 0x01
Document 0x0101
Event 0x0102
Issue 0x0103
Announcement 0x0104
Link 0x0105
Contact 0x0106
Message 0x0107
Task 0x0108
Workflow History 0x0109
Post 0x0110
Comment 0x0111
East Asia Contact 0x0116
Folder 0x0120
Posted in SharePoint, SharePoint 2010 | Tagged , , | Leave a comment

SharePoint – When list column IDs match site column IDs

Within SharePoint it is possible to create two different types of column/field, these are site columns and list columns.  Site columns are rather like templates which are created on a site root and can then be added to any lists within that site or child sites as a list column.  Alternatively it is possible to create a list column which will only exists on that particular list and is not based on a site column.

List columns which are based on site columns will maintain the site column ID. Columns are handled in a very similar manner to content types and any changes made at the site level can optionally be pushed down to the child columns, but be warned that this could potentially mean losing custom amends to individual list columns.

The quoted paragraph below sums it up nicely:

Updating Site Columns

If you make changes to a site column, you can update all the list columns based on that template. This is done by pushing down the changes you made to the site column. A list column retains the same column ID as the site column on which it is based; when you push down the changes to a site column, SharePoint Foundation identifies all the list columns based on that site column and updates them.

For more detailed information take a look here:

Posted in SharePoint, SharePoint 2010 | Tagged , , | Leave a comment

SharePoint Internal Field Names – SharePoint 2010

I noticed today that Frode has recently added a new blog post with an updated list of internal column names for SharePoint 2010.

I linked to Frode’s original blog post for MOSS 2007 a couple of years ago so it seemed like a good idea to link to this new list as it may well be useful to some.

The list of fields along with GUID and internal name information can be found below. For more information please checkout Frodes awesome list of SharePoint Column Field IDs – for SharePoint 2010.

My original blog post can be found by following this link:
SharePoint Internal Field Names

Continue reading

Posted in SharePoint, SharePoint 2010 | Tagged , , , , | 20 Comments

SQL 2008 Enterprise Unsupported Version with SharePoint 2010 RC

Over the last few months I’ve been playing with the various versions of SharePoint 2010 BETA on Windows Server 2008 R2.  Various hotfixes were required to get it installed and working but yesterday and today I’ve been installing the SharePoint 2010 RC and ran into a small issue with SQL 2008.   I thought it made sense to blog about this particular issue so that I can refer to it in the future and if it helps out anybody else then great.

It seems that SharePoint 2010 RC doesn’t like certain versions of SQL 2008 Enterprise.  This is the error I was running into immediately after installing SharePoint 2010 RC while attempting to run the SharePoint Products Configuration Wizard tool:

SQL server at SERVER_NAME has an unsupported version 10.0.2531.0.  Please refer to “; for more information on the minimum required SQL Server versions and how to download them.

In order to fix this I simply followed the link in the error message and then followed a child link to the following URL:

From here I was able to request the Cumulative update package 2 for SQL Server 2008 Service Pack 1 which contains almost twenty hotfixes.  I had to supply my email address and within a few minutes was sent a link where I could download it.  Once downloaded, unzipped (using the password that was emailed to me with the download URL) and installed, the server required a reboot after which I was able to continue running the SharePoint Products Configuration Wizard as expected.

Posted in SharePoint | 3 Comments