[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Flex/Webservice Permissions Problem

Posted on 2009-04-10
4
Medium Priority
?
647 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

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

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…
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…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

650 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