We've got a customer which has "developed" a new problem. I've searched the net for a solution for the problem, but noone seems to have a permanent one. Thought I'd check here and see whether someone has found out the underlying reason for it.
What happens is that the users can't start RTC, they get an error which states that "Metadata for object of type xxx is in a failed state. This is caused by a previous exception: The specified path is invalid".
This can be resolved by restarting the service/compiling all objects + restarting the service. (Sometimes needed to be done twice or more).
So we have found a work around that solves the problem for the moment. BUT it is a reoccuring problem. Every other week or so, this reemerges. So far I/we have found no reseon for this. Even though it can be fixed rather quickly, it's still something that's really bad for the customer.
They had had their environment up and running for about an year before this first happened. It happened the first time connected (?) to a NAV web service being installed on the server.
Anyone that has a smart solution to this, or at least a more permanent workaround?
0
Comments
You mean that you think that one user with other settings might connect and somehow make the metadata corrupt, which then makes it impossible for other users to connect?
Just found out another way to solve this. What happens is the RTC or Webservice needs this codeunit, table, etc. but it needs recompiling before the object can be used.
In your example "Metadata for object of type xxx is in a failed state. This is caused by a previous exception: The specified path is invalid".
The message "The specified path is invalid" is from the compiler. So something went wrong while compiling.
To resolve my issue I looked on the server into the folder: C:\ProgramData\Microsoft\Microsoft Dynamics NAV\60\Server\MicrosoftDynamicsNavServer\source and found a .cs file which was not compiled.
But why?
I created this piece of code:
IF CODEUNIT.RUN(codeunit) then begin
end;
message(GETLASTERROR);
In the message there still was the message "failed state", but also more info on which line and position the error occured in the .cs file.