Solved

Getting http: Status 401: Unauthorized on First Debug, but not the Second, Third, Fourth  Debug.

Posted on 2013-01-02
4
641 Views
Last Modified: 2013-01-09
Hi Everyone,

I am getting a http: Status 401: Unauthorized error when I first load my web application and debug.  When I stop debugging and do another Debug, my application loads with no errors appearing.  What is happening?  I stop debugging and do another third debug the application continues to load normally with no errors.

When I close out VS 2005 and come back in the first time and load my application, I get the http: Status 401: Unauthorized each time.  I then stop debugging and debug again, my application works and loads normally.

Maybe its my computer and the VS 2005 on my machine or IS Settings.  Please find the authentication setting I have on my machine attached.

Strange, I do not understand what is happening.

Also, noticed after minimizing the application and then coming back after break and maximizing the application and then trying to debug again, the 401 Status Error appears again on the debug.
Status-401Capture.PNG
SettingsChanged01022013Capture.PNG
0
Comment
Question by:jjc9809
  • 2
4 Comments
 
LVL 23

Assisted Solution

by:Roopesh Reddy
Roopesh Reddy earned 250 total points
ID: 38740593
0
 
LVL 25

Accepted Solution

by:
apeter earned 250 total points
ID: 38741968
Looks like you have a web service within same webproject. Also you are calling the web service on the On_start of the application , Hence the problem for the first time.  From the second time since the intermediate IIS is already available/loaded it is for working fine.

So when ever the Appdomain is unloaded or iisreset, it ill fail..

You have two of fixing this.
1. Move the Web service into a separate site.So this is independent or started before you web project.
2. Don't call the web service inside "Application_start" event.....maybe inside a aspx page. like login page etc
0
 
LVL 23

Expert Comment

by:Roopesh Reddy
ID: 38758746
Hi,

Is this issue solved? Any Updates?
0
 

Author Closing Comment

by:jjc9809
ID: 38758883
I found the authentication properties in IIS 6 were disabled.  Also, we had some permission issues that still have not be resolved.  I appreciate your help.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now