NAV 2009 R2 NST management within NAV v6.02

AdministratorAdministrator Member, Moderator, Administrator Posts: 2,500
edited 2011-02-24 in Download section
NAV 2009 R2 NST management within NAV
This is "remake" of my NST Management, this time directly in NAV 2009 R2 environment!

You can manage your NSTs directly from the client (if you have the permissions).
You can start and stop the services, create new NST or delete them and you can edit their config files. All done in clear DotNet in NAV. Thus you need to use the NAV 2009 R2, which supports the DotNet interoperability.

When creating the new NST, you are selecting the "template" folder, from which will be the target folder created. In this way, you can have different versions of "templates" and create different versions of NST with same tool.

Objects are placed into range 50000, starting point is the Page 50000.

http://www.mibuso.com/dlinfo.asp?FileID=1337

Discuss this download here.

Comments

  • pdjpdj Member Posts: 643
    Works like a charm \:D/ \:D/

    However; I found a few tiny problems.
    Please rename the Array variable in Cod50000 (CopyFolder) - it is a reserved word and prevents import of the txt file. (Actually surprised that is doesn't complain about the Dialog variable. I thought that was why it is normally called Window)
    Please add the "PC Name" in the Start and Stop and Refresh functions. Otherwise it tries to start/stop the services on localhost. (just add the "PC Name" parameter)
    The ENU caption of the Status field is "Stav", while the CSY caption is "Status" - guess it should be the opposite? 8)
    Regards
    Peter
  • kinekine Member Posts: 12,562
    :thumbsup: Thanks, I will look at it and correct it... it was my night-work... 8)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • kinekine Member Posts: 12,562
    Ok, update uploaded, will be available after Luc will publish it...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • AdministratorAdministrator Member, Moderator, Administrator Posts: 2,500
    NAV 2009 R2 NST management within NAV v6.02
    This is "remake" of my NST Management, this time directly in NAV 2009 R2 environment!

    You can manage your NSTs directly from the client (if you have the permissions).
    You can start and stop the services, create new NST or delete them and you can edit their config files. All done in clear DotNet in NAV. Thus you need to use the NAV 2009 R2, which supports the DotNet interoperability.

    When creating the new NST, you are selecting the "template" folder, from which will be the target folder created. In this way, you can have different versions of "templates" and create different versions of NST with same tool.

    Objects are placed into range 50000, starting point is the Page 50000.

    Version 6.02.00

    - some missing/wrong captions
    - start/stop/refresh works with the remote servers
    - some variables renamed

    Version 6.01.00
    - initial version

    http://www.mibuso.com/dlinfo.asp?FileID=1337

    Discuss this download here.
  • kinekine Member Posts: 12,562
    I have just found one error: when creating remote NST, the image path in the register is created to the admin share instead to local disc. The service cannot be started after that. There is the patch:

    Codeunit 5000, function CreateNewService:
    Window.OPEN(Text000);
    IF Directory.Exists(TargetPath) THEN BEGIN
      IF NOT CONFIRM(FolderExists,FALSE,TargetPath) THEN
        ERROR('');
      Directory.Delete(TargetPath,TRUE);
    END;
    CopyFolder(TemplatePath,TargetPath);
    Window.CLOSE();
    
    //--------------Inserted
    IF STRPOS(TargetPath,'$')>0 THEN BEGIN
      LocalTargetPath := CONVERTSTR(TargetPath,'$',':');
      LocalTargetPath := COPYSTR(LocalTargetPath,STRPOS(LocalTargetPath,':')-1);
    END;
    //--------------End of insert
    
    IF CreateWS THEN
      Type :='share'
    ELSE
      Type := 'own';
    
    Parameters := STRSUBSTNO(InstallText,ComputerName,ServicePrefix+ServiceName,LocalTargetPath,ServiceName,
        STRSUBSTNO(Caption,ServiceName),
        Type,'auto'); //TargetPath replaced with LocalTargetPath
    
    IF CreateWS THEN BEGIN
      Parameters := STRSUBSTNO(WSInstallText,ComputerName,WSServicePrefix+ServiceName,LocalTargetPath,ServiceName,
          STRSUBSTNO(WSCaption,ServiceName),
          Type,'auto',ServiceName); //TargetPath replaced with LocalTargetPath
      Proc := Proc.Process;
    

    LocalTargetPath is new local variable of type text[1000].
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • manisharma31manisharma31 Member Posts: 285
    Even after compiling all the objects i am getting below error,
    I am getting error as " The Object metadata does not exist. Identification fields and values: Object Type=Page,Object Id=50000"
    Regards,
    Manish
  • kinekine Member Posts: 12,562
    It is interesting. Are you sure that your DB is NST enabled? (I mean the checkbox in the File-Database-Alter-Options-Enable for Microsoft Dynamics NAV Server)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • manisharma31manisharma31 Member Posts: 285
    Ok now its working.
    When running the page directly from classic it was opening different database & searching page 50000.
    Modified the config file with correct database & it started.

    I have another query,
    I don't see any option to eidt/modify the existing service withing from navision (Page 50000).
    Regards,
    Manish
  • kinekine Member Posts: 12,562
    What you mean with "Edit/modify"? There is action to edit the config file of the service tier.... You cannot rename it, you can just delete/create...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • paurolapaurola Member Posts: 43
    Good job.

    I tried to modify this gadget so that I could set the user account for the service and enable TCP/IP-port sharing. Cause I'm not familiar with the .NET System variables, I gave it up. I could though change the code so, that the SC utility would be called from the command line, but that would miss the point...
  • kinekine Member Posts: 12,562
    In CU 50000 you can just modify the code:
    Parameters := STRSUBSTNO(InstallText,ComputerName,ServicePrefix+ServiceName,LocalTargetPath,ServiceName,
        STRSUBSTNO(Caption,ServiceName),
        Type,'auto');
    

    The Parameters is string containing all the parameters for the sc command. You can modify the obj and add password parameters there if you want... ;-)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • paurolapaurola Member Posts: 43
    kine: Yes, that's the line I was looking at but was a bit uncertain.

    So you are saying I could simply add the string "depend= NetTcpPortSharing obj= "NT Authority\NetworkService"" in the end of the line after the STRSUBSTNO function ends?

    This would really help me on our development environment where we have over 100 NAV db:s...
  • kinekine Member Posts: 12,562
    The obj= part is already there... it is part of the InstallText text constant...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • paurolapaurola Member Posts: 43
    Oops.

    This is embarrassing. I tested the string your app creates with and error message - and both parameters were already there...

    TY very much, I'll start implementing this now.
Sign In or Register to comment.