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

IIS Publish Security

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

    IIS Publish Security

    I have manage to publish my Alpha Web Application to IIS successfully and created AspNetDB database for IIS security purposes. All the security users and roles are transfer over to AspNetDB successfully.

    However on my Alpha WebApplication, when my current ux component for Edit Current User are bind to WebSecurityUser Tables. But when i created a new user after Publishing to IIS, the new user are created into AspNetDB database.

    It appears to me that the transfer of security information is only one way from present Alpha WebSecurityTable to AspNetDB, but not the the other ways. If that is the case, I will need to amend all my ux after publishing to bind to the AspNetDB database if I use IIS. Practically that is not possible while I am developing as before publishing to IIS, I do not have AspNetDB while developing.

    Anyone know any way to solve this issue, or am i missing something during the publishing profile settings.

    #2
    Re: IIS Publish Security

    The security data should be considered a closed system and should never be accessed or edited directly. All access to security data should be through the Security Action Scripting in a UX, xbasic security functions, or Context.Security methods.

    If you need to store additional user information, that information should be in tables separated from the security data and then linked to security with the security UserId / userName.

    The UX templates for "SecurityFramework-EditAccountForExistingUser" and "SecurityFramework-CreateNewUserAccount_and_AddUserInformationToRelatedTable" show how to build a UX that can edit a separate user information table and the security data in one component and how the two separate data stores are linked with the security "UserName" value.

    Comment


      #3
      Re: IIS Publish Security

      Originally posted by JerryBrightbill View Post
      The security data should be considered a closed system and should never be accessed or edited directly. All access to security data should be through the Security Action Scripting in a UX, xbasic security functions, or Context.Security methods.
      I'm not too happy about having to find another way to write my code.

      Code:
      function xbAddNewLogin as c (e as p)
      
      ' -- validation code omitted, for this sample.  The real app has pages and pages of validation code here --
      
      ' -- Initialization of "args" variable omitted, for this sample.   --
      
      '-- Prepare to Add User to Web Security
      dim uGuid as c
      uGuid = api_uuidcreate()
      if typeof(uGUID) = "K"
      	uGuid = convert_type(uGuid, "C")
      end if
      
      uGuid = lower(uGuid)
      args.add("pWSUguid", uGuid)
      SQLCmd = <<%sql%
      INSERT INTO WebSecurityUsers
       (Guid, Userid, Password)
      VALUES (:pWSUguid, :pUidnc, :pPwd)
      %sql%
      
      '=== BEGIN SQL TRANSACTION
      flagResult = cn.BeginTransaction()
      if flagResult = .f. then 
      	xbAddNewLogin = "alert('Could not begin db transaction; reported error: " + js_escape(cn.CallResult.text) + "');"
      	cn.close()
      	end 
      end if 
      '-- Add User to Web Security
      flagResult = cn.execute(SQLCmd,args)
      if flagResult = .f. then 
      	xbAddNewLogin = "alert('Operation cancelled!  Could not add user ID into main user table; reported error: " + js_escape(cn.CallResult.text) + "');"
      	cn.RollBackTransaction()
      	cn.close()
      	end 
      end if 
      '-- Add User to our custom table that holds additional attributes about each user 
      args.add("pFirstName", e.DataSubmitted.ulFirstName)
      args.add("pMI", e.DataSubmitted.ulMI)
      args.add("pLastName", e.DataSubmitted.ulLastName)
      args.add("pSuffix", e.DataSubmitted.ulSuffix)
      args.add("pBirthDate", e.DataSubmitted.BirthDate)
      args.add("pAdd_SysID", session.snprsn)
      args.add("pAdd_Date",  DATE()+ " " + TIME()) 
      SQLCmd = <<%sql%
      INSERT INTO UsrLogin
       (ulUsrID, ulClientGUID, ulFirstName, ulMI, ulLastName, ulSuffix, ulBirthDate, ulRecAdd_Person_SysID, ulRecAdd_Date)
      VALUES     (:pUidnc, :pClientID, :pFirstName, :pMI, :pLastName, :pSuffix, :pBirthDate, :pAdd_SysID, :pAdd_Date)
      %sql%
      
      flagResult = cn.execute(SQLCmd,args)
      if flagResult = .f. then 
      	xbAddNewLogin = "alert('Operation cancelled!  Could not add user ID into secondary user table; reported error: " + js_escape(cn.CallResult.text) + "');"
      	cn.RollBackTransaction()
      	cn.close()
      	end 
      end if 
      
      '=== COMMIT SQL TRANSACTION
      flagResult = cn.CommitTransaction()
      if flagResult = .f. then 
      	xbAddNewLogin = "alert('Operation cancelled!  Could not commit changes to database; reported error: " + js_escape(cn.CallResult.text) + "');"
      	cn.close()
      	end 
      end if 
      
      '-- Alpha used to recommend using the "Ulink" field in WebSecurityUsers table to link records
      '-- between that table and any custom ancillary tables.  The following is a carry-over from that recommendation...
      '-- Most of the anciallary tables have now been changed to use the user's login ID.  There is still one remaining table
      '-- that uses the ulink data, so the following is included for this sample.
      
      '-- Get guid ID that was just created in our custom ancillary table, for user we just added. 
      '-- The original Alpha recommendation asked that this value be put back into WebSecurityUser.Ulink field
       
      SQLCmd = <<%sql%
      SELECT ulUsrLogin_GUID
      FROM UsrLogin
      WHERE upper(ulUsrID) = :pUidUC
      %sql%
      flagResult = cn.execute(SQLCmd,args)
      if flagResult = .f. then 
      	xbAddNewLogin = "alert('Could not get internal ID assigned to user in secondary table (at 1); contact support!');"
      	cn.close()
      	end 
      end if 
      rs = cn.ResultSet
      flagResult = rs.NextRow()
      if flagResult = .f. then 
      	xbAddNewLogin = "alert('Could not get internal ID assigned to user in secondary table (at 2); contact support!');"
      	cn.close()
      	end 
      end if 
      dim newUsrGuid as K
      newUsrGuid = rs.data(1)
      args.add("pUsrLogin_GUID", newUsrGuid)
      
      
      '-- More code deleted from here that inserts data into a few other tables that this app requires ---
      
      '-- Create JS needed to append the new user to the LIST
      flagResult = cn.execute(SQLCmdGetUsr,args)
      if flagResult = .f. then 
      	xbAddNewLogin = "alert('Could not get Main and Secondary Login records for new user (at 3); contact support!');"
      	cn.close()
      	end 
      end if 
      rs = cn.ResultSet
      dim json as c
      json = rs.ToJSONObjectSyntax()
      json = stritran(json, crlf(), "," + crlf())
      json = "[" + rtrim(json, ",") + "]"
      js = ""
      js = js + "var lobj = {dialog.object}.getControl('LIST_USERS');" + crlf()
      js = js + "var cp_data = " + json + ";" + crlf()
      js = js + "lobj.appendRows(cp_data);" + crlf()
      js = js + "var options = {};" + crlf()
      js = js + "options.mode = 'into-view';" + crlf()
      js = js + "lobj.scrollToItem('" + uGuid + "', options);" + crlf()
      js = js + "lobj.setValue('" + uGuid + "');" + crlf()
      delete rs
      xbAddNewLogin = js + " {grid.object}.runAction('MsgLoginRecAdded');"
      cn.close()
      end function ' xbAddNewLogin

      Comment

      Working...
      X