I am getting the following exception in event viewer while trying to execute a small piece of code from a Dynamics CRM Plug-in (plug-in registered as Administrator).
This same code runs fine when executed from a c# program.
Event Type: Error
Event Source: MicrosoftDynamicsNAVServer
Event Category: None
Event ID: 0
Time: 7:35:38 PM
Computer: <computer Name>
Message: The user ID and password are invalid. Try again.
at Microsoft.Dynamics.Nav.Runtime.NavRuntimeAdapter.ErrorHandler(Int32 errorCode, Int32 errorNumber, Int32 moduleNumber, String errorText)
This is a single computer installation. I am running Demo Installation of Dynamics NAV 2009 with Dynamics CRM 4.0. I have logged on to CRM using Administrator account. All services including SQL Server, Dynamics NAV and Dynamics CRM are running in Administrator account. I tried changing everything to LOCAL SERVICE and restarted the services. But no help. I am using my partner license.
the code unit that consumes webservice is as follows.
The above code works fine when run from a c# application in the same system
ProjectMgmt mgmt = new ProjectMgmt();
mgmt.UseDefaultCredentials = true;
mgmt.Url = "http://localhost:7047/DynamicsNAV/WS/CRONUS_India_Ltd/Codeunit/ProjectMgmt";