Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I will attempt to explain this fully, if I don't please ask me to clarify, this part of SharePoint is a whole new world for me. I'm coming in from this on the Administration side and have been taking on more detailed work in trying to figure out how SharePoint behaves to handle out public site as it gets built.

We are trying to use a specific machine key with our SharePoint 2010 web application, this is due to our use of Claims authentication and utilizing our own User database to grant access and permissions on the site. Recently we've done some authentication changes to sync up cookies with the main SharePoint site and a concurrent site we link in, to allow Users to log in once and switch between sites, since we've done this there have been issues that look to be authentication and machine key related. The current thinking is that the machine keys need to be the same in all the web.config files, this is for Central Administration, the main site and the extended site used for the Search Crawler. When we deploy we copy in the web.config files from SVN so we have consistent copies, including machine keys which are the same across all the configs. Within a short span of time SharePoint has updated the config files, changing the machine keys in some of the config files to a new key. This seems to break authentication.

Some of the authentication issues Users end up seeing are publishing pages that have missing images, the images are there in the published images folders and can be selected when editing pages but they never appear on the page. Trying to access the images using direct URL's gives a generic "Object reference not set to an instance of an object" error message. Images that appear in the pages are accessible as direct links without issues. Sometimes images on pages appear and disappear depending on when you access the page, and whether or not we've used Developer Tools in IE to clear cache and cookies.

What I am not understanding is why this might happen and am sort of looking for ways to diagnose this. I've checked with the Developer Tools, haven't seen anything show up that I might recognize as an error, ULS logs don't show much. I don't know if the machine keys can be kept in sync in the way we copy and source the configs, if we should maintain them this way, or if there is something else I should be looking at to narrow this down some. Authentication is a new area for our whole group so we are trying to work it out as we go through the problem. Any helpful hints would be greatly appreciated.

Thanks!


We did some more research and instituted some ideas from here (thanks!) so what resolved the situation was the following:

  • Made all machine keys the same in all web.config files
  • Stopped the Rules that tried to synchronize web.config files, it seems that even when the files were the same the Rules thought they were not
  • Turn off Blob Cache, which we originally put on to increase performance but we were not gaining that much

Since making these changes things have started working again, and images that were appearing and disappearing in the site, are now showing up all the time. One of the important things noticed was that images always appeared for anonymous users, but once you log in to the site, images will suddenly go away.

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

Try disabling the one of these health check rules in central admin:

  • Automatic Update setting inconsistent across farm servers
  • Web.config files are not identical on all machines in the farm

http://ctp.social.technet.microsoft.com/Forums/en-NZ/sharepoint2010programming/thread/0d4a9a65-a208-45a7-a082-fc881957cdc0

share|improve this answer
    
I saw the Web.Confg rule but was not sure of the repercussions of doing that, is there a downside to stopping these rules if we are monitoring our web configs in source control? –  MichaelF Apr 13 '11 at 14:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.