[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1627
  • Last Modified:

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

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
Gonzalo Becerra
Asked:
Gonzalo Becerra
  • 5
1 Solution
 
lenordisteCommented:
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
 
Gonzalo BecerraAuthor Commented:
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
 
Gonzalo BecerraAuthor Commented:
Error
Error.JPG
0
Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

 
Gonzalo BecerraAuthor Commented:
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
 
Gonzalo BecerraAuthor Commented:
I make a troubleshooting doc with all i verified.
Troubleshootig-Unauthorized.doc
0
 
Gonzalo BecerraAuthor Commented:
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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now