Error while connecting to a SharePoint 2010 web site in SharePoint Designer 2010

 

Today I got this error:

SPDError-3

(“The server could not complete your request. For more specific information, click the Details button.”)

I clicked the “Details” button as commanded.

SPDError-4

(“Below is the message that the server returned. For more information, contact your Internet service provider or web server administrator.”)

I asked myself (because I’m the web server administrator in this case) – I had no answer for me.

I clicked: “OK” and “OK” and got:

 SPDError-5

(‘An error occurred while trying to fetch data from your SharePoint site. Unexpected response from the server. The content type type of the response is “” This status code is “OK”.’)

“OK”??????????? Okay…

I read the event viewer log:

SPDError-1

WebHost failed to process a request.
 Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/64923656
 Exception: System.ServiceModel.ServiceActivationException: The service '/_vti_bin/client.svc' cannot be activated due to an exception during compilation.  The exception message is: Security settings for this service require Windows Authentication but it is not enabled for the IIS application that hosts this service.. ---> System.NotSupportedException: Security settings for this service require Windows Authentication but it is not enabled for the IIS application that hosts this service.
   at System.ServiceModel.Channels.HttpChannelListener.ApplyHostedContext(VirtualPathExtension virtualPathExtension, Boolean isMetadataListener)
   at System.ServiceModel.Channels.HttpTransportBindingElement.BuildChannelListener[TChannel](BindingContext context)
   at System.ServiceModel.Channels.BindingContext.BuildInnerChannelListener[TChannel]()
   at System.ServiceModel.Channels.MessageEncodingBindingElement.InternalBuildChannelListener[TChannel](BindingContext context)
   at System.ServiceModel.Channels.WebMessageEncodingBindingElement.BuildChannelListener[TChannel](BindingContext context)
   at System.ServiceModel.Channels.BindingContext.BuildInnerChannelListener[TChannel]()
   at System.ServiceModel.Channels.Binding.BuildChannelListener[TChannel](Uri listenUriBaseAddress, String listenUriRelativeAddress, ListenUriMode listenUriMode, BindingParameterCollection parameters)
   at 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)
   at System.ServiceModel.Description.DispatcherBuilder.BuildChannelListener(StuffPerListenUriInfo stuff, ServiceHostBase serviceHost, Uri listenUri, ListenUriMode listenUriMode, Boolean supportContextSession, IChannelListener& result)
   at System.ServiceModel.Description.DispatcherBuilder.InitializeServiceHost(ServiceDescription description, ServiceHostBase serviceHost)
   at System.ServiceModel.ServiceHostBase.InitializeRuntime()
   at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.ServiceHostingEnvironment.HostingManager.ActivateService(String normalizedVirtualPath)
   at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)
   --- End of inner exception stack trace ---
   at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)
   at System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath)
 Process Name: w3wp
 Process ID: 7248

…………….. It was my mistake. ………………………….

An hour before I configured my SharePoint Site to use KERBEROS. – In the IIS I configured the Web application “Authentication” settings: I choose the provider “Negotiate” but I also removed “NTLM”. This was my fault.

This is the correct setting:

SPDError-6

The definitive guide of How to configure the SharePoint 2010 User Profile Service Application

I took me hours and hours to get to User Profile Service Application working.

These are the steps I’ve done in some scenarios.

Especial to migrate an SharePoint 2007 profile database to SharePoint 2010.

0. The databases for the User Profile Service Application must run on the standard instance of SQL Server. NEVER use a named instance. – Always use SQL Aliases instead!!!

1. (Skip this next step if you don’t need to migrate.) Backup the Shared Service Provider Database of your MOSS farm.

2. Restore the farm to your destination SQL Server instance and with the destination database name, e.g. “SP_SvcApp_UserProfile_Profiles”.

(In the MOSS farm the database was named “MOSS_SSP_Config” !!! –> It’s the configuration database of the Shared Service Provider.)

3. Create the User Profile Service Application with this PowerShell script:

#region Check x64 host
if( [System.IntPtr]::Size -ne 8) {
  Write-Error "Please use a x64 PowerShell host!"
  return
}
#endregion

#region Load SharePoint SnapIn and DLL
  Remove-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
  Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

  [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")  | out-null    

  #Check available SharePoint Cmdlets
  if( (Get-Command -Noun SPWeb*) -eq $null ) {
    Write-Error "SharePoint SnapIn not loaded. SharePoint cmdlets missing!"
    return
  }
#endregion

cls

######################################################################################################

# Profile database in my MOSS farm : MOSS_SSP_CONFIG 

#---------------------------------------------------------------------------
# Settings

$farmname = "SP"

$spfarmuser='DOMAINsp_farm'
$spfarmpwd='passwort1#'
$mysiteHostLocation = "http://mysite.sharepoint.local"
$mysiteManagedPath = "/personal"

#---------------------------------------------------------------------------

$spfarmcredentials = new-object -typename System.Management.Automation.PSCredential -argumentlist $spfarmuser, (ConvertTo-SecureString $spfarmpwd -AsPlainText -force)
$userprofileAppProfileDBName =("{0}_SvcApp_UserProfile_Profiles" -f $farmname)
$userprofileAppProfileSyncDBName =("{0}_SvcApp_UserProfile_Sync" -f $farmname)
$userprofileAppProfileSocialDBName =("{0}_SvcApp_UserProfile_Social" -f $farmname)
$svcAppPool=("{0}_AppPool_UserProfile" -f $farmname)

# Create application pool
$appPool = (Get-SPServiceApplicationPool -Identity $svcAppPool -ErrorAction SilentlyContinue)
if( $appPool -eq $null ) {
  $appPool = (New-SPServiceApplicationPool -Account $spfarmuser -Name $svcAppPool)
}

$userProfileSvcApp = (Get-SPServiceApplication  | ? { $_.TypeName -eq "User Profile Service Application" })

# Create service application
if( $userProfileSvcApp -eq $null ) {
  $userProfileSvcApp = (New-SPProfileServiceApplication -ApplicationPool $appPool -MySiteHostLocation  $mysiteHostLocation `
                          -MySiteManagedPath $mysiteManagedPath -ProfileDBName $userprofileAppProfileDBName `
                          -ProfileSyncDBName $userprofileAppProfileSyncDBName -SocialDBName $userprofileAppProfileSocialDBName `
                          -Name "User Profile Service Application" -SiteNamingConflictResolution "None" -Verbose)
}

# Create application proxy
$proxy = (Get-SPServiceApplicationProxy | ? { $_.Name -like "User Profile Service Application Proxy" } )
if( $proxy -eq $null ) {
  $proxy = (New-SPProfileServiceApplicationProxy -DefaultProxyGroup -Name "User Profile Service Application Proxy" -ServiceApplication $userProfileSvcApp)
}

 

During the creation of the User PRofile Service Application the MOSS database will be migrated!!

If you did no restore previously the profile database will be created in this step.

4. The farm account must be local admin on the farm server.

5. Go into the SQL Server Management Studio.

6. Set the farm account – in my example “sp_farm” – as SYSADMIN in your SQL Server instance.

7. Edit the User Logins for the (migrated) profile database.

The farm account should exist as login. – If not: add the account as “db_owner”.

Important: Set the schema for the farm account to “dbo”!

8. In the Windows Services Manager (Server Manager): restart a services that has the farm account as identity. OR restart the server!

9. Now: Log on locally with the farm account!! – Yes: logon with the farm account!

10. As farm account: go into the Central Administration –> Manage Services on Server –> Start the User Profile Synchronization service!

11. WAIT!

12. Press F5 on the “Managa Services on Server” page. Maybe wait some more Smile. Have a look into the the SharePoint log. You should find lots of message. Search for “ILM” (using ULSViewer of course).

13. Sometimes – if you are a lucky person – the “User Profile Synchronization” service is startet. – Maybe not. In this case: Start over! – Last time it took me three times to get it working!

14. At the end: remove the farm account from the SYSADMIN group!

[Update / 01/26/2011]

15. Don’t forget to reset the Security Settings (“Administrators”) for the User Profile Service Application after you recreated them. – Go into the Central Administration -> Manage Service Applications -> select your User Profile Service Application -> click “Administrators” in the Ribbon. – You may find this empty!!! This is not correct. Insert here at least the farm account with “Full Control” permissions. And don’t forget to insert the search crawl account with “Retrieve People Data for Search Crawlers” permissions. Otherwise your People Search will not work!

Please give me feedback on this! – The configuration of the User Profile Services Application is a incredible mess.