This project is read-only.

Cannot get past "The request failed with HTTP status 401: Unauthorized."

Jan 18, 2010 at 8:55 AM

No matter I seem to try, I can't get past this error. I must be doing something fundamentally wrong...

This is the service account response in the vent log. I have tried use the actual queue's username and password, the domain admin account, etc.

Can anyone help?

 

Log Name:      Application
Source:        CRMQueueManager
Date:          18/01/2010 9:37:41 p.m.
Event ID:      0
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      crm4.company.local
Description:
Unhandled exception occurred in ProcessQueue

Exception:
The request failed with HTTP status 401: Unauthorized.

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 QueueManager.Helper.CRM.CrmService.RetrieveMultiple(QueryBase query) in C:\Projects\CRMQueueManager\QueueManagerHelper\Web References\CRM\Reference.vb:line 298
   at QueueManager.Service.QueueMonitor.ProcessQueue(QueueSetting QueueSettings) in C:\Projects\CRMQueueManager\QueueManagerService\QueueMonitor.vb:line 57
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="CRMQueueManager" />
    <EventID Qualifiers="0">0</EventID>
    <Level>2</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2010-01-18T08:37:41.000Z" />
    <EventRecordID>86379</EventRecordID>
    <Channel>Application</Channel>
    <Computer>crm4.company.local</Computer>
    <Security />
  </System>
  <EventData>
    <Data>Unhandled exception occurred in ProcessQueue

Exception:
The request failed with HTTP status 401: Unauthorized.

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 QueueManager.Helper.CRM.CrmService.RetrieveMultiple(QueryBase query) in C:\Projects\CRMQueueManager\QueueManagerHelper\Web References\CRM\Reference.vb:line 298
   at QueueManager.Service.QueueMonitor.ProcessQueue(QueueSetting QueueSettings) in C:\Projects\CRMQueueManager\QueueManagerService\QueueMonitor.vb:line 57</Data>
  </EventData>
</Event>

Coordinator
Jan 19, 2010 at 10:59 AM

Can you post relevant section of .config file where you have server/user details?

Manso

Coordinator
Jan 19, 2010 at 12:04 PM

Also: http://crmqueuemanager.codeplex.com/Thread/View.aspx?ThreadId=46406

Jan 19, 2010 at 5:54 PM

Thanks... here's my .config

<appSettings>
    <add key="crmserviceurl" value="http://crm4/MSCrmServices/2007/CrmService.asmx" />
    <add key="organization" value="CNS (default)" />
    <add key="username" value="zz.QueueManager" />
    <add key="password" value="passwordxxxxx" />
    <add key="domain" value="cns" />
    <add key="logeventlog" value="true" />
    <add key="logerrornotify" value="" />
    <add key="logwarningnotify" value="steven@company.co.nz" />
    <add key="lognotifyfrom" value="Automatic Mailer &lt;zz.QueueManager@company.co.nz&gt;" />
    <add key="logtofile" value="" />
  </appSettings>

I have seen http://crmqueuemanager.codeplex.com/Thread/View.aspx?ThreadId=46406 and it doesn't seem to be relevent in my case. The CRM server CRM4 is setup on port 80, Windows Server 2008 32 bit. I wonder if it's a server 2008 issue?

Jan 19, 2010 at 11:54 PM
Edited Feb 7, 2010 at 12:55 AM

Got it going! Yah!

Changed <add key="organization" value="CNS (default)" /> to:

<add key="organization" value="CNS" />

Simple as that...