mibuso.com

Microsoft Business Solutions online community
It is currently Sun May 19, 2013 12:26 am

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: [Solved] NAV 2009 NavDatabasePasswordException - Dynamics CRM Plugin
PostPosted: Sun Feb 22, 2009 8:08 am 
Offline

Joined: Fri Oct 03, 2008 10:19 am
Posts: 3
Hi All,

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).

Code: Select all
Event Type:   Error
Event Source:   MicrosoftDynamicsNAVServer
Event Category:   None
Event ID:   0
Date:      2/21/2009
Time:      7:35:38 PM
User:      N/A
Computer:   <computer Name>
Description:
User:
Type: Microsoft.Dynamics.Nav.Types.NavDatabasePasswordException
SuppressMessage: False
FatalityScope: None
Message: The user ID and password are invalid. Try again.
StackTrace:
     at Microsoft.Dynamics.Nav.Runtime.NavRuntimeAdapter.ErrorHandler(Int32 errorCode, Int32 errorNumber, Int32 moduleNumber, String errorText)


This same code runs fine when executed from a c# program.

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.

Code: Select all
ProjectMgmt mgmt = new ProjectMgmt();
mgmt.UseDefaultCredentials = true;
mgmt.Url = "http://localhost:7047/DynamicsNAV/WS/CRONUS_India_Ltd/Codeunit/ProjectMgmt";
mgmt.CreateProject("From CRM");


The above code works fine when run from a c# application in the same system.


Last edited by Sudheesh on Wed Feb 25, 2009 11:08 am, edited 1 time in total.

Top
 Profile E-mail  
 
 Post subject: Re: NAV 2009 NavDatabasePasswordException - Dynamics CRM Plugin
PostPosted: Wed Feb 25, 2009 10:51 am 
Offline

Joined: Fri Oct 03, 2008 10:19 am
Posts: 3
After setting the network credentials, the code started working. I am not clear why default credentials is not working. I will be very happy if someone could share their thoughts

mgmt.UseDefaultCredentials = false;
mgmt.Credentials = new System.Net.NetworkCredential ("Administrator","pass@word1", "LITWAREINC");


Code: Select all
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Crm.Sdk;
using Microsoft.Crm.SdkTypeProxy;

namespace SendToNAV
{
   using NavWS;
   public class SendToNAV : IPlugin
   {
   public void Execute(IPluginExecutionContext context)
      {
         ProjectMgmt mgmt = new ProjectMgmt();
         //mgmt.UseDefaultCredentials = true;
         mgmt.UseDefaultCredentials = false;
         mgmt.Credentials = new System.Net.NetworkCredential("Administrator","pass@word1", "LITWAREINC");
         mgmt.Url = "http://moss:7047/DynamicsNAV/WS/CRONUS_India_Ltd/Codeunit/ProjectMgmt";
         mgmt.CreateProject("From CRM");
      }
      
   }
}


Top
 Profile E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum


Search for:
Jump to: