Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

Posted on 2010-09-20
6
1,594 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
ID: 33720162
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
ID: 33724379
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
ID: 33724518
Error
Error.JPG
0
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
LVL 1

Author Comment

by:Gonzalo Becerra
ID: 33724642
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
ID: 33725633
I make a troubleshooting doc with all i verified.
Troubleshootig-Unauthorized.doc
0
 
LVL 1

Accepted Solution

by:
Gonzalo Becerra earned 0 total points
ID: 33728149
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

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

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

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Lync server 2013 or Skype for business Backup Service Error ID 4049 – After File Share Migration
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

840 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