Strange thing

May 18, 2012 at 9:46 PM

I was able to get the control working on my dev.intranet.com site no problems, but I have another web application on the farm called dev.collaboration.com that throws the following error:

 

DelegateControl: Exception thrown while building custom control 'Microsoft.SharePoint.SPControlElement': Could not load type 'MyLinksMenu.ControlTemplates.MyLinksUserControl'.

 

So it works on one web app but not another.  Any ideas?

May 19, 2012 at 6:29 AM

It sounds like the assembly reference hasn't been added to the web.config file for that web application. The reference has to be manually added to the web.config file for each web application, and if there are multiple WFE servers, it needs to be manually added to all them. This will change soon when I add in the patch provided by ogmandrake.

May 21, 2012 at 1:38 PM

OK, thanks!  I will look into that and look forward to the patch.  Again, good work.

May 21, 2012 at 6:20 PM

I've adjusted the web.config entry.  The errors went away, but when the page loads the control is missing on the collaboration site.  The same control code is on the masterpage of both sites.

 

<SharePoint:DelegateControl runat="server" ID="GlobalDelegate0" ControlId="GlobalSiteLink0" />

 

Any ideas why it would be missing?

May 21, 2012 at 6:42 PM

um, sorry.  I'm an idiot.  I forgot to activate the feature on that site. :D

May 23, 2012 at 5:46 PM

No problem, I'm glad to hear you got it working.

May 23, 2012 at 7:18 PM

Sorry to have to bug you, but i've gotten this working in dev for all web apps, however; our QA environment is just like dev except the web apps are on load balanced servers, with search on an index server

I can't get the control to show up in QA.  I'm seeing a div on the page get rendered with an ID="MyLinksMenuRoot" but nothing after that except the closing div

I've checked the ULS logs to no avail.  The solution is globally deployed, and activated on the sites.  I'm not sure why I don't see the control like I do in dev.

I was wondering what I can filter in the ULS that may clue me into what error is happening.  (The assembly entries have been added to all web.configs)

May 23, 2012 at 8:36 PM

It sounds like the control is installed correctly, otherwise the root div would not be rendered at all. The only thing I can think of that would cause this to happen is if the current user's profile could not be loaded. Can you check to make sure the User Profile service application is provisioned and running? You could also look for user profile errors in the logs.

May 24, 2012 at 12:25 AM

I was thinking the same thing, but it looks like all the users are there and I check a few and looks like all the properties are correct.  I then started combing the ULS logs for errors in the User Profile. I didn't find any there but I did run across messages saying

"Failed to open the file 'C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Resources\MyLinksMenu.en-US.resx'." 

and

Failed to read resource file "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Resources\MyLinksMenu.en-US.resx" from feature id "(null)".

 

I looked and the resource files are there.  Not sure why that second message has the feature id set to null, unless it was from a previous attempt to get this to work that didn't get removed cleanly.

 

Also of note, there are these two messages repeated about five times a piece in the same time frame.  I'm also running your build from today.

Thanks for your thoughts.

May 24, 2012 at 4:33 PM

The resource file error is not likely related. However, I just posted an updated solution that should stop that error from occurring.

Each content database maintains its own user store that's synced with the central User Profile service, so a user's information will still be displayed even when the User Profile service isn't running. Can you verify that the User Profile service is listed as "started" in Central Admin->System Settings->Manage services on server?

Also, after you've updated the solution you can try appending ?ShowMyLinksLoadTime=1 to your site's URL? I've made it so some error messages will be displayed when that parameter is passed in the URL.

May 24, 2012 at 4:39 PM

Thanks for replying.  I've been working on this issue all morning.  

I've taken the source code and put tons of logging into it because this is happening on a server I can't debug on.  I also removed all references to the resource files to be on the safe side.

I've found the problem, but I'm not sure how to solve it as yet...

In the OnInit method:

_UserProfileManager = new UserProfileManager(SPServiceContext.Current);

Throws the error: "No User Profile Application available to service the request. Contact your farm administrator.”

I've research for a little bit and so far have found this link that seems relevant:

http://social.msdn.microsoft.com/Forums/en-US/sharepoint2010general/thread/1a29ce5d-89f2-43e0-844c-afa862afe548

But that's as far as I have gotten.  

May 24, 2012 at 5:10 PM

Do the service connections from the Web Application configuration look correct?  Can you see the User Profile Service Application Proxy listed there?

I talked to our infrastructure lead and he said that the UPSA should only run on one server (or he thought maybe it was the sync job)

On other thing you can try is just deleting the UPSA and rebuilding it from scratch, I know that we had some initial problems with our installations and re-creating that service solved those issues.

May 25, 2012 at 1:13 PM

Things on QA look similar to production, however I think something may be amiss with the User Profiles.  While SharePoint does recognize me with the welcome control,  My Sites do not seem to be working and searching users doesn't return results.  I'll have to see what is going on and report back my findings.

May 25, 2012 at 9:47 PM

Got it working!  The service account for the mysite web app was the wrong one, we fixed that and my sites started working.  Still the control didn't show up.  We then associated the User Profile service with the web application and viola! 

This link helped with figuring this out.  http://mrhodes.net/2011/04/13/repairing-missing-my-site-and-my-profile-links/

Also, thanks to everyone for your helpful comments!

 

May 25, 2012 at 10:30 PM

Thanks for the update. User profile problems can be really tricky to troubleshoot, I'm glad you got it figured out.