16 Replies Latest reply on Nov 19, 2012 12:14 PM by MSpears75

    Problem with loadVariablesNum on IIS 7

    MSpears75

      [moved from AS3 forum to AS1/2 forum]

       

      First, I should note, I'm a CF developer, not a Flash developer, but unfortunately I am in a time crunch and don't have access to a flash person right now. So I apologize if I might use the wrong terms here. 

       

      We've recently purchased a new web server due to needing some upgrades. We were running ColdFusion 9 with IIS6 and our Flash applications were running great on it for several years. We've moved everything over to our new server and the only difference I can see is that we are now on Windows 2008 server with IIS 7. Still on ColdFusion 9.

       

      For some reason, in all of our flash applications we can't get dynamic data to be displayed from a database from the CF pages. However, it is only affecting the new server, the exact same code works great on the old server. You'll notice we have it pulling a txt file for our testing purposes but when we want the real thing we pull from the CFM file. Pulling the text file displays the questions without issue, but using the post with cfm file, we get nothing, just a blank spot in the Flash movie. The ReadQuestions.cfm is a simple CF page that queries a database and sends back a chunk of data to be displayed and like I said, works fine on the old machine.

       

      Is there something in IIS I am missing to make this work in IIS 7 versus IIS 6? It appears the post values just aren't being sent. Any help would be greatly appreciated!

       

      The code we are using is this:

       

      if (_level0.currentMod != _level0.kcMod) {

      _level0.quizType = 2;

      _level0.questionLoading = 1;

      if (_level0.debugLocal == 1) {

      loadVariablesNum("questionsQuiz.txt", 0);

      } else {

      loadVariablesNum("ReadQuestions.cfm", 0, "Post");

      }

      } else {

      _level0.quizType = 3;

      _level0.questionLoading = 1;

      if (_level0.debugLocal == 1) {

        loadVariablesNum("questionsKC.txt", 0);

      } else {

      loadVariablesNum("ReadQuestions.cfm", 0, "Post");

      }

      }

        • 1. Re: Problem with loadVariablesNum on IIS 7
          kglad Adobe Community Professional & MVP

          what's your new (problematic) server url?  what needs to be done (if anything) to query ReadQuestions.cfm?

          • 2. Re: Problem with loadVariablesNum on IIS 7
            MSpears75 Level 1

            It will be the same domain and URL. Directory structure is the same too. It's just not posting. Right now on the readquestions.cfm is simply runs a query based on the CourseID that is passed to it from Flash via the post. But it never receives it. Even if we hard code in the course ID, it won't respond back to the flash file. When I view it in Fiddler, I can definitely see the flash file is sending the variables over, I can see them all in Fiddler, but the response returns a server error 500 with a response of 0...which of course is because it never receives those variables. Posting works fine on forms going cfm to cfm or htm to cfm. It's only happening with these flash files.

            • 3. Re: Problem with loadVariablesNum on IIS 7
              kglad Adobe Community Professional & MVP

              what are you doing to ensure the data are returned from your cfm file before you try and use the data?

              • 4. Re: Problem with loadVariablesNum on IIS 7
                MSpears75 Level 1

                I can hard code in the values and view the CFM page just fine, if I don't send it via Flash. I can also view on Fiddler, that Flash is definitely sending out the variables I need, but the CFM page responds with an error 500 and a response of 0. WHen I look in the error log it says the variables don't exist...which means, even though Flash is sending them, my cfm page isn't receiving them. But if I type them in directly, the same ones that Fiddler says Flash is sending, then the page displays it just fine. It just won't read the variables from Flash. As far as if it fails what do we do...we simply log the error since it's for development purposes only and the Flash file never loads anything. This shows me the error (variables don't exist).

                 

                The only thing I can think of is it has something to do with permissions in IIS7, that either were set years ago in IIS6 or aren't required in IIS6 but are in 7, but I've checked everything I can think of only to become more frustrated. I've been through tons of forum posts trying everything and can't seem to find a resolution. In fact I've seen several people post this issue and many times the thread just dies out with no resolution so I'm not sure what others have done to fix it.

                • 5. Re: Problem with loadVariablesNum on IIS 7
                  kglad Adobe Community Professional & MVP

                  then you've confirmed it's not a flash/actionscript issue.

                  • 6. Re: Problem with loadVariablesNum on IIS 7
                    MSpears75 Level 1

                    How does that confirm it's not a Flash issue? It's working when i view it via only CFM...it only fails when I call it via Flash. Couldn't it possibly be the way Flash is sending it? Or a permission having to do with Flash?

                    • 7. Re: Problem with loadVariablesNum on IIS 7
                      kglad Adobe Community Professional & MVP

                      no, if fiddler sees the variables sent correctly, they're being sent correctly. 

                       

                      there does not appear to be any security/cross-domain issues judging from the code you posted.

                       

                      i can't say much more than that because you  haven't posted your url.

                      • 8. Re: Problem with loadVariablesNum on IIS 7
                        MSpears75 Level 1

                        Unfortunately I don't have a public domain I can share but would it help if I posted the fiddler log?

                         

                        And yep you are right, i don't think it's a cross domain issue. We aren't calling across any other domain and I added a crossdomain.xml file to allow all for the time being until we get it figured out.

                        • 9. Re: Problem with loadVariablesNum on IIS 7
                          kglad Adobe Community Professional & MVP

                          the fiddler log wouldn't help me help you.

                           

                          can you send the variables to your cfm file using an html test file?

                          • 10. Re: Problem with loadVariablesNum on IIS 7
                            MSpears75 Level 1

                            Yep we tried that and were able to send them and got all the questions to display in an HTML format on the cfm page. We also use post data elsewhere on the website and can send it successfully to other cfm pages. We did notice something else as well...and maybe this is nothing...I'm not sure due to my lack of Flash knowledge, but I hard coded in the query result set that we got when we viewed it in HTML format in the CFM page and had the flash file read from that instead of querying...just to make sure it really wasn't an issue on the database end of  things and sure enough, the Flash movie wouldn't read those hard coded values. But fiddler did see it in the response window.

                             

                            I do think you're right that it's some sort of setting somewhere. And maybe this is just the wrong board to ask I'm not sure. this was my jumping off point. We've even got our hosting company stumped on this one. At this point I'd be willing to hire a consultant if they could get this thing working.

                            • 11. Re: Problem with loadVariablesNum on IIS 7
                              kglad Adobe Community Professional & MVP

                              then try updating your code to use loadvars instead of the antiquated loadvariablesnum.

                              • 12. Re: Problem with loadVariablesNum on IIS 7
                                MSpears75 Level 1

                                Thanks, ill give that a try. Our Flash developer is pulled onto another project which is why I'm winging this. But I'll see if they can give me that to test. Thanks for your help, Ill post an update if it works.

                                • 13. Re: Problem with loadVariablesNum on IIS 7
                                  kglad Adobe Community Professional & MVP

                                  you're welcome.

                                   

                                  you should use something like:

                                   

                                  var sendLV:LoadVars=new LoadVars();

                                  var receiveLV:LoadVars=new LoadVars();

                                  sendLV.var1=whatever1;  // assign your variables/values

                                  sendLV.var2=whatever2;

                                  etc

                                  receiveLV.onData=function(src){

                                  trace(src); // or otherwise display what's received from the cfm file (including error messages)

                                  }

                                  sendLV.sendAndLoad("ReadQuestions.cfm",receiveLV,"POST"); // assuming your cfm file is expecting posted variables

                                  • 14. Re: Problem with loadVariablesNum on IIS 7
                                    MSpears75 Level 1

                                    We still haven't been able to resolve this issue. Of course, we do not have access to our Flash developer right now either which is rather hindering. You wouldn't happen to know of a resource of developers we could look into for a paid solution to find someone who understands IIS really well, as well as ColdFusion with Flash to get this solved for us? I've been on devnet looking at some of the usergroups, but I'm open to suggestions for someone reliable who can come in and get us up and running.

                                    • 15. Re: Problem with loadVariablesNum on IIS 7
                                      kglad Adobe Community Professional & MVP

                                      you can send me an email via:  www.kglad.com

                                      • 16. Re: Problem with loadVariablesNum on IIS 7
                                        MSpears75 Level 1

                                        I sent you a message with my number. Feel free to give me a call whenever youre available. Thanks!