Yesterday I was confronted with the issue of a changed My Site Url. The client had asked to change http://mysite to https://mysite.customer.com.
The first step is to recreate the Web Application with the new primary Url and set up IIS (certificates). You could extend but they didn't require multiple zones so we didn't do that.
Then you have to go into the User Profile Service Application and change the My Site Host Url. That's easy as well.
Don’t forget to update the Search Content Sources (http://mysite and sps3://mysite).
At this point we were receiving issues on the Activity Feed:
SPSocialFeedManager.GetFeedFor: Exception: System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 192.168.0.117:80
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
at Microsoft.SharePoint.Client.ClientRequest.ExecuteQueryToServer(ChunkStringBuilder sb)
at Microsoft.Office.Server.Social.SPSocialFeedManagerProxy.ExecuteQuery[T](Func`1 func)
at Microsoft.Office.Server.Social.SPSocialFeedManagerProxy.Microsoft.Office.Server.Social.ISocialFeedManagerProxy.ProxyGetFeedFor(String actorId, SPSocialFeedOptions options)
Somewhere a reference to the 'old' MySite Url was still kept. After a bit of digging it appeared to be in the User Profiles themselves. The 'Feed service provider defined identifier' property (internally known as SPS-FeedIdentifier) pointed to the old absolute MySite Url.
Nothing a quick PowerShell script can't fix:
$mshUrl = "https://mysite.customer.com"
$site = New-Object Microsoft.SharePoint.SPSite($mshUrl)
$context = [Microsoft.Office.Server.ServerContext]::GetContext($site)
$upm = New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager($context)
$profiles = $upm.GetEnumerator()
foreach ($profile in $profiles)
if ($profile["SPS-FeedIdentifier"] -ne $null)
$profile["SPS-FeedIdentifier"].Value = $profile["SPS-FeedIdentifier"].Value.Replace("http://mysite", $mshUrl);
After this the Activity Feed works again.