in

SharePoint Blogs

The Best Place for SharePoint-related Blogs

Michael Hofer - SharePoint Blog

Michael Hofer's blog about adventures in SharePoint land, including tips and tricks for all products and technologies used in Information Worker solutions.

.NET Runtime Bug: SharePoint asks multiple times for the same login

(migrated post from June 15th, 2007) 

Found a strange behavior with a customer MOSS 2007 installation. Whenever a user accessed the main site/portal entrance, he is asked multiple times for his window login (we are using windows security). After providing the login some times, the page is loaded without any problem. Navigation to other pages within the portal exposes the same strange behavior. When accessing the site with the administrative account that we use for setup and configuration, everything works perfectly.

After analyzing the IIS log files, the problem was very easy to discover. Whenever a customization file (in our case a customized style sheet “custom.css”) is accessed, a 401 access denied error is listed. This doesn’t prevent the page from being loaded, because after some failing attempts, the CSS is skipped…

Short, the file permissions within the “templates/layouts/<lang-code>/styles/custom” for this file was not set properly. Even though the directory is enabled for permission inheritance, the file has only a limited set of permission… After inheriting the permissions from the parent directory, all login boxes are gone.

What do we learn from this? Whenever copying files into the 12-Hive, make sure that all Windows permissions are effectively inherited or set manually!

 

Published Jun 28 2007, 02:13 PM by mhofer1976
Filed under: , ,

Comments

 

Links (6/28/2007) « Steve Pietrek’s SharePoint Stuff said:

Pingback from  Links (6/28/2007) &laquo; Steve Pietrek&#8217;s SharePoint Stuff

June 28, 2007 8:42 PM
 

mLindh said:

I've the exact same symptoms as your client, but in this case I can't find any incorrect file permissions. And after a bunch of searching, your comment here is the first related info I've found.

August 6, 2007 4:28 PM
 

Phil Lanier said:

Yep, common scenario.  ;-)  Tip: Always make sure you COPY files and folders into the 12-hive templates location rather than MOVING them from another location.  For example, if you have the css file sitting on your desktop and move it into the layouts/.../styles directory, it'll keep the same file permissions it had on your desktop, which are incorrect.  If you COPY the file, however, the file permissions won't copy over, they'll automatically inherit the appropriate permissions.  Same goes for copying/moving folders and entire folder structures.  

mLindh - the same symptoms can be caused by permissions on other referenced resources as well, such as images, javascript files, etc.  For instance, if you have an image in a sub-site or personal site that is locked down, but is referenced on a page, some users may get this prompt.  (Saw this all the time on SPS2003 with the "Area Contact" picture being locked down in a user's personal site.)  Check your IIS logs, use something like Fiddler, or look for missing images or js/css files to determine what resource is causing the authentication prompt.

November 26, 2007 1:58 PM

Leave a Comment

(required )  
(optional )
(required )  
Add

About mhofer1976

For all of my IT carreer, I've been addicted to Microsoft-based software development, starting with VB, but then heading straight towards the .NET Framework in its earliest days. While working in different positions as a lead developer, project manager, pre-sales consultant and most recently a business unit manager, I've always kept beeing a developer and specialized on solutions in the Information Worker area, with an emphasis towards Enterprise Content Management. The Microsoft Office System and especially the SharePoint products and technologies are my favorite "playground", one big reason why I've joined the Microsoft Consulting Services in Switzerland where I'm currently working as Senior Consultant for Information Worker solutions.

Need SharePoint Training? Attend a SharePoint Bootcamp!

Posts (c) their respective authors. Everything else (c) 2007 SharePoint Experts