Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 22nd, 2024, 10:24 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 21 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Flex Pub-Post Web Data-Using ASP
PostPosted: April 18th, 2011, 3:33 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi Mack,

Thanks for this link, which points the way to a possible solution for one of the errors. I could try to re-write the query to make the necessary changes.

Going back to basics, the original intent for all this: all I am trying to do is check if a potential user of the Flash SWF (has supplementary materials for the lesson) is registered as a lesson user. If not, they would not have access to the Flash file. If their name is in the LMS's DB for registered users, then they could view this separate Flash file.

So, maybe there is another way to accomplish this?

_________________
Stephen


Top
 Profile  
 
 Post subject: Re: Flex Pub-Post Web Data-Using ASP
PostPosted: April 18th, 2011, 3:48 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
If you just want communication between two SWF then use the flash cookie.

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: Flex Pub-Post Web Data-Using ASP
PostPosted: April 18th, 2011, 4:07 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi Mack,

Yes, I started with the shared objects ("cookies"). But, I thought, possibly mistakenly, that this would be less secure than checking a DB to see if the potential Flash SWF user is registered for the lesson. Since in the final analysis, all Flash files can be decompiled and changed, it probably wouldn't matter if the cookie checking or the DB checking were used, since both can be simply removed.

_________________
Stephen


Top
 Profile  
 
 Post subject: Re: Flex Pub-Post Web Data-Using ASP
PostPosted: April 18th, 2011, 5:18 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
stephen wrote:
Since in the final analysis, all Flash files can be decompiled and changed, it probably wouldn't matter if the cookie checking or the DB checking were used, since both can be simply removed.


Problem as old as time. Have you ever decomplied a DW SWF though, certainly doesn't need much added obscurity :-)

One of the ways to ensure that the SWF is useless if stolen to keep as many variables on the server as possible thus making it really annoying and possible even pointless to have download your SWF.

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: Flex Pub-Post Web Data-Using ASP
PostPosted: April 18th, 2011, 6:17 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi Mack,

In some of my eLearning materials focused on health, the access restrictions are needed to prevent people, who have not taken a specific course and had a chance to review safe use and cautionary guidelines, from accessing materials requiring viewing these first. Flash as mentioned is a vulnerable resource, but it can be deployed on many platforms.

I appreciate your suggestions. Nothing is "perfect" but the more obstacles to prevent misuse, the more likely misuse is prevented.

_________________
Stephen


Top
 Profile  
 
 Post subject: Re: Flex Pub-Post Web Data-Using ASP
PostPosted: April 19th, 2011, 4:53 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi,

With much help, online research, testing, am able to use ASP to retrieve SQL Server DB data.

Here's a sample ASP script which, coupled with a post web data action in Opus Flex, can retrieve data using a connection string to access the DB (there are other ways to connect depending on your SQL Server's configuration).

ASP
Code:
<%
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Provider=sqloledb; Data Source=xxxxxxx.db.xxxxxxx.xxxxxxx.com; Initial Catalog=yyyyyyy; User ID=yyyyyyy; Password=zzzzzzzzzz;"

name = Replace( Trim(Request("abc")), "'", "''" )
pwd = Replace( Trim(Request("def")), "'", "''" )

SQL = "SELECT abc FROM TableName WHERE abc='" & var1 & "' AND def = '" & var2 & "'"
Set RS = conn.Execute( SQL )
If RS.EOF Then
    Response.Write "data=NO"
Else
    Response.Write "data=YES"
End If
RS.Close
conn.Close
Response.End
%>


Steps:
1. Set up SQL Server DB that allows external input. No DSN needed for the connectionstring type connection. Populate table/columns for the items you will use for validation with some test data.
2. Create and upload an ASP page (.asp) that only contains the above code (customized for your settings/details). You can check if it is connecting and retrieving data by navigating directly to it. If working properly, the ASP page should display a response from the DB (with no Opus input, see below, it should display "data=NO").
3. In Opus Flex, create 2 text input boxes and associate them with the same variables as you will use for the post web data action>Destination tab. Add a button and post web data action, completing the Destination tab. Then, complete the Source tab, using a multiple variable, string: data, variable: data. Point the URL to the uploaded ASP file (you can use the full http:// URL or, if you publish the SWF and upload it to the same directory as the ASP file on your site, you can use /xyz.asp. Set up a text box, initially hidden, to display if the return is correct (or you could set up a 'go to next page' action if correct).
4. Test. Enter the items into the 2 text boxes that the ASP will validate with the DB, click the button. If the connections are correct and correct data is retrieved, your text box will display or your other action, like 'go to next page' will execute.

Connection configurations can be challenging. Your web hosting help files and/or DB control panel may have sample connectionstrings, or suggest other options for connecting (which will require modifying the ASP code: search online for other ASP connection configurations, if needed).

HTH

Kind Regards,

_________________
Stephen


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 21 posts ]  Go to page Previous  1, 2

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 20 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group