Solved

Unauthorized 401 - Sorce:ASP.NET 2.0.50727.0 Event:1309

Posted on 2010-09-20
6
1,584 Views
Last Modified: 2012-05-10
Hi guys,

i have this error on the application, i can load the default.aspx OK but when i go to other page (ex:reports page) i have unauthorized error:

IIS 6
ASP 2.0
Use NTLM and Integrated Authentication.
Application Pool Identity: Domain\Service Account

I found this on Event Viewer:

Event Type:      Warning
Event Source:      ASP.NET 2.0.50727.0
Event Category:      Web Event
Event ID:      1309
Date:            9/20/2010
Time:            8:29:16 PM
User:            N/A
Computer:      Servername
Description:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 9/20/2010 8:29:16 PM
Event time (UTC): 9/20/2010 6:29:16 PM
Event ID: 122d1d53a622474d897e4884649c6109
Event sequence: 138
Event occurrence: 23
Event detail code: 0
 
Application information:
    Application domain: /LM/W3SVC/1134278247/Root-1-129294788456184807
    Trust level: Full
    Application Virtual Path: /
    Application Path: E:\InetPub\ApplicationPath\
    Machine name: Servername
 
Process information:
    Process ID: 7148
    Process name: w3wp.exe
    Account name: Domain\Service Account
 
Exception information:
    Exception type: WebException
    Exception message: The request failed with HTTP status 401: Unauthorized.
 
Request information:
    Request URL: http://sitelocaltion.com/applicationname.aspx
    Request path: /applicationname.aspx
    User host address: 10.155.12.113
    User: Domain\username
    Is authenticated: True
    Authentication Type: NTLM
    Thread account name: Domain\Service Account
 
Thread information:
    Thread ID: 1
    Thread account name: Domain\Service Account
    Is impersonating: False
    Stack trace:    at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at SD4Service.SD4Service.SD4AccountProfile(String loginName)
   at ManageCampaign.Page_Load(Object sender, EventArgs e)
   at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
   at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
   at System.Web.UI.Control.OnLoad(EventArgs e)
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
 
 
Custom event details:

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.


I found this on IIS Logs:

2010-09-20 18:29:16 W3SVC1134278247 Servername 10.155.12.113 GET /applicationname.aspx - 80 - 10.155.12.113 HTTP/1.1 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.2;+SV1;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.4506.2152;+.NET+CLR+3.5.30729) - - csisurveyqas.app.pmi 401 2 2148074254 1843 323 31
2010-09-20 18:29:16 W3SVC1134278247 Servername 10.155.12.113 GET /applicationname.aspx - 80 - 10.155.12.113 HTTP/1.1 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.2;+SV1;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.4506.2152;+.NET+CLR+3.5.30729) - - csisurveyqas.app.pmi  401 1 0 2015 425 15
2010-09-20 18:29:16 W3SVC1134278247 Servername 10.155.12.113 POST /SD4WebService/sd4Service.asmx - 80 - 10.155.12.113 HTTP/1.1 Mozilla/4.0+(compatible;+MSIE+6.0;+MS+Web+Services+Client+Protocol+2.0.50727.3615) - - Domain\Service Account 401 2 2148074254 1843 330 15
2010-09-20 18:29:16 W3SVC1134278247 Servername 10.155.12.113 GET /applicationname.aspx - 80 Domain\username 10.155.12.113 HTTP/1.1 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.2;+SV1;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.4506.2152;+.NET+CLR+3.5.30729) - - csisurveyqas.app.pmi  500 0 0 5408 441 46

0
Comment
Question by:Gonzalo Becerra
  • 5
6 Comments
 
LVL 11

Expert Comment

by:lenordiste
Comment Utility
are you trying to connect to a webservice in ManageCampaign.aspx by any chance?

if that is the case it's just a missing authorization for that webservice. If you are hosting the webservice you can try setting the "anonymous access" in IIS:
1. Open IIS
2. Right click webservice site and choose Properties
3. Click on the directory security tab.
4. Click the edit button in the Authentification box.
5. Check "Enable anonymous access"

you can also provide whatever necessary login information is needed by changing your code:

var myWebservice= new WebService1();
myWebservice.Credentials = new System.Net.NetworkCredential("myLogin",
"myPassword");
myWebservice.PreAuthenticate = true;

or if you want to use the default credentials:

var myWebservice= new WebService1();
myWebservice.Credentials = System.Net.CredentialCache.DefaultCredentials;


Hope this helps!

0
 
LVL 1

Author Comment

by:Gonzalo Becerra
Comment Utility
Thanks, but the problem still perssist, i check annonymous and add NTFS Permissions for IUSR but is not problem. I administrator from server.
1 - I Check Connection User/Password for connect to SQL Server
2- I verfiied permissions NTFS
3- I Verified Authtentication Integrated NTLM
4- And in the same level have Default.aspx and work fine.
 
0
 
LVL 1

Author Comment

by:Gonzalo Becerra
Comment Utility
Error
Error.JPG
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 1

Author Comment

by:Gonzalo Becerra
Comment Utility
The application pool have a domain account, i think i need set SPN for this account?
I verified this
setspn -L Domain\Account
 Registered ServicePrincipalNames for CN=s-CSISurvey-qas,OU=Service Accounts,OU=Melbourne,OU=INT-ITSC,OU=PMI,OU=Member Servers,DC=PMINTL,DC=NET:
But when i go to ADSIEdit don't have set ServiceProviderName and in Active Directory Users&Computers > Computer Account > Delegation > Is Checked "Do not trust this computer for delegation".
0
 
LVL 1

Author Comment

by:Gonzalo Becerra
Comment Utility
I make a troubleshooting doc with all i verified.
Troubleshootig-Unauthorized.doc
0
 
LVL 1

Accepted Solution

by:
Gonzalo Becerra earned 0 total points
Comment Utility
I found errors on web.config
The problem is solved


1- Include the User of identity in group: PMI_CCC_AP_UR_CSISurvey_Qas_Admin because if specified in web.config
2- Verify in web.config this:
  a- <add key="TestMode" value="true"/>
  b- <add key="PoseAsLoginName" value="pmi\CZsolt"/>    
  c- verify webservice parameters.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

772 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

10 Experts available now in Live!

Get 1:1 Help Now