views:

1191

answers:

1

Hi All

I have developed a little flex application which does some web service calls, retrieves some data and returns the data to the application.

Everything works fine as long as I am working inside Flex Builder (eclipse) or as long as I run it from the ProjectName\bin-debug.

Once I try to deploy it (run it from ProjectName\bin-release or on a web server) it stops working and I get an error stating: - Unable to load WSDL. If currently online, please verify the URI and/or format of the WSDL (http://127.0.0.1/TimeSheet/TimeSheets.wsdl)

I have created a cross domain file which I think is correct and placed it in the root folder of IIS C:\inetpub\wwwroot (I have also just to be safe copied the file to C:\inetpub and C:\inetpub\wwwroot\TimeSheet)

<?xml version="1.0"?> <!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd"&gt; <cross-domain-policy> <allow-access-from domain="*"/> <site-control permitted-cross-domain-policies="master-only"/> <allow-access-from domain="*" secure="false"/> <allow-http-request-headers-from domain="*"/> </cross-domain-policy>

I have also after reading the internet tried modifying the compilation properties Project -> Properties -> Flex Compiler by changing the -use-network= property to both true and false and the -debug property.

I believe that if I can get the bin-release working then it will all work.

What is the difference?

A: 

@Amarghosh I have tried localhost and 127.0.0.1 and the server name

@Jeff Yes and it works

Okay I have some more information. I have figured out that the reason that it works in the bin-debug folder and not in the bin-release folder is because in the bin-debug folder the app runs in the localtrusted

Security Sandboxtype (sandBoxType.text = Security.sandboxType.toString())

And the bin-release folder runs in localwithfile or localwithnetwork (depending on what the -use-network property is set too)

To make it work inside the bin-release folder all I had to do was add it to my trusted sites inside flash player.

Fantastic... except this has to run on a web server so that people can access it on our local network. From what I have seen when a swf file is accessed from the "web" i.e. not a local file on a pc it always runs in remote sandboxtype and it gives me the same error as above when running in a remote sandboxtype.

So are there some special rules that I have to follow to allow my little app to access the wsdl when running in a remote sandboxtype?