Michael Van Cleave
Traveling the technical world, learning the language

Sharepoint 2007 Anonymous Access = 401 Unauthorized Access

Monday, November 13, 2006 8:18 PM

So tonight we are rolling our Sharepoint Server 2007 B2TR implemenation to production.  The whole week things have been clicking along and going very well (which usually boads badly for the actual push..)

Well right out of the gate the good feelings came crashing down when when one of the testers tried to enter the site through the anonymous access side.

To test this, I made sure that the site was not added to my Internet Explorer site categories for Intranet, and in the options made sure that it would only try to connect to the site with Anonymous Access.

Typed in the site path in the URL address bar and BOOM!

All you get on the page was "401 Unauthorized".

After about an hour of messing with it, the Avanade consultant that has been leading us through this project remembered an issue that we had a few days ago and I had sought out on the net when we saw some strange behaviour in the portal.

The problem wound up being.....

Default.master

Yep, here is the problem.  During the day the default.master was checked out to make some last minute feel good changes for the production roll.  The problem is that it was updated and checked in, but not published.  Since anyone that was on the site had enough permissions to see the pages (with the updated default.master in draft state) we never noticed that it wasn't published.  Once the file was published and was available for every Tom, Dick, and Jane to see all of the Anonymous Access problems went away.

I would say unless someone can come up with  a very good excuse why this doesn't just show the last published version of the default.master until the newer draft version is published, I would call this a pretty decent BUG!

I am hoping that in RTM it is fixed, but we won't know that for a couple of days when we start to install the RTM upgrade.

Overall, I would say I am 99.99998% happy with MOSS 2007, but the little things like this get my undies in a bunch.  The SharePoint team has done a great job either way.  If you get a chance to play with 2007, do it.  It is by far and away better than 2003.

Tip of the night?  If you get caught playing with you default.master, remember to publish it!

Michael


Feedback

# re: Sharepoint 2007 Anonymous Access = 401 Unauthorized Access

I'm seeing a very similar thing in RTM WSS v3 (no MOSS installed). In this case, if the masterpage has been customized, the first access for an anonymous user returns a "401 UNAUTHORIZED" page. If the anonymous user refreshes the page, the correct page appears! Strange. Then all is well until the application pool is recycled or an IISReset occurs.

This is a site with WSS V3 (SharePoint) installed and Windows Forms authentication configured and anonymous access allowed.

When I revert the masterpage back to the original site definition, the 401 error goes away.

So, in the vanilla WSS v3 case, there is no "publish" option to fix the problem. I thought that this would be some type of database permission issue, but that doesn't explain why the anonymous user can get the SharePoint page after a page refresh from the 401 Unauthenticated error. And I tried varioius logical database access settings to no avail.

So, at this point, I can only install customized master pages as a feature and all is well as long as I don't ghost it/customize it.

Roy 6/6/2007 10:21 PM | Roy Ogborn

# re: Sharepoint 2007 Anonymous Access = 401 Unauthorized Access

Thanks Roy.

I haven't worked specifically with 3.0 very much yet so I didn't have a chance to verify it there. But now that you have shed some light on the fact that it is an issue there I guess I don't have to.. :)

One day when I get a chance to really research this and find a cure I will be sure to post it.

Michael 6/7/2007 9:59 AM | Michael

# re: Sharepoint 2007 Anonymous Access = 401 Unauthorized Access

If I have Publishing web under Publishing site, anonymous works great for father (site) and still brings auth dialog for son (web). For other templates, like Team, it works without issues.Breaking the inheritance and explicit defining of anonymous access on son site doesn't help. 1/1/2008 4:54 AM | Yehiel

# re: Sharepoint 2007 Anonymous Access = 401 Unauthorized Access

Hey Man!!!
Thanks so much!!! You save my skin!!! hehehe

My designer forgot to publish the masterpages, I published its and works fine!!

Hug.
Rafael
9/17/2008 3:45 PM | Rafael Dorneles

# re: Sharepoint 2007 Anonymous Access = 401 Unauthorized Access

Excellent to hear that it helped.

Michael 9/17/2008 5:34 PM | Michael

# re: Sharepoint 2007 Anonymous Access = 401 Unauthorized Access

Our 401 issue was due to there still being the original "Default Website" in IIS. Yes the "Default Website" is "Stopped" after creating and extending a new MOSS site on Port 80, but this site still gets in the way of Anonymous Access on Port 80.

Delete the "Stopped" "Default Website" and Anonymous access miraculously starts working.

~bozo
9/22/2008 6:19 PM | Sodobozo

# re: Sharepoint 2007 Anonymous Access = 401 Unauthorized Access

Nice, thanks for the heads up.

Michael 9/22/2008 7:55 PM | Michael

Post a comment





 

Please add 4 and 2 and type the answer here:




Archives

Post Categories

Great Links

Other Blogs

Pod Casts

Syndication: