Options

Debugging NAV web services

derrickderrick Member Posts: 86
edited 2009-09-08 in NAV Three Tier
Hi experts, how could I debugging NAV web services while I am running .Net web application.

It is kind of difference compare to others posted http://blogs.msdn.com/clausl/archive/20 ... -2009.aspx.

The scenario, I was making the insertion from asp.net web application into Nav 2009 through Nav Page Web Service, however, the insertion was failed. I got the Exception captured in .Net which pointed out which codeunit in the Nav causing the insertion failed, anyhow, it was not detailed enough. I am hoping I can debugging it in more detail level of the C/AL Code.

Any ideas? Thx in advance.

Answers

  • Options
    derrickderrick Member Posts: 86
    edited 2009-07-24
    The error encountered for the above scenario was:

    "Metadata for object of type CodeUnit with id 90000 is in a failed state. This is caused by a previous exception: Compilation of module 'C:\Documents and Settings\All Users.WINDOWS\Application Data\Microsoft\Microsoft Dynamics NAV\60\Server\MicrosoftDynamicsNavServer\module\Codeunit90000.netmodule' failed.
    This could be caused by differences between binaries in your installation or your database. Ensure that all installation components are consistent and up to date.
    Error details: c:\Documents and Settings\All Users.WINDOWS\Application Data\Microsoft\Microsoft Dynamics NAV\60\Server\MicrosoftDynamicsNavServer\source\Codeunit\Codeunit90000.cs(1889,156) : error CS0117: 'int' does not contain a definition for 'CreateInstance' c:\Documents and Settings\All Users.WINDOWS\Application Data\Microsoft\Microsoft Dynamics NAV\60\Server\MicrosoftDynamicsNavServer\source\Codeunit\Codeunit90000.cs(1898,154) : error CS0117: 'int' does not contain a definition for 'CreateInstance' "

    Does anyone seen this before?
  • Options
    ara3nara3n Member Posts: 9,256
    make sure the object is compiled and restart the service tier.

    I believe this is fixed in sp1.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • Options
    derrickderrick Member Posts: 86
    Yes, it was compiled and service tier was restarted, problem remains.

    Any ideas?
  • Options
    ara3nara3n Member Posts: 9,256
    Delete all the records from 2000000079 Object Tracking table. Recompile CU 6049661 and restart the service tier.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • Options
    derrickderrick Member Posts: 86
    "Metadata for object of type CodeUnit with id 90000 is in a failed state. This is caused by a previous exception: Compilation of module 'C:\Documents and Settings\All Users.WINDOWS\Application Data\Microsoft\Microsoft Dynamics NAV\60\Server\MicrosoftDynamicsNavServer\module\Codeunit90000.netmodule' failed.
    This could be caused by differences between binaries in your installation or your database. Ensure that all installation components are consistent and up to date.
    Error details: c:\Documents and Settings\All Users.WINDOWS\Application Data\Microsoft\Microsoft Dynamics NAV\60\Server\MicrosoftDynamicsNavServer\source\Codeunit\Codeunit90000.cs(1889,156) : error CS0117: 'int' does not contain a definition for 'CreateInstance' c:\Documents and Settings\All Users.WINDOWS\Application Data\Microsoft\Microsoft Dynamics NAV\60\Server\MicrosoftDynamicsNavServer\source\Codeunit\Codeunit90000.cs(1898,154) : error CS0117: 'int' does not contain a definition for 'CreateInstance' "

    ara3n, thanks for your reply. Anyway, it doesn't solve my problem.
    Let me describe it further,

    I was working on ASP .Net projects accessing to NAV2009 classic client via NAV web services. The flow is pretty straight forward, but the processes being executed in NAV are slightly complex.
    ASP.Net
    bool result = NAVWebServices.InsertRecord(
    stringA, stringB, intA, dateA);

    I hit the error whenever I executed the ASP.Net statement.
    Indeed, it is not the CU90000 object compilation error, the reason I said so is because I had tried it, the same NAV processes are being initialized from the NAV(refer 1. & 2. at below), and they were executed successfully.

    1. Make the processes execution being initialized from the OnRun() of the CU90000
    InsertRecord(
    stringA, stringB, intA, dateA);
    2. Make a NAV Form with 4 text boxes and 1 submit button.
    CodeUnit90000.InsertRecord(
    stringA, stringB, intA, dateA);

    Before that, I was thinking the NAV debugger or Code Coverage will be triggered as usual even the process initialization is from the ASP.Net via web services, but apparently it is not.

    I am looking for the clue if somebody had faced the same problem before or please pinpoint how could I debug the C/AL code for this case.

    Any ideas? Thanks in advance.
  • Options
    derrickderrick Member Posts: 86
    Does anybody have an idea? :-k Please... thanks in advance.
  • Options
    derrickderrick Member Posts: 86
    Hey, buddies, fyi, the mentioned error has automatically gone after applied in NAV60SP1. \:D/
  • Options
    ara3nara3n Member Posts: 9,256
    I'm glad your problem is solved.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • Options
    derrickderrick Member Posts: 86
    Thanks, ara3n.
Sign In or Register to comment.