5 Replies Latest reply on Aug 9, 2008 3:09 PM by Newsgroup_User

    reading a .asp

    cesaregb Level 1
      Hi all

      i trying to read a .asp by httpservice, and my doubt is this possible ??
      i have this
      <mx:HTTPService id="DynamicData" method="GET"
      url=" http://localhost/pagina_soto/search_prod.asp" result="resultHandle(event)" resultFormat="e4x"/>

      which works perfect in when i run it with a php and apache file and when i try to lead the data from .asp didn't work even when the format is exactly the same ... i guess is something with the iis, someone of you can tell me what it is and how to fix it

      if I'll not be able to do this .. what else can i do I've a Server with Win 2003 server and a system made in ASP so can i install the php to run it or what can i do for make this query from this server


      well i hope any of you can help me,

      thanks
        • 1. Re: reading a .asp
          Level 7

          "cesaregb" <webforumsuser@macromedia.com> wrote in message
          news:g74j79$obh$1@forums.macromedia.com...
          > Hi all
          >
          > i trying to read a .asp by httpservice, and my doubt is this possible ??
          > i have this
          > <mx:HTTPService id="DynamicData" method="GET"
          > url=" http://localhost/pagina_soto/search_prod.asp"
          > result="resultHandle(event)" resultFormat="e4x"/>
          >
          > which works perfect in when i run it with a php and apache file and when i
          > try
          > to lead the data from .asp didn't work even when the format is exactly the
          > same
          > ... i guess is something with the iis, someone of you can tell me what it
          > is
          > and how to fix it
          >
          > if I'll not be able to do this .. what else can i do I've a Server with
          > Win
          > 2003 server and a system made in ASP so can i install the php to run it or
          > what
          > can i do for make this query from this server

          When I read XML from an asp page, I don't specify a result format--I just
          cast the result to XML when I get it back. YMMV.


          • 2. Re: reading a .asp
            cesaregb Level 1
            Hi
            2 questions

            one how can i cast to xml ?? what is the syntax for this cast ?

            and still doesn't get it from a server page .. cause when i've the iis and the same machine (localhost) execute the asp file the httpservice does bring the information so maybe its something in the server some configuration that I've to do,

            also when i open the file directly from the browser http://aa.asp also does bring the xml file without any other thing so i think that maybe this server blocks the access when flex try to open the page or something like that

            how can I solve this little problem

            anyone can help me in this ?
            • 3. Re: reading a .asp
              cesaregb Level 1
              yea I think is something with the IIS


              any of you can help me when i debug it this sendme this error


              Connection to http://rsa.mine.nu/sotoautopartes/search_prod.asp?no=&description=aceite halted - not permitted from http://localhost/pagina_soto/soto/products3.swf
              [RPC Fault faultString="Security error accessing url" faultCode="Channel.Security.Error" faultDetail="Destination: DefaultHTTP"]
              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 DirectHTTPMessageResponder/securityErrorHandler()[E:\dev\3.0.x\frameworks\projects\rpc\sr c\mx\messaging\channels\DirectHTTPChannel.as:368]
              at flash.events::EventDispatcher/dispatchEventFunction()
              at flash.events::EventDispatcher/dispatchEvent()
              at flash.net::URLLoader/redirectEvent()


              anyone can help me ??
              • 4. Re: reading a .asp
                Level 7

                "cesaregb" <webforumsuser@macromedia.com> wrote in message
                news:g7krfh$9tq$1@forums.macromedia.com...
                > Hi
                > 2 questions
                >
                > one how can i cast to xml ?? what is the syntax for this cast ?

                var xmlVar:XML = XML(yourHTTPService.result);

                > and still doesn't get it from a server page .. cause when i've the iis and
                > the
                > same machine (localhost) execute the asp file the httpservice does bring
                > the
                > information so maybe its something in the server some configuration that
                > I've
                > to do,
                >
                > also when i open the file directly from the browser http://aa.asp also
                > does
                > bring the xml file without any other thing so i think that maybe this
                > server
                > blocks the access when flex try to open the page or something like that
                >
                > how can I solve this little problem
                >
                > anyone can help me in this ?

                Is your swf in the same domain as your asp page? If not, you may need a
                crossdomain policy file.

                HTH;

                Amy


                • 5. Re: reading a .asp
                  Dr. Fred Mbogo Level 1
                  quote:

                  Originally posted by: cesaregb
                  one how can i cast to xml ??

                  Use the "as" operator: "var xml:XML = resultData as XML;"

                  I'm not sure casting is really necessary here, though. The XML class's constructor takes any valid XML document as a string and parses it: "var xml:XML = new XML(resultData);"

                  The problem with your IIS configuration is probably in the HTTP headers. I'd especially check to make sure the Content-type header is set the same.