Friday 1 July 2011

ESB Portal unhandled exception - HTTP request is unauthorized -server was Negotiate NTLM Basic realm localhost

I have been trying to fix the below error for last couple of days , But could not get right path and I had an impression that this error is more related to Windows permissions for my ESB.Portal application. But that is not the fact.

Exception message: The HTTP request is unauthorized with client authentication scheme Negotiate. The authentication header received from the server was Negotiate,NTLM,Basic realm=localhost.

I had around 80,600 records of data on my Exception Database for 1 month of transaction. Initially when I tried for Hour , Day and week view of ESB Portal it worked fine for me but it did not work for Month view. So, it gave me an impression that MS had developed a code to restrict the usage of ESB.Portal because this is a sample version. Then I started looking at the Stored procedures used for ESB Portal but did not get any clue.

After a while I started to debug the code and I found the root cause of this issue. The issues is due to large size of data (exceptions database) been imported for the Faults Service and this is more to deal with application configuration section than database level.

You might find Warning or Error in Event log as below

Log Name : Application
Source : ASP.NET 2.0.50727.0
Event code : 3005
Event message : An unhandled exception has occurred.

Application information:
Application domain: /LM/W3SVC/1/ROOT/ESB.Portal-1-129539791417651141
Trust level: Full
Application Virtual Path: /ESB.Portal
Application Path: C:\Projects\Microsoft.Practices.ESB\Source\Samples\Management Portal\ESB.Portal\

Process information:Process ID: 13408
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE

Exception information:
Exception type: MessageSecurityException
Exception message: The HTTP request is unauthorized with client authentication scheme 'Negotiate'. The authentication header received from the server was 'Negotiate,NTLM,Basic realm="localhost"'.

Request information:Request URL: http://localhost/ESB.Portal/Faults/Faults.aspx
Request path: /ESB.Portal/Faults/Faults.aspx
User host address: ::1
User: MYUSER
Is authenticated: True
Authentication Type: Negotiate
Thread account name: NT AUTHORITY\NETWORK SERVICE

The Fix is very simple
all you have do is Update the web.config files for both ESB.Exceptions.Service and ESB.Portal. Make sure you have done the same changes for both files. including the message size and maxarray lengths.


ESB.Exception.Service - Web.Config Changes





ESB.Portal - Web.Config Changes



Drop a comment if this article helped you to solve your problemyou can reach me @ raj.webjunky@yahoo.com




No comments:

Post a Comment