3 Replies Latest reply on Dec 24, 2006 10:42 PM by See4th

    Flex2 and CF7.02 Remoting Errors

      For three days straight I have been trying to debug this blasted remoting issue based off of the helloworld quick start. I am getting the 405 Error when attempting remoting. If I goto directly to http://localhost/flex2gateway/ I get a 404 error.

      I have read every blog, list, and forum that I can get my eyes on and tried an assortment of possible fixes to no avail (including reinstalling CF).

      Here are my specs:
      IIS 5.1 - webroot: C:\Documents and Settings\Jeff\My Documents\MyWebs

      - CF Root: C:\CfusionMX7
      - Webroot: C:\Documents and Settings\Jeff\My Documents\MyWebs

      Flex Project:
      - Flex Compiler Arguments: -context-root cfusion -services "C:\Documents and Settings\Jeff\My Documents\MyWebs\WEB-INF\flex\services-config.xml" -locale en_US

      Flex Build Path
      - Output Folder: bin
      - Output Folder URL: http://localhost/HelloWorld_ro/bin
      Flex Server
      - Flex Root Folder: C:\Documents and Settings\Jeff\My Documents\MyWebs
      - Flex Server URL: http://localhost/HelloWorld_ro

      In C:\Documents and Settings\Jeff\My Documents\MyWebs\WEB-INF\flex\service-config.xml:
      <endpoint uri=" http://localhost/flex2gateway/" class="flex.messaging.endpoints.AMFEndpoint"/>

      In C:\CFusionMX7\wwwroot\WEB-INF\web.xml I added:
      --- AND ----
      <servlet-mapping id="macromedia_mapping_0">

      Here's the error I get in my <mx:TraceTarget />:
      'my-cfamf' pinging endpoint.
      'my-cfamf' channel got status. (Object)#0
      code = "NetConnection.Call.Failed"
      description = "HTTP: Status 405"
      details = " http://localhost/flex2gateway/"
      level = "error"

      This really shouldn't be this difficult! This should have been complete in the first hour after setup and I am going on 40 hours into just SETUP/CONFIG ALONE! Now I see why all the tutorials use the :8500 built in server examples, but that's not real life. It would be nice if Adobe could offer some tutorials on setting up FB with CF with configurations other than the 'ol :8500.

        • 1. Re: Flex2 and CF7.02 Remoting Errors
          peterent Level 2
          For RemoteObject you have to talk directly to the flex2gateway and not through the web server (IIS in your case). That's why the port is in the examples. You can serve the SWF via the web server, but RemoteObject must communicate directly with the gateway.

          If you can do: http://localhost:8500/flex2gateway/ (where 8500 is your port for ColdFusion) and you get a blank page, that's the endpoint you want.
          • 2. Re: Flex2 and CF7.02 Remoting Errors
            See4th Level 1

            I just set up FB and CF on another machine (Window XP SP2) and successfully hit an RO with no problems.

            Is it possible that it could be a file permissions issue? Here's why a mention that.

            When I was trying to get the RO to on my first pc (Window XP Media Ctr Edt SP2), I got the RO to work if I ran the html page from file access (ex: C:\Documents and Settings\Jeff\My Documents\MyWebs\HelloWorld_ro\bin\HelloWorld_ro.html ).

            However, if I tried to run it thru the web server ( http://localhost/HelloWorld_ro/HelloWorld_ro.html), I got 403 error - you do not have permission to access this page. So then I added "Scripts & Executables" to the default web site in IIS and then I got the "lc_id undefined" error and the browser wouldn't render the rest of the page.

            So then I went thru the Permissions Wizard in IIS (right-click on default web site and choose All Tasks) and used:
            - "Select new security settings from template > Public Web Site > Leave current dir and file permissions intact, and add recommended permissions"
            After it recursively applied permissions the RO would only return the 405 error mention in my first post.

            So then I tried the Wizard again except choosing the "Replace all dir and file permissions (recommended)", and still got the same 405 error when running the RO.

            And interestingly enough, I was never able to get the RO to run from file access again after using the permissions wizard. It's a little more difficult to experiment with file permissions in an XP environment vs. a Win Server environment since you cannot see explicit users and groups permissions in XP.

            Can you shed any light on this? There may be something here.


            • 3. Re: Flex2 and CF7.02 Remoting Errors
              See4th Level 1
              Here's what worked for me. I did another reinstall of CF 7.02, but this time I deleted all the residual files left over after the uninstall. You would be surprised at some of the files that are left behind.

              I hope this helps someone else eliminate any unnecessary agony.