6 Replies Latest reply on Sep 11, 2008 10:32 AM by EvolvedDSM

    Permission problems....

    Gene Godsey Level 1
      I am trying to test out a basic .air application usingh ColdFusion server.
      I am getting this error.
      ----------------------------
      [RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Status 405: url: ' http://localhost/flex3Gateway/'"
      at mx.rpc::AbstractInvoker/ http://www.adobe.com/2006/flex/mx/internal::faultHandler()[E:\dev\3.0.x\frameworks\project s\rpc\src\mx\rpc\AbstractInvoker.as:216
      at mx.rpc::Responder/fault()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\Responder.as:49 ]
      at mx.rpc::AsyncRequest/fault()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\AsyncRequest .as:103]
      at mx.messaging::ChannelSet/faultPendingSends()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\ messaging\ChannelSet.as:1399]
      at mx.messaging::ChannelSet/channelFaultHandler()[E:\dev\3.0.x\frameworks\projects\rpc\src\m x\messaging\ChannelSet.as:935]
      at flash.events::EventDispatcher/dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at mx.messaging::Channel/connectFailed()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\messagi ng\Channel.as:997]
      at mx.messaging.channels::PollingChannel/connectFailed()[E:\dev\3.0.x\frameworks\projects\rp c\src\mx\messaging\channels\PollingChannel.as:354]
      at mx.messaging.channels::AMFChannel/statusHandler()[E:\dev\3.0.x\frameworks\projects\rpc\sr c\mx\messaging\channels\AMFChannel.as:369]
      -----------------------------------

      The application is on IIS 5.5 with an xp sp3 box.
      I have CF8,0 running as well. The path in the remoteobject source is correct. I have mad sure that IIS uses Anonomous access.

      Help.
        • 1. Re: Permission problems....
          EvolvedDSM Level 2
          Try using an endpoint in your remoteObject that points to http://server_ip:CF_port/flex3gateway/

          I'm not 100% positive that the uri/url needs the port # but I'm 99% sure :P http://localhost/flex3gateway would only work if your CF was assigned to port 80 I believe.

          For example:
          <remoteObject id="RO" endpoint=" http://10.119.45.100:85/flex2gateway/" destination="ColdFusion"/>

          Or it could be an issue with your services-config.xml located in <CFROOT>\WEB-INF\flex\. Check the my-cfamf channel to be sure the uri/url is pointing to the correct context.
          • 2. Re: Permission problems....
            Gene Godsey Level 1
            I tried that and this is the error I get now.
            --------------------------
            [RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Failed: url: ' http://147.165.141.20:85/flex3Gateway/'"
            at mx.rpc::AbstractInvoker/ http://www.adobe.com/2006/flex/mx/internal::faultHandler()[E:\dev\3.0.x\frameworks\project s\rpc\src\mx\rpc\AbstractInvoker.as:216
            at mx.rpc::Responder/fault()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\Responder.as:49 ]
            at mx.rpc::AsyncRequest/fault()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\AsyncRequest .as:103]
            at mx.messaging::ChannelSet/faultPendingSends()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\ messaging\ChannelSet.as:1399]
            at mx.messaging::ChannelSet/channelFaultHandler()[E:\dev\3.0.x\frameworks\projects\rpc\src\m x\messaging\ChannelSet.as:935]
            at flash.events::EventDispatcher/dispatchEventFunction()
            at flash.events::EventDispatcher/dispatchEvent()
            at mx.messaging::Channel/connectFailed()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\messagi ng\Channel.as:997]
            at mx.messaging.channels::PollingChannel/connectFailed()[E:\dev\3.0.x\frameworks\projects\rp c\src\mx\messaging\channels\PollingChannel.as:354]
            at mx.messaging.channels::AMFChannel/statusHandler()[E:\dev\3.0.x\frameworks\projects\rpc\sr c\mx\messaging\channels\AMFChannel.as:369]
            • 3. Re: Permission problems....
              Gene Godsey Level 1
              Here is the flex code.
              --------------------------------<?xml version="1.0" encoding="utf-8"?>
              <mx:WindowedApplication xmlns:mx=" http://www.adobe.com/2006/mxml" >

              <mx:Script>
              <![CDATA[
              import mx.rpc.events.ResultEvent;
              import mx.controls.Alert;

              private function geneIsDaBomb():void{
              cfservice.addEventListener(ResultEvent.RESULT, genesResult);
              cfservice.clickEvent();
              }

              private function genesResult(event:ResultEvent):void{
              Alert.show(event.result.toString(), "Result");
              }
              ]]>
              </mx:Script>

              <mx:RemoteObject destination="ColdFusion" id="cfservice"
              endpoint=" http://147.165.141.20:85/flex3Gateway/"
              showBusyCursor="true" source="beginningAIR.business.Delegate"
              concurrency="last"/>

              <mx:Button label="Check Out Gene" click="geneIsDaBomb()"/>


              </mx:WindowedApplication>
              --------------------------------------------
              Here is the .cfc.
              --------------------------------------------
              <cfcomponent>
              <cffunction name="geneIsDaBomb" returntype="string" access="remote">
              <cfreturn "It does not get any better than This!">
              </cffunction>
              </cfcomponent>
              --------------------------------------------

              • 4. Permission problems....
                EvolvedDSM Level 2
                Well 85 is the port number I've specifically assigned in IIS for my CF server. I have set up my CF wwwroot in IIS and gave it the port # 85. You would also have to do the same thing. Is this what your IIS now reflects?

                Edit: Is Delegate your cfc? Your source needs to be pointing to your cfc, not just the container it's in.
                • 5. Permission problems....
                  Gene Godsey Level 1
                  no. port 80.
                  This is the default IIS install.
                  • 6. Re: Permission problems....
                    EvolvedDSM Level 2
                    so in IIS, you have created a site that points to your wwwroot folder as the home directory and given it the port number 80?