?
Solved

Flex/Webservice Permissions Problem

Posted on 2009-04-10
4
Medium Priority
?
645 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 5

Accepted Solution

by:
Fuzzy_Logic_ earned 2000 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 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This tutorial will show you how to add an attribute to an XML (http://en.wikipedia.org/wiki/XML) stream returned from a Windows Communication Foundation (http://en.wikipedia.org/wiki/Windows_Communication_Foundation) (WCF) Web Service.  Some knowled…
While working on Silverlight and WCF application, I faced one issue where fault exception occurred at WCF operation contract is not getting propagated to Silverlight client. So after searching net I came to know that it was behavior by default for s…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

777 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