Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...Silverlight and cross domain serviceSilverlight and cross domain service
Previous
 
Next
New Post
5/23/2009 8:13 PM
 

Hi I have created a dnn module that contains a silverlight project, the silverlight project reqiores access to a WPF web service that is part of another application. I have added the service to the silverlight application however when I load it into my DNN portal I get a message displaying 'error on page', when I try and debug the silverlight project in visula studio I get an error:

An error occurred while trying to make a request to URI 'http://josh-pc/MaxSilver.Services/DashboardInfo.svc'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. Please see the inner exception for more details.

So I read around and found I need a cliantaccesspolicy.xml file in the web root so for my machine runing the portal nad the services on localhost that is C:\inetpub\wwwroot, so I copied the example one from MSDN site that allows 'The following configuration allows access from any other domain to all resources on the current domain.' The file looks like

<?xml version="1.0" encoding="utf-8"?>
<access-policy>
  <cross-domain-access>
    <policy>
      <allow-from http-request-headers="*">
        <domain uri="*"/>
      </allow-from>
      <grant-to>
        <resource path="/" include-subpaths="true"/>
      </grant-to>
    </policy>
  </cross-domain-access>
</access-policy>

I also added the crossdomain.xml mentioned

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
  <allow-http-request-headers-from domain="*" headers="*"/>
</cross-domain-policy>

But even with these files I still get the error stated, I can browse to the service being requested but my silverlight app just cant get to it, and adding the service to the dnn website instead of being a seperate application is not an option for me, can anyone please help me?

 
New Post
5/24/2009 12:19 PM
 

The crossdomain policy needs to be set at the root of the site. The root of the site is the folder to which your DNN site points to in IIS.


Do you know the truth when you hear it?
Néstor Sánchez
The Dúnadan Raptor -->Follow Me on Twitter Now!
 
New Post
5/24/2009 12:36 PM
 

My recommendation is to not make cross domain calls. The Silverlight app should just communicate with the domain that launched it. The domain that launches it can then make a call to another domain and pass the information back.

The reason for "locking down the Silverlight app" is that Microsoft does not want Silverlight apps to launch and then start spamming other sites, so those sites must implement the cossdomain policy file.



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...Silverlight and cross domain serviceSilverlight and cross domain service


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out