Debugging returning 401 HTTP error

  • Thread starter Thread starter James Bailey
  • Start date Start date
J

James Bailey

When I try to debug an ASP.NET application, VS.NET pops up saying "Error
while trying to run project: Unable to start debugging on the web server."
and "Click Help for more information." When I look at the IIS logs, the
DEBUG verb is returning a 401 error.

Here's what I've tried:

1. Checked that I have 'Administrators' and 'Debugger Users' groups.

2. 'Integrated Windows authentication' is enabled in IIS.

3. ACLs are set for the directories in question. (It occurs on all web
apps, new or existing.)

4. Web.config is well-formed and debugging is set to true.

5. I've run "aspnet_regiis -i" a few times.

6. Restarted server.

7. Enabled security auditing, but no entries are logged.

8. Narrowed down the error to a 401;1 error: Error in logon. However, no
failures are being logged, as is stated in #7.

The oddest thing is that I was using it for awhile, and then it quit working
in the middle of the afternoon. I can't think of anything that I changed.
It's acting like I had installed URLScan, which I haven't, and it's blocking
the "DEBUG" verb.

This isn't the first time something has broken on me. I think this is the
third time, and it's been something different each time. Is ASP.NET that
difficult to keep debugable?

Anyway, thanks for any help. I'm not afraid to get down and dirty, but I
can't find any information on how to fix this; I can only find the
workaround where you attach to the aspnet_wp.exe process, which I'd prefer
not to have to do.
 
I don't know if this will help, but I remember that my web server started
reporting that too many people were logged in. I'm using Windows XP Pro as
my server and I had only one instance of IE accessing my local machine, with
two VS.NET sessions open. Maybe that has something to do with it?
 
Hi James,

As for the "Too many people logged in" error , it is propably caused by the
machine you used, since you're using the winxp machine as server and such
OS like XP is personal version which dosen't support multi-authenticated
user(not anonymous user) logged in concurrently. I'm not sure whether this
is possible the cause of the problem, is your XP box connected to Internet
so that some external vistors can visit your site? If so, I recommend you
disconnect your server's network to external and restart your server and
retest to see whether
this helps.

Also, I'm not sure whether you've checked the suggestions in my last reply?
Or if you haven't seen it or have any problems on view the messages, please
feel free to let me know. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
 
I've checked through Outlook Express and through Google, and neither show an
original reply. Could you post it again? Thanks.
 
Hi James,

Any further progresses or updates on this issue? Or can you view the
messages I posted correctly? If you still have any problems on viewing the
thread or if there is anything we can help, please feel free to post here.
Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
 
I never saw your original post on this thread/newsgroup. However, I just
ran a debug and it fixed itself. I don't know what happened, but I can
debug again.

Thanks.
 
Scratch that. It's still not working.

I still can't see your original message, so I don't know what you requested
or suggested. Could you repost? Thanks.
 
Hi James,

Thanks for your confirm. I'm glad that you've resolved the problem. And the
reason why my former messages lost may due to the the too big size make
them get lost. Here is my initial reply

===============================================================
Hi James,

From your description, you failed to use F5 debug on an ASP.NET web app in
VS.NET and you got the 401 error from the IIS log ,yes?

What about the operation system and the FRAMEWORK and IIS version?
Also, you've mentioned that you've tried many common steps on this problem
still with no success. I also feel a bit strange since all the steps
you've tried not work at all. Here are some of my suggestions:
1. Is the normal console .net application able to debug correctly? If not
you'd have to manually register the mscordbi.dll via regsvr32

2. Please check whether the "Machine Debug Manager" service is started
properly. If no, please stop it and restart again. Also, as you mentioned
that you've tried the aspnet_regiis -i to reinstall the ASP.NET, I think
you can retry this via the following sequence:
aspnet_regiis -u
aspnet_regiis -i

3.As you also mentioned that it seems that the http debug request is denied
from the IIS, I suspect that whether the problem is due to the Integrated
autentiation in IIS. In other word, maybe Windows Integrated (NTLM)
authentication was failing in IIS, and this authentication is required for
ASP.NET Debugging to work.
NTLM authentication was failing because HTTP Keep-Alives were disabled. You
may have a view at the following kb article:
#Web Browsers Receive "HTTP 401.5" Error When You Use Windows NT
Challenge/Response
http://support.microsoft.com/?id=288323

#NTLM Authentication Is Lost on Every Call
http://support.microsoft.com/?id=323683

The above items are some additional ideas I've got from some former similar
cases(some others finally ended with reinstall). If they still not work, I
think there maybe some strange problem occured in the IIS or asp.net
internal. Then, it would require intensive troubleshooting which would be
done quickly and effectively with direct assistance from a Microsoft
Support Professional through Microsoft Product Support Services if you do
think it is an urgent issue. Thanks.
======================================================================

Also, I've tried sending it to you via email but the mail address seems
unreachable. Anyway, Thanks again for posting here.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
 
Going down the list:

1. Yes, normal console apps can be debugged.

2. The service is enabled and running. Doing a -u and a -i didn't work.

3. I had turned this off while trying to fix all of this thinking that it
might be a problem. I enabled it again and now I can debug!

Thanks!
 
Back
Top