Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Wrong License Id

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Wrong License Id

    hi
    in build 8
    the command
    string LId = NinjaTrader.Cbi.License.Id;
    does not set the correct value to LId

    btw the command string MId = NinjaTrader.Cbi.License.MachineId;

    works well

    #2
    In NT7, Cbi.License.MachineId works well for me.

    Good to know it still works in NT8.

    Comment


      #3
      i probably made a mistake but the machineId does not function as well

      Comment


        #4
        Hello,

        Thank you for the post.

        I would be uncertain on what specifically is wrong based on your two replies, could you instead provide the Sytax that is not working correctly for you and the value it produced?

        In your first post you asked about the NinjaTrader.Cbi.License.Id; not working and said the NinjaTrader.Cbi.License.MachineId; was working, in your most recent post you said the opposite of this.

        Could you provide better detail on what specifically is happening and provide the syntax associated with your question?

        Please let me know if I may be of additional assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          hi
          in my post i specified the commands i used to get for liscense ID and machineId


          the values got for both was wrong

          Comment


            #6
            Hello,

            Thank you for the reply.

            Unfortunately I do not see anything incorrect with the original syntax you had provided, I do see the correct machine ID and parsed ID from the config file. Once a user enters a license key it would be parsed and placed into the config file as a secure string.

            Can you provide a sample that demonstrates otherwise or provide any further information on how to reproduce the incorrect information you are seeing?

            Please let me know if I may be of further assistance.
            JesseNinjaTrader Customer Service

            Comment


              #7
              rehi

              the syntax is correct

              but when i check the values actually accepted into the script variables

              they do not match to the values i see in the "help" or "aboute"

              Comment


                #8
                Hello,

                Correct, this would not match the License you see in Help -> About, this is a Parsed or secured string from the config file. You would instead need to manually edit the Config.xml file to see the string you are getting returned from this property.

                The Machine ID should also be the machine ID that is listed in the config.xml file.

                Ninjatrader 8 has further security features over NT7 so these items have changed and would now reflect the secure value from the config file instead of the real ID which is only converted internally.

                Please let me know if I may be of further assistance.
                JesseNinjaTrader Customer Service

                Comment


                  #9
                  can you supply a code that will be used in the script so that the "real values" ( as seen in the help , about ) will be placed in a string variable

                  Comment


                    #10
                    Hello,

                    unfortunately I would be unaware of any properties that bypass NinjaTraders security features on storing/getting this information in the config file. This is a hidden class in general, additionally it is likely most users would generally not like a Paid live license to be publicly visible by any installed NinjaScript item.

                    In general the Machine ID is used with Vendor licensing for third party vendors, this is all handled internally and if you are a vendor using the appropriate Vendor license methods/instructions this would bypass the need to get this value manually.

                    Licenses would only be used to Activate/Deactivate features of the platform and delegate connection technologies.

                    Could I ask, what is the purpose of finding the License and Machine ID? If this is to know what license the user is using to delegate Live or Sim features, you can instead check the Account being used potentially.

                    Otherwise if this is for a personal or otherwise authentication system I would suggest using other means like username/password as these values will not equal what you see in the user interface directly.

                    Please let me know if I may be of further assistance.
                    JesseNinjaTrader Customer Service

                    Comment


                      #11
                      hi

                      i develop ninja script , not for commercial use ,

                      i give my script to friends as DLL or EXE file .

                      i want to make a simple verification check that my code is used by my friends only for that i need the machine id or lisence id

                      Comment


                        #12
                        Hello,

                        In this case I would not suggest using the Machine ID or License at all as you would likely run into problems like this. In general only third party vendors would be able to use the Machine ID for licensing using the Vendor license system.

                        For personal protection on assemblies, I would suggest a Username/Password or writing your own type of authentication system.

                        If you are exporting a protected assembly using the supported agile.net, that assembly will be protected or not human readable so the contents inside the assembly like a username/password system and users/passwords should be safe in this case.

                        If you are not exporting a protected assembly but only as a compiled assembly, this it turn could be viewed by an advanced programmer that has the ability to. In this case no authentication system would be needed as you are not really "Securing" the code but more or less just packing it into one file.

                        Please let me know if I may be of additional assistance.
                        JesseNinjaTrader Customer Service

                        Comment


                          #13
                          Originally posted by NinjaTrader_Jesse View Post
                          In this case I would not suggest using the Machine ID or License at all as you would likely run into problems like this.
                          What problems?

                          The OP simply needs to use the correct property name and problem solved.

                          Comment


                            #14
                            Originally posted by NinjaTrader_Jesse View Post
                            Hello,

                            In this case I would not suggest using the Machine ID or License at all as you would likely run into problems like this. In general only third party vendors would be able to use the Machine ID for licensing using the Vendor license system.

                            For personal protection on assemblies, I would suggest a Username/Password or writing your own type of authentication system.

                            If you are exporting a protected assembly using the supported agile.net, that assembly will be protected or not human readable so the contents inside the assembly like a username/password system and users/passwords should be safe in this case.

                            If you are not exporting a protected assembly but only as a compiled assembly, this it turn could be viewed by an advanced programmer that has the ability to. In this case no authentication system would be needed as you are not really "Securing" the code but more or less just packing it into one file.

                            Please let me know if I may be of additional assistance.
                            This answer is not fully baked.

                            Don't all NT7 scripts have access to the string value in the property Cbi.License.MachineId? Has this changed for NT8?

                            What the OP is trying to do with MachineId seems perfectly valid to me. The OP is trying to lock the DLL to only running on machines with approved NT installations (aka, his friends). Nothing wrong with that.

                            All the better the assembly is protected, of course.

                            He doesn't appear to be a commercial vendor, but nothing special is needed to access the MachineId property, right? I mean, it's just a string ...

                            Comment


                              #15
                              Originally posted by NinjaTrader_Jesse View Post
                              Hello,

                              In this case I would not suggest using the Machine ID or License at all as you would likely run into problems like this. In general only third party vendors would be able to use the Machine ID for licensing using the Vendor license system.
                              Btw, I don't think he's using or cares about the Vendor license system.

                              He's probably using MachineId as part of a homegrown solution to check that the NT installation is one of his friends.

                              He probably built a hardcoded list of strings containing all the machine ids of his friends.

                              In Initialize or OnStartUp (assuming NT7), he checks the property MachineId to make sure it is present in this list of "approved" machine ids.

                              It's easy to assume he's porting his code to NT8, thus his question.

                              What problems could arise from using MachineId in this way?

                              Answer: None.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by proptrade13, Today, 11:06 AM
                              1 response
                              5 views
                              0 likes
                              Last Post NinjaTrader_Clayton  
                              Started by quantismo, 04-17-2024, 05:13 PM
                              4 responses
                              30 views
                              0 likes
                              Last Post quantismo  
                              Started by love2code2trade, 04-17-2024, 01:45 PM
                              4 responses
                              32 views
                              0 likes
                              Last Post love2code2trade  
                              Started by cls71, Today, 04:45 AM
                              2 responses
                              10 views
                              0 likes
                              Last Post eDanny
                              by eDanny
                               
                              Started by kulwinder73, Today, 10:31 AM
                              1 response
                              10 views
                              0 likes
                              Last Post NinjaTrader_Erick  
                              Working...
                              X