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

Path Aliases for Local Webroot Fails

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

    Path Aliases for Local Webroot Fails

    I recently noticed that the file upload routines in my application fail on the development server. All of them. Running on the WAS they all work fine.

    This is in build 8540. Not a problem in 8417 and earlier builds. I skipped 8483.

    In 8540 there are changes in how path aliases are defined. They can only be defined in View > Settings. You can no longer edit them in Project Properties.

    The reason my uploads fail is because the Path Aliases are not being recognized.

    For instance, I have a path alias [PathAlias.Docs] = C:\A5Webroot\Documents\

    This will test it:

    Code:
    function testPathAliasDocs as c (e as p)
    dim js as c
    dim _path as c = "[PathAlias.Docs]"
    dim filename as c = _path '+ "name"
    filename = filename_decode(filename)
    js = "alert('" + js_escape(filename) + "');"
    testPathAliasDocs = js
    end function


    On the development server It returns c:\Alpha5\name

    On the WAS it returns c:\A5Webroot\Documents\name

    Looking for someone to test this...
    Attached Files

    #2
    I’ll check my versions. I ran into problems with my path alias as well on the (oct I think) upgrade. I reported it but unfortunately it was no reproducible by Selwyn. My suspicion was it was my project files or something. I emailed him a couple of days later and told him I didn’t think the debug time was worth the effort vs me just coding the file location into a session variable at the login screen.

    Curious to see the resolution on this so subscribed for sure.

    Comment


      #3
      This issue is deeper than I first thought. In the release notes for build 8540:
      UX and Grid Component - Fix connection strings and aliases - A new utility function has been added to the Bulk
      Operations
      menu in the Web Projects Control Panel. The Fix connection strings and aliases command will scan all Grid and UX
      components in a project looking for explicit connection strings and will replace these connection string with named connection
      strings. If a named connection string does not exist a new named connection string will be created. Also, all Xbasic code will
      be scanned for explicit file paths and these will be converted to use aliases.


      I am leery of operations that will make changes to code, and I found no documentation on this other than the release notes.
      After making sure I have a fresh backup of all files in my project folder, I decided to experiment with this.

      I ran the operations and it started with this:

      FixConnectionStrings.png


      I entered a suffix and ran the utility. When it completed it had created multiple aliases in Settings > Aliases, and had created duplicate components.
      I have some hard coded explicit paths defined in my code that I use for debugging xbasic code. But these are commented out before publishing.
      This utility modified every instance of the commented out code.

      In addition, I added an explicit connection string to a component and published it.
      The string was modified when I published, without running the utility.

      I then deleted all the duplicate components and also deleted all the aliases that the utility had created.

      When I next published a component, I received this:
      ConnectionStringErrors.png

      As far as I can tell, none of the connections listed exist anywhere in my project.

      I clicked Ignore problem and the component was published.​

      Comment


        #4
        New Alpha build 8565 released yesterday. I just installed the developer version. This issue is unchanged.

        Bottom line is that the developer server and WAS interpret path aliases differently.
        Attached Files

        Comment


          #5
          I anyone willing to test this and post the results?

          Comment


            #6
            I'm currently on version 8483. I haven't had time to try the new versions yet. I have never used an alias before, but Alpha seems to be forcing them on me. Even though I never ran the "Fix connection strings and aliases " bulk operation, I am finding [alias_1] in my xBasic code. If I remove it and put back the path that I had before, click Save, then close and re-open my project, [alias_1] is back. I suppose I would be fine with it, but it seems to have broken my app. Can no longer do a file download to IIS Server like I was doing before. The alias does exist under View, Settings, although I never created them.

            Comment


              #7
              This is what I have found so far....
              Using a path alias that includes a sub folder within the webroot no longer works when published locally.
              It seems to work fine when published on my production machine using the WAS.
              So if I have an alias defined as this:
              PathAlias.Docs]|C:\A5Webroot\Documents\
              And then in an xbasic reference it like this:
              Code:
              dim _path as c = "[PathAlias.Docs]"
              dim filename as c = _path '+ "name"

              It returns the wrong path.

              But if I define a path alias like this:
              [Pathalias.WebRoot]|C:\A5Webroot\
              And change my code to:
              Code:
              dim _path as c = "[Pathalias.WebRoot]Documents"
              dim filename as c = _path + "\name"

              This will now work on the development server and the WAS.

              I have not tested referencing a folder in a download action in a builder, but I suspect it would have the same issue.

              So folks will start seeing this problem when downloading files.

              And when publishing to a production server, if you see new aliases being created such as [alias_1] . [alias_2] , etc., it is because Alpha now does that automatically. It changed my code in xbasic functions to [alias_1], [alias_2], and created new connection strings.
              Attached Files

              Comment


                #8
                No such luck for me with the download of a file. I tried your suggestion with the sub folder. I even tried a completely different directory not in the web root. The "On Upload Complete" runs, I just never see the file on the server. No errors or anything. I suppose I will put together a test case when I have a chance.

                Comment


                  #9
                  a5_application.a5i is a file that gets published every time a component is published. It contains path alias values that your application uses.
                  This is an excerpt from the file:
                  At run-time, your Xbasic scripts can lookup an alias as follows:
                  myAlias = _A5_Aliases.get("myAliasName")
                  _A5_Aliases.get() is not mentioned in Alpha's documention.​

                  This will return the correct path, including sub folders. It works with the development server and the WAS, and in working preview:
                  Code:
                  dim _path as c = _A5_Aliases.get("Pathalias.temp")

                  Comment

                  Working...
                  X