401 Unauthorized Images and CSS
Hi All,I'm facing a big problem in my shrapoint Site, when i browse my pages in all Images,CSS files browsed from ServerI have a 401 Unauthorized Error for all files and just after i have 304 Not Modified.This problem not occurs in first load when i have 200 statusThis make time to load pages very very long, i search in internet i find that passing my authentication mode to KerberosWould resolve the problem and that 's what I ve done but still have a double call to all files in the page with 401 and 304 statusI'm running on Farm enviroment SERV 1 i my Frontal SevrerSERV 1 i my Application SevrerSERV 2 i my SQL Sevrer Running on Windows Server 2008 The problem doesn"t occurs when i'm in admin Pages all images and css browsed from sharepoint work fineCould Anyone help, i'm really blocked since over a week to find a solution to this!!Thank you in advanceABT
September 8th, 2009 1:11pm

Hey,Are these images and CSS custom files? If yes, Where exactly have you placed these images and CSS?KrishnanHTH, Krishnan
Free Windows Admin Tool Kit Click here and download it now
September 8th, 2009 1:40pm

I'm not an IIS expert, but I believe the issue is the way IIS handles teh request.I suspect that when you load the image it passes your current logged in details through. These are compared to the ACL on the file and if your are not allowed to access the file it throws a 401.Either the browser or IIS detects this and then tried as anonymous... as anonymous is in the group which allows is to access the folder you get the valid response.So your options are to turn off NTLM or Kerberos on the image directory or add everyone group with Read at the Images folder level
September 8th, 2009 1:43pm

Hi Richie,That seems to be the exact problem. However thiswill not happen if the files are placed in the _layouts folder. So we will have to wait till Kitano replies :)HTH, Krishnan
Free Windows Admin Tool Kit Click here and download it now
September 8th, 2009 1:55pm

Hi guys thank you for replies,CSS and images Files are custom i've placed them in /Style Library/en-us/Custom Styles and images ares in /Style Library/Images.About Permissions I checked in Internet that i must ADD (NT AUTHORITY\system) in policy for webapplication.I've added also this account (NT AUTHORITY\system) in Style Library Account as Full Reader.I still have the problem when i checked in Server CallI found that even the page is Called three time, i checked in token for each callFirst Call(Status-Line)HTTP/1.1 401 UnauthorizedContent-Length0DateTue, 08 Sep 2009 13:30:40 GMTMicrosoftSharePointTeamServices12.0.0.6421ServerMicrosoft-IIS/7.0WWW-AuthenticateNegotiateWWW-AuthenticateNTLMX-Powered-ByASP.NETThe second Call(Status-Line)HTTP/1.1 401 UnauthorizedContent-Length341Content-Typetext/html; charset=us-asciiDateTue, 08 Sep 2009 13:30:40 GMTServerMicrosoft-HTTPAPI/2.0WWW-AuthenticateNegotiate TlRMTVNTUAACAAAAEgASADgAAAAFgomiLTLJEkCFytIAAAAAAAAAAMThe last Call(Status-Line)HTTP/1.1 200 OKCache-Controlprivate, max-age=0Content-EncodinggzipContent-Length18611Content-Typetext/html; charset=utf-8DateTue, 08 Sep 2009 13:41:31 GMTExpiresMon, 24 Aug 2009 13:41:30 GMTLast-ModifiedTue, 08 Sep 2009 13:41:30 GMTMicrosoftSharePointTeamServices12.0.0.6421ServerMicrosoft-IIS/7.0Set-CookieWSS_KeepSessionAuthenticated=80; path=/Set-CookieMSOWebPartPage_AnonymousAccessCookie=80; expires=Tue, 08-Sep-2009 14:11:30 GMT; path=/VaryAccept-EncodingX-AspNet-Version2.0.50727X-Powered-ByASP.NETit seems like IIS try to retreiveimages and pages using three accounts.Thank you for HelpABT
September 8th, 2009 4:43pm

I've Added Everyone on Image level Still have the same ResponseABT
Free Windows Admin Tool Kit Click here and download it now
September 8th, 2009 4:59pm

When I browse the Image by copying the url i got not 401 status it browse image normalyABT
September 8th, 2009 5:27pm

What if you add nt authenticated users to the Viewers group?
Free Windows Admin Tool Kit Click here and download it now
September 8th, 2009 5:38pm

i've Added authenticated to Style Library they can Read, but still have the problem.ABT
September 8th, 2009 6:07pm

Hi,Have you checked the versioning settings of your Style Library document library? Do your items require content approval, has a major version been published, have the files been checked inetc, etc?If so, do the relevant files that your users cannot access have the appropriate status in the style library (ie their status is approved and they have a published version)Paul.
Free Windows Admin Tool Kit Click here and download it now
September 8th, 2009 10:10pm

Yes all Items are in published version i have no problem with that.ABT
September 9th, 2009 4:38pm

Not a programming question, moved to general.-lambertSincerely, Lambert Qin | Microsoft TechNet Managed Forum Support Posting is provided "AS IS" with no warranties, and confers no rights.
Free Windows Admin Tool Kit Click here and download it now
September 11th, 2009 11:33am

Hi Kitano, I am facing the same problem with HTTP 401's will you please let me know how you solved this? Thank youSrikanth
May 25th, 2010 8:12pm

This could also be issues due to aythentication. The event viewer that you have mentioned here shows NTLM and Kerberos. Can you check and the web app level what is specified as the authentication mechanism?
Free Windows Admin Tool Kit Click here and download it now
May 25th, 2010 10:12pm

Hi, In my case it was that no root site collection was defined on the webapp, and all inludes to core files like CSS , JS etc.. are set as relative to the root site collection. The second thing to check that the identity under wish run your webapplication is on the right MOSS group and that group should have the right permission on 12 folder ABT
May 25th, 2010 10:53pm

Hi Kitano, I feel this could be caused due to incorrect Kerberos Setup or due to inconsistent patch level of sharepoint farm. My suggestion would be to check by disabling Kerberos once and testing with NTLM, does it work?? BR, PM
Free Windows Admin Tool Kit Click here and download it now
May 25th, 2010 11:36pm

Hi Kitano, In my case, i created a document library and i placed all the Images in this library and i am showing these Images on Home Page.When i am running Home page using Fiddler i am getting 401 errors for all the Images displaying in the Home page. I Set Authentication Type: Windows IIS Authentication Settings:Selected Integrated Windows Authentication with NTLM Please let me know how to resolve 401's. Thank you Srikanth
May 26th, 2010 12:03am

How are you referencing the images in your CSS? Are you sure those are correct? I'd try hard coding an absolute link to the image or CSS and see if that works. John SharePoint911: SharePoint Consulting Blog: http://www.rossonmoss.com Twitter: JohnRossJr MOSS Explained: An Information Workers Deep Dive into Microsoft Office SharePoint Server 2007
Free Windows Admin Tool Kit Click here and download it now
May 26th, 2010 8:44pm

I am referencing those Images from the Master Page.I created a folder in the Intranet Portal and placed all the Images in this.(https://X/Style%20Library/Forms/AllItems.aspx). Thank youSrikanth
May 26th, 2010 10:35pm

Hi, Check if NT Authenticated Users group have views permissions for that document library if not the case try t add it. ABT
Free Windows Admin Tool Kit Click here and download it now
May 26th, 2010 11:15pm

Thanks for reply.I already given permission for that document library as NT AUTHORITY\authenticated users with Read Permission.Srikanth
May 27th, 2010 12:01am

Ok could you please tell us under wich account the Application Pool of your webapplication is running? when you said IIS Authentication Settings:Selected Integrated Windows Authentication with NTLM , it's on the Central administrattion general webapplication settings that you set this propert as NTLM not on IIS level. ABT
Free Windows Admin Tool Kit Click here and download it now
May 27th, 2010 12:18am

Also check if the page is a publishing page and that each image / css file is published. Site admins will not get a 401 error as they see content that does not have a major version published.
May 27th, 2010 12:26am

From Central Administration > Application Management > Authentication Providers > Edit Authentication ,under IIS Authentication Settings i already selected NTLM.Srikanth
Free Windows Admin Tool Kit Click here and download it now
May 27th, 2010 12:29am

Specifically though what do the references look like? Are they absolute or relative references?John SharePoint911: SharePoint Consulting Blog: http://www.rossonmoss.com Twitter: JohnRossJr MOSS Explained: An Information Workers Deep Dive into Microsoft Office SharePoint Server 2007
May 27th, 2010 2:28am

My similar situation was resolved by creating a document library with all the images and made sure that the NT authenticated users group had view permission for the library. Also, you might want to try disabling Kerberos authentication to test NTLM. Good luck. Ayo Salako
Free Windows Admin Tool Kit Click here and download it now
May 27th, 2010 4:32am

We Need both Kerberos and NTLM.In this case what changes do you prefer. Thank youSrikanth
May 27th, 2010 6:29am

They are absolute. ThanksSrikanth
Free Windows Admin Tool Kit Click here and download it now
May 27th, 2010 6:32am

I have exactly the same problem, I you found an issue plz ?? Nabil
December 16th, 2010 1:09pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics