Solved

Flex/Webservice Permissions Problem

Posted on 2009-04-10
4
644 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 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 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
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…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

705 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