8 Replies Latest reply on Feb 25, 2008 11:53 AM by ntsiii

    Error in accessing a .Net webservice

    Nikhil_Baranwal Level 1
      [RPC Fault faultString="Error #2028: Local-with-filesystem SWF file file://C:\flex_sdk_2\work\tb4.swf cannot access Internet URL http://localhost/testService/Service1.asmx?WSDL." faultCode="InvokeFailed" faultDetail="Unable to load WSDL. If currently online, please verify the URI and/or format of the WSDL ( http://localhost/testService/Service1.asmx?WSDL)"
      at mx.rpc.soap::WSDLParser/private::dispatchFault()
      at mx.rpc.soap::WSDLParser/ http://www.adobe.com/2006/flex/mx/internal::httpFaultHandler()
      at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at mx.rpc::AbstractInvoker/ http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()
      at Function/ http://adobe.com/AS3/2006/builtin::apply()
      at mx.rpc::AsyncDispatcher/private::timerEventHandler()
      at flash.utils::Timer/flash.utils:Timer::_timerDispatch()
      at flash.utils::Timer/flash.utils:Timer::tick()
        • 1. Re: Error in accessing a .Net webservice
          this could be quite a few things....malformed data, bad data causing the wsdl service to now show... can you hit the url in a browser and see this data?...is it all formed correctly?
          • 2. Re: Error in accessing a .Net webservice
            kittuokkade Level 1
            i got the same error.strange thing is i have the project under workspace in it bin directory in which html file is there that is running with out any error.but when i copy this project in some other location say desktop and run the same html file in bin directory but iam getting the same error as above .i searched but i got only this link which was not answered .i request all to look at it and tell me how to solve this problem.
            • 3. Re: Error in accessing a .Net webservice
              kcell Level 2
              Hello kittuokkade,

              how did you start your html page (within the flexbuilder or from filesystem).

              However it seems that you violate the flash player sandbox in the way how you start the swf.
              Your swf seems to be compiled with "local-with-filesystem" option (default.), which didn´t allow to access to the network.

              There is a compiler option use network (local-with-networking), which may help you out (than your swf file can not access locale files).

              Ah I forget to ask you didn´t use AIR or ?

              best regards,
              • 4. Re: Error in accessing a .Net webservice
                ntsiii Level 3
                Yes, that looks like a sandbox issue. Unless you are running under Flex Builder, you can't run an app from the filesystem and access network data.

                Move your app to a webserver then try it again. Note, you will need a crossdomain.xml file on the server providing the data if its domain is different than the domain the served the app(swf)

                • 5. Re: Error in accessing a .Net webservice
                  kittuokkade Level 1
                  yes kcell and ntsiii,when i run from flexbuilder it is running properly.when i run from filesystem iam getting the above error.i have used compiler option -use-network=false in the Additional compiler arguements from project-->properties-->flexcompiler.
                  what should i do to access it from filesystem also.
                  thank you
                  • 6. Re: Error in accessing a .Net webservice
                    kittuokkade Level 1
                    yes it is Sandbox issue only.

                    in my project i have a file to be loaded from file system. first when i try to run this from outside of flex builder it failed to load because it was local-network sandbox.so ,i used compiler option -use-network=false in the Additional compiler arguements from project-->properties-->flexcompiler.which sets the sandbox to local-filesystem and hence failed to access internet.if i can set this sandbox to
                    Local-trusted my problem will be solved .how to do this.
                    • 7. Re: Error in accessing a .Net webservice
                      markdaraju Level 1
                      Would it possible to paste the relevant MXML/ActionScript code here?
                      • 8. Re: Error in accessing a .Net webservice
                        ntsiii Level 3
                        Fiddling with the sandbox settings is rarely a solution, unless you are going to physically install your app on every user's machine, into a trusted sandbox.

                        If that is even conceivable as an option, use AIR. You get both desktop security functionality AND network installs/updates.

                        For a browser deliverad app, you need to use crossdomain file, or proxy the data service calls.