Solved

Flex/Webservice Permissions Problem

Posted on 2009-04-10
4
641 Views
Last Modified: 2012-05-06
Hi, I'm trying to create a test "Hello World" app on our IIS server.  When the user clicks a button a pop up should say "Hello World!", which is a string returned by a WCF web service on the same server.  I have no problem getting the service to work on an aspx page.  But in Flex debugger I get the error:
 
[SWF] /TestProject2/TestProject2.swf - 1,110,380 bytes after decompression
Warning: Domain our-server.local.ourserver.com does not specify a meta-policy.  Applying default meta-policy 'master-only'.  This configuration is deprecated.  See http://www.adobe.com/go/strict_policy_files to fix this problem.
 
Error: Request for resource at http://ftp-server.local.mycompany.com/Service_Upload.svc/basic by requestor from http://upload.mycompany.com/TestProject2/TestProject2.swf is denied due to lack of policy file permissions.
 
*** Security Sandbox Violation ***
Connection to http://our-server.local.mycompany.com/Service_Upload.svc/basic halted - not permitted from http://upload.mycompany.com/TestProject2/TestProject2.swf
 
 
I've created a crossdomain.xml file and tried various settings to try to open up access, including adding *.mycompany.com *.local.mycompany.com, etc., and at the moment I'm using this.
 
<?xml version="1.0"?>
<!-- http://upload.mycompany.com/crossdomain.xml -->
<cross-domain-policy>
    <allow-access-from domain='*' to-ports='*' />
</cross-domain-policy>
 
I got a demo project to call an external service.  Why am I getting this permissions error on my own server, especially when the service and the swf are on the same server and the crossdomain.xml seems to clearly open up permissions?
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
	import com.cushingco.HelloResultEvent;
    import com.cushingco.Service_Upload;
    import mx.controls.Alert;
    public function sayHello():void {
        var service:Service_Upload = new Service_Upload();
        service.addhelloEventListener(
            function (event:HelloResultEvent):void {
                Alert.show(event.result);
            });
        service.hello();
    }
]]>
    </mx:Script>
    <mx:Button x="296" y="54" label="Click to receive greeting" click="sayHello()"/>
</mx:Application>

Open in new window

0
Comment
Question by:dparkes
  • 2
4 Comments
 
LVL 5

Accepted Solution

by:
Fuzzy_Logic_ earned 500 total points
ID: 24123151
First impressions from this:

There is no cross-domain.xml in our-server.local.ourserver.com/

There is a cross-domain.xml in upload.mycompany.com/

The cross-domain.xml needs to be in the folder from which data is being requested from.

Place the cross-domain file in our-server.local.ouserver.com/
0
 
LVL 5

Expert Comment

by:Fuzzy_Logic_
ID: 24123167
0
 
LVL 12

Expert Comment

by:lexxwern
ID: 24125744
In which folder is the crossdomain.xml file located? It needs to be in the root folder of the domain being accessed.
0
 
LVL 1

Author Comment

by:dparkes
ID: 24139183
Fuzzy Logic,
Thanks, that helped me come up with the simple solution to just point the debugger to  http://ftp-server.local.mycompany.com/TestProject2/TestProject2.html (it's internal name) instead of http://upload.mycompany.com/TestProject2/TestProject2.html.
 
Although both url's point to the same place, Flex apparently didn't like the domain names being different.
 
The error is gone now.  The event is still not firing and nothing happens when I press the button though.  But I suppose that is a separate problem.  
Thanks
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In previous Articles, we have discussed how we can upload a file using .asmx web service and isolated storage space. Here, in continuation to the topic, I am going to discuss how we can use WCF for the same purpose. Steps: 1.Create the silverli…
Here I am going to explain creating proxies at runtime for WCF Service. So basically we use to generate proxies using Add Service Reference and then giving the Url of the WCF service then generate proxy files at client side. Ok, what if something ge…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question