?
Solved

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

Posted on 2010-09-20
6
Medium Priority
?
1,609 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
[X]
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
  • 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
Basic Security of Your VPC

So, you’ve got this shiny new VPC and a fancy new application configured on your EC2 servers ready to go. This application is only accessible from your computer, which is great for security, but you need your users to be able to access it! So, what’s the easiest way to do this?

 
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

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

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

Lync server 2013 or Skype for business Backup Service Error ID 4049 – After File Share Migration
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

752 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