Getting a The request failed with HTTP status 401: Unauthorized Failure

Recently I created a small tool to manage discount codes for CodeMash. It was a website based on ASP.NET Dynamic Data (which is part of .NET 3.5 sp1). This tool made it real easy to put together a quick and simple web form to manage these codes.

When I went to deploy it to the CodeMash server, I found I didn’t have SP1 installed, so I installed it. Deployed the web form, and everything seemed awesome.

Then at around 6:00am the next morning I started getting lots of emails about problems with the CodeMash site. Which was funny, because the core site (not including registration) has always been fairly stable. It is an ASP.NET site. We store the site content in WSS, and bring that content into the web site via the WSS web services. Both sites live on the same server (remember that, it becomes important later on).

That morning, those web services started failing with a “The request failed with HTTP status 401: Unauthorized”.

I searched and wondered. I uninstalled SP1, and reinstalled .NET 3.0 RTM. Nothing fixed it. I pushed a build of the site that bypassed the services as a short term fix, but the problem persisted for over a week. It was KILLING me. What made it harder was the the services worked just fine when being called from a remote location, like my developer workstation. But calling the service from the same web server that the WSS services were running kept failing.

I searched, and searched, and searched. I couldn’t find anything that even remotely helped. The Jim Holmes (fellow CodeMash founder, and all around smart guy) sent me a link to a blog post that might help. It turns out it was a link to my own blog. The post shows how to configure WSS for just NTLM instead of Kerberos. This configuration is now exposed in the WSS admin tool, so you don’t have to do it at the command prompt anymore. But that setting was already correct.

I was at a complete roadblock. I even uninstalled, installed .NET 3.5 sp1 and reinstalled WSS. Then I simplified my search terms, and a MSKB article popped up. I then followed the steps in the article, and that fixed it. Yahoo!

The article covers a change that .NET 3.5 SP1 puts in place. This security change is already present in other scenarios, so they added it to SP1 to make it more consistent. This feature protects against loopback reflection attacks, and blocks any loopback call. A loopback call is when you call ‘out’ to a service that is actually local. The KB article goes over a few options. You can disable loopback check, or you can reconfigure how you connect to the local service (using a local address, instead of a public address.)

The problem had nothing to do with WSS, and that was the red herring for me. It had to do with some fixes that the .NET 3.5 SP1 put in place.

Tags:

Comments

Jamorama Review United States
3/23/2010 5:21:33 PM Permalink

i think you have a great blog here... today was my first time coming here.. i just happened to find it doing a google search. anyway, good post.. i'll be bookmarking this page for sure.

i know i'm a little off topic, but i just wanted to say i like the layout of your blog. i'm new to the blogegine platform, so any tips on getting my blog looking good would be appreciated.

crane hire United Kingdom
3/25/2010 7:20:31 PM Permalink

Hi vey nice interesting blog im from  i found this on  I'm in the crane hire company business,i found this blog very interesting good luck with it i will return to this blog soon

learn to play guitar United States
3/26/2010 10:40:52 AM Permalink

i like the layout of your blog. hope you don't mind if i do something similar with mine.

cordless power tool United Kingdom
3/28/2010 3:17:42 AM Permalink

Pretty impressive article. I just came across your blog and wanted to say that I have really enjoyed reading your opinions. Any way I'll be coming back and I hope you post again soon.

You own a very rewarding blog. But one question remains In which way do you deal with Spam in blog comments? I really hate it, It wastes lots of my time and I  hate messing around with this every day.

seo services company United States
3/28/2010 4:45:14 PM Permalink

Amazing Post.

coupons United States
3/30/2010 2:48:49 AM Permalink



Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic.

wow leveling guide United States
4/2/2010 4:37:21 PM Permalink

Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I'll be subscribing to your feed and I hope you post again soon.

Raina Terzo United States
4/3/2010 8:00:34 PM Permalink

According to a swedish  blog site, rejoy bloggen,  the new iPad has already been hacked. Geohot, who is known for various reasons, claims his yet still unnamed jailbreak will probably function on  iPad too. If this is correct it is absolutely no good news for Apple since their latest, predicted, milestone hasnt even been launched yet.

horde leveling guide United States
4/6/2010 2:45:56 AM Permalink

Admiring the time and effort you put into your blog and detailed information you offer! I will bookmark your blog and have my children check up here often. Thumbs up!

Maurice Wanlass United States
4/6/2010 10:46:33 AM Permalink

Pretty insightful post. Never thought that it was this simple after all. I had spent a good deal of my time looking for someone to explain this subject clearly and you’re the only one that ever did that. Kudos to you! Keep it up

Memorials United States
4/6/2010 8:59:31 PM Permalink

Hello nice blog im from Doncaster i found this on google I seen it on the top ten searches i found this blog very interesting good luck with it i will return to this blog soon

While this subject can be very touchy for most people, my opinion is that there has to be a middle or common ground that we all can find. I do appreciate that youve added relevant and intelligent commentary here though. Thank you!

dynamic website Georgia
4/7/2010 6:02:33 AM Permalink

Don�t make the mistake of including obviously untrue hype in your website content to gain sales. In the long run, this methodology will always fail.

play piano Canada
4/8/2010 6:30:47 AM Permalink

I think something will happen that day like something happens every day but i don't think that the world will end . And the mayans have other dates after 2012 another date on the calendar was october 21, 4772. Also the king Pacal of Palenque didn't believe in the 2012 end of the world .

canon powershot s5 is United States
4/9/2010 3:16:40 PM Permalink

Thanks for taking this opportunity to talk about this, I feel strongly about it and I benefit from learning about this subject. If possible, as you gain data, please update this blog with new information. I have found it extremely useful.

Big and Tall Jacket United States
4/11/2010 7:13:55 AM Permalink

Hi Great Site , I will be coming back for sure, where is the rss button I cant find it?