Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Web Security Problem - Login information Incorrect

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

    #46
    Re: Web Security Problem - Login information Incorrect

    Rich, I ran this in the interactive on the EC2 server:

    Code:
    dim cs as c = "::Name::FreightZoneMySql"
    Dim _AlphaDAO_ConnectionStrings as c 
    _AlphaDAO_ConnectionStrings = <<%txt%
    FreightZoneMySql|{A5API=MySQL,Server='fz-dev.chvdejoanwp2.us-east-1.rds.amazonaws.com',Port='3306',UserName='*****',Password='*****',Database='FreightZone'}
    %txt%
    
    DIM global _A5_AlphaDAO_ConnectionStrings as U
    dim gv as p 
    gv = global_variables()
    _A5_AlphaDAO_ConnectionStrings = loadConnectionStrings(gv, _AlphaDAO_ConnectionStrings, "AlphaDAO")
    
    dim cn as SQL::Connection
    dim flagResult as l 
    flagResult = cn.open(cs)
    if flagResult = .f. then 
    	ui_msg_box("Error","Could not connect to database. Error reported was: " + crlf() + cn.CallResult.text)
    	end 
    else
     cn.close()  
     ui_msg_box("okay", "okay")
    end if
    It worked! It returned the Okay message box.

    I will do some more testing of my publishing settings. I am limited in the time I can test because I have to use my only server license for production during the day.

    Thanks for all your help!

    Comment


      #47
      Re: Web Security Problem - Login information Incorrect

      I published to the document root. Here are some screen shots:

      1.png2.png3.png4.png

      Here is a copy of the a5_application.a5i file created by AA:

      Code:
      <%A5
      'This part of the .A5I page is generated dynamically based on the Application Variables, 
      'Aliases and Connection Strings specified in the Profile that was selected when the Web project was published.
      
      'Note about Application Variables
      'Because the Application Variables are dimmed as Global, they can be seen inside all functions
      'in the code contained in an .A5W page
      
      
      '----------------------------------Application Variables ----------------------------------------------------------------------
      'No Application Variables have been defined
      
      '----------------------------------Aliases ----------------------------------------------------------------------
      
      Dim _aliases_ as c
      _aliases_ = <<%txt%
      [PathAlias.Docs]|undefined
      [PathAlias.ADB_Path]|undefined
      %txt%
      
      'Creates a global collection called '_A5_Aliases' 
      'At run-time, your Xbasic scripts can lookup an alias as follows:
      'myAlias = _A5_Aliases.get("myAliasName")
      DIM global _A5_Aliases as U
      _A5_Aliases = makeAliasCollection(_aliases_)
      
      
      '-----------------------------------AlphaDAO Connection Strings ----------------------------------------------------------
      'This is a CR-LF delimited list of AlphaDAO connection strings.
      'Connection strings are encrypted. If you want to edit a connection string shown here, you can enter
      'an unencrypted connection string by ommitting the 'Encrypted:' prefix.
      
      Dim _AlphaDAO_ConnectionStrings as c 
      _AlphaDAO_ConnectionStrings = <<%txt%
      FreightZoneMySql|Encrypted:xI3OKMADTTvO769EkBNhYozuPMCgqefABxMebMjTvYEunHWr7L5nQdLuBQgK0OG21U+DaGSCpi92ovHuP20t4+SufU1cokYjD5+knkex9SapvLzpg9+nfby3oiFc2b+OZmZUJ6Cbqa850VR9UzThyi18WF1+1ImxuS4osKqok9j8x7seearRGoWQ0Kl6WecbD+ldS5TFW48j9l7R2zcOiviWEqce/NM1
      FreightZoneMySqlAWS|Encrypted:xI3OKMADTTvO769EkBNhYozuPMCgqefABxMebMjTvYEunHWr7L5nQdLuBQgK0OG21U+DaGSCpi92ovHuP20t4+SufU1cokYjD5+knkex9SapvLzpg9+nfby3oiFc2b+OZmZUJ6Cbqa850VR9UzThyi18WF1+1ImxuS4osKqok9j8x7seearRGoWQ0Kl6WecbD+ldS5TFW48j9l7R2zcOiviWEqce/NM1
      Orig FZ Conn String|Encrypted:xI3OKMADTTvO769EkBNhYoS7neEqHqxHzhTxEfpKL2PN1ekUuoWB0SSD0HRBi6WKJeiojvIdIRq4gA9psFVkF+Jiw+WnugIzfLekkMkZ5+Yi26nmXTlxJ87IV3nglesfaOgIYXU+KkKJZPSWYg6cPQ==
      %txt%
      
      'Create a global collection called '_A5_AlphaDAO_ConnectionStrings'
      'At run-time, your Xbasic scripts can lookup a connection string as follows:
      'myConnectionString = _A5_AlphaDAO_ConnectionStrings.get("myConnectionStringName")
      
      DIM global _A5_AlphaDAO_ConnectionStrings as U
      dim gv as p 
      gv = global_variables()
      _A5_AlphaDAO_ConnectionStrings = loadConnectionStrings(gv, _AlphaDAO_ConnectionStrings, "AlphaDAO")
      
      
      
      '-----------------------------------Web Project Properties ----------------------------------------------------------
      'This code loads Project Properties. At runtime, your Xbasic code can read Project Properties as follows:
      'dim projProp as p
      'projProp = a5_getWebProjectProperties()
      
      
      dim _webProjectProperties as c 
      _webProjectProperties = <<%txt%
      DIM aexFiles as P
      DIM aexFiles.fileNames as C = "FreightProV1.aex"
      DIM fileDownload as P
      DIM fileDownload.allowedFilenamePatterns as C = "*.pdf,*.xls*,*.jpg,*.jpeg,*.bmp,*.png,*.rtf,*.tif*,*.doc*,*.csv,*.iif,*.txt"
      DIM fileDownload.allowedFolderPatterns as C = "<ApplicationRoot>\Documents,<ApplicationRoot>\QBexport,<ApplicationRoot>\temp"
      DIM fileDownload.blockedFilenamePatterns as C = "*.exe"
      DIM projectStyle as C = "MobBlue"
      DIM useMicrosoftXPSPrinterForPDF as L
      DIM convertXPSToPDF as L = .T.
      DIM jsLibraries as P
      DIM jsLibraries.jQueryCore as C = "Load Internal Version"
      DIM jsLibraries.jQueryUI as C = "Load Internal Version"
      DIM jsLibraries.links as C
      DIM jsLibraries.includeImageGallery as L
      DIM jsLibraries.includeGoogleJSAPI as L
      DIM jsLibraries.jQueryCoreVersion as C = "1.6.2"
      DIM jsLibraries.jQueryUIVersion as C = "1.8.16"
      DIM jsLibraries.cordova as P
      DIM jsLibraries.cordova.loadFrom as C = "BuiltIn"
      DIM jsLibraries.includeCKEdit as L
      DIM cssLibraries as P
      DIM cssLibraries.jQuery as C = "No Theme"
      DIM cssLibraries.links as C
      DIM email as P
      DIM email.smtp_server as C
      DIM email.smtp_username as C
      DIM email.smtp_password as C
      DIM email.smtp_port as C
      DIM email.smtp_SSLOption as C
      DIM email.from as C
      DIM email.from_alias as C
      DIM email.outbox as P
      DIM email.outbox.tableType as C = "SQL"
      DIM email.outbox.connectionString as C
      DIM email.outbox.tableName as C
      DIM email.outbox.fieldmap as C
      DIM email.outbox.sequenceName as C
      DIM email.mandrillKey as C
      DIM repository as P
      DIM repository.tableType as C = "SQL"
      DIM repository.connectionString as C
      DIM repository.tableName as C
      DIM repository.fieldmap as C
      DIM workQueue as P
      DIM workQueue.tableType as C = "SQL"
      DIM workQueue.connectionString as C
      DIM workQueue.tableName as C
      DIM workQueue.fieldmap as C
      DIM helpTable as P
      DIM helpTable.tableType as C = "SQL"
      DIM helpTable.connectionString as C
      DIM helpTable.tableName as C
      DIM helpTable.fieldmap as C
      DIM textDictionary as P
      DIM textDictionary.tableType as C = "SQL"
      DIM textDictionary.connectionString as C
      DIM textDictionary.tableName as C
      DIM textDictionary.fieldmap as C
      DIM applicationGlobalVariables as C
      DIM calendar as P
      DIM calendar.license as C = "not licensed"
      DIM css as P
      DIM css.webkit as P
      DIM css.webkit.AllowSelectionOfText as L
      DIM reportServer as P
      DIM reportServer.disable as L
      DIM NamedResources as C
      DIM siteDefaults as P
      DIM siteDefaults.guessedDefaultPage as L = .T.
      DIM siteDefaults.defaultpage as C = "Login.a5w"
      DIM siteDefaults.sessionTimeout as N = 30
      DIM PDFPrintTimeout as N
      DIM PDFPrintTimeoutMessage as C
      DIM HTMLReportOffload as L
      DIM datasynclogtable as P
      DIM datasynclogtable.tableType as C = "SQL"
      DIM datasynclogtable.connectionString as C
      DIM datasynclogtable.tableName as C
      DIM datasynclogtable.fieldmap as C
      DIM stripe as P
      DIM stripe.keysJSON as C
      %txt%
      
      dim gv as p 
      gv = global_variables()
      a5_loadWebProjectProperties(gv,_webProjectProperties)
      
      dim gv.__buildNumberExe__ as n 
      dim gv.__buildNumberAddins__ as n 
      dim gv.__guid as c 
      dim gv.__A5PublishVersion as n 
      gv.__A5PublishTimestamp = 2016151502201528595
      gv.__buildNumberExe__ = 3670
      gv.__buildNumberAddins__ = 4684
      gv.__guid = "881cd0a8-103e-46d4-b129-247b046feb0b"
      gv.__control = <<%txtcontrol%
      hV7+2zUTjP0=
      %txtcontrol%
      
      %>
      This resulted in Login Information Incorrect.

      Next, I modified just the connection string section of the a5_application.a5i file:

      Code:
      Dim _AlphaDAO_ConnectionStrings as c 
      _AlphaDAO_ConnectionStrings = <<%txt%
      FreightZoneMySql|{A5API=MySQL,Server='fz-dev.chvdejoanwp2.us-east-1.rds.amazonaws.com',Port='3306',UserName='*****',Password='*****',Database='FreightZone'}
      %txt%
      I restarted the WAS.

      I still get Login Information Incorrect.

      Comment


        #48
        Re: Web Security Problem - Login information Incorrect

        without modifying anything, if you look at the images provided, then #2.png:
        there is a property
        AlphaDAOConnections string.. click to edit, did you click and edit there to proper setting?
        thanks for reading

        gandhi

        version 11 3381 - 4096
        mysql backend
        http://www.alphawebprogramming.blogspot.com
        [email protected]
        Skype:[email protected]
        1 914 924 5171

        Comment


          #49
          Re: Web Security Problem - Login information Incorrect

          Don't know if this could be the case.
          But for our sql security to work the websecurity_users.dBp, websecurity_groups.dBp, websecurity_expired.dBp, websecurity_members.dBp files have to be in the published folder.
          Or the password is not what you expect it be be.
          Didn't read all the post before answering.
          So just ignore it.
          Last edited by [email protected]; 11-03-2016, 06:08 AM.

          Comment


            #50
            Re: Web Security Problem - Login information Incorrect

            after some 48 posts and two pages to contain them, it is unfortunate that you cannot solve this.
            i am curious to know the current settings:
            you have developer license in your "office computer" and developed database using mysql and web security all working fine. now you want to test it in amazon ec2 servers using the developer license you have.
            you installed the developer license over at the ec2, copied all the pertaining mysql files via navicat. you have checked that all web security related sql files are present at the ec2 server and you can connect directly to them. but the login information is not correct whenever you want to login via security.

            while alpha directly connects to the sql tables it still needs the linked tables ( i do not know why) to work from the developer. so if i were you,
            i would copy the database that you have developed over to amazon ec2, publish all the files including web security files to local webroot. and whenever you start the alpha developer at ec2, you have 30 minutes to test from outside. so you can test the database including your web security during that time.

            http://documentation.alphasoftware.c...20Security.xml

            here is the documentation for web security using sql. i am sure you have gone thru it. but i am adding to this post , just in case you didn't.
            thanks for reading

            gandhi

            version 11 3381 - 4096
            mysql backend
            http://www.alphawebprogramming.blogspot.com
            [email protected]
            Skype:[email protected]
            1 914 924 5171

            Comment


              #51
              Re: Web Security Problem - Login information Incorrect

              Maybe not an Alpha connection issue? This from AWS...

              http://docs.aws.amazon.com/AmazonRDS...oInstance.html


              Code:
              Two common causes of connection failures to a new DB instance are:
              
              The DB instance was created using a security group that does not authorize connections from the device or Amazon EC2 instance where the MySQL application or utility is running. If the DB instance was created in a VPC, it must have a VPC security group that authorizes the connections. If the DB instance was created outside of a VPC, it must have a DB security group that authorizes the connections.
              The DB instance was created using the default port of 3306, and your company has firewall rules blocking connections to that port from devices in your company network. To fix this failure, recreate the instance with a different port.

              Comment


                #52
                Re: Web Security Problem - Login information Incorrect

                without modifying anything, if you look at the images provided, then #2.png:
                there is a property
                AlphaDAOConnections string.. click to edit, did you click and edit there to proper setting?
                Yes I did modify the FreightZoneMySql connection string in the publishing profile.


                The DB instance was created using a security group that does not authorize connections from the device or Amazon EC2 instance where the MySQL application or utility is running. If the DB instance was created in a VPC, it must have a VPC security group that authorizes the connections. If the DB instance was created outside of a VPC, it must have a DB security group that authorizes the connections.
                Good question. However, I have been able to open a connection to the DB instance from from the EC2 server, as well as from my development machine. I don't see that there is any specific permission that the DB instance needs to grant to the WAS.


                The DB instance was created using the default port of 3306, and your company has firewall rules blocking connections to that port from devices in your company network. To fix this failure, recreate the instance with a different port.
                Again, I can open a connection to the DB instance from from the EC2 server, as well as from my development machine. So this should not be an issue.


                you have developer license in your "office computer" and developed database using mysql and web security all working fine. now you want to test it in amazon ec2 servers using the developer license you have.
                you installed the developer license over at the ec2, copied all the pertaining mysql files via navicat. you have checked that all web security related sql files are present at the ec2 server and you can connect directly to them. but the login information is not correct whenever you want to login via security.
                At this point I have uninstalled the development copy of AA from the EC2 server, and I am working with the WAS. Although I would like to use a development server, as I have 2 development licenses.

                Comment


                  #53
                  Re: Web Security Problem - Login information Incorrect

                  while this may not help you,
                  i just copied my published folder from my server ( it is a sub folder, not just under web root) and copied to a different computer where alphafive developer is installed and dumped the mysql files from the server and executed that in the same location. started the alphafive so i can borrow the server and reached the website with from outside using ipaddress and all works well without any problem.
                  so in essence yours should work too, i do not know why it is not.
                  thanks for reading

                  gandhi

                  version 11 3381 - 4096
                  mysql backend
                  http://www.alphawebprogramming.blogspot.com
                  [email protected]
                  Skype:[email protected]
                  1 914 924 5171

                  Comment


                    #54
                    Re: Web Security Problem - Login information Incorrect

                    i just copied my published folder from my server ( it is a sub folder, not just under web root) and copied to a different computer where alphafive developer is installed and dumped the mysql files from the server and executed that in the same location. started the alphafive so i can borrow the server and reached the website with from outside using ipaddress and all works well without any problem.
                    so in essence yours should work too, i do not know why it is not.
                    Did you change the connection string to connect to mysql at a different location? That is basically the only difference between my EC2 server and my local lan server. The local lan uses the exact same connection string as the development machine I am publishing from, and the EC2 has a different connection string.

                    Comment


                      #55
                      Re: Web Security Problem - Login information Incorrect

                      no i don't have to,
                      in my development machine it is local host and since i am running with alphsaserver and mysql in the same computer i am using localhost.
                      (both here at the development and as well as the test site i just did for you)
                      Last edited by GGandhi; 11-03-2016, 03:50 PM.
                      thanks for reading

                      gandhi

                      version 11 3381 - 4096
                      mysql backend
                      http://www.alphawebprogramming.blogspot.com
                      [email protected]
                      Skype:[email protected]
                      1 914 924 5171

                      Comment

                      Working...
                      X