Milos Solution Platform (External Blog)

The Milos Solution Platform is .NET's premier platform for building business applications. This blog is meant for developers who use or evaluate Milos. This blog is used to share tidbits of information provided by the Milos developers at EPS. Many of the posts put the spotlight on new features. We generally recommend that all Milos users (developers) at least scan this blog to keep up with the Milos news.

Content Area Footer

Sunday, February 08, 2009
Self-Hosted WCF Cross-Domain Service Call Policies

Yesterday I blogged about a new Milos feature that allows to self-host Basic HTTP services, which is a feature that is useful when one has a service that is hosted using other bindings, but wants to expose the Basic HTTP binding in addition to others, which is typically done in Silverlight or browser scenarios (click here for yesterday's post).

When hosting Basic HTTP services for Silverlight, it is also important to know that Silverlight by default can only call services that are part of the same web application as the Silverlight app itself. This will practically never be the case when you self -host a Basic HTTP service. To allow that service to be called from Silverlight, the service must opt in to be callable across domains. (Note: Different ports also count as different domains in this case). This is a security restriction to avoid cross-site attacks.

Using the Milos self-host Basic HTTP feature, you can also enable cross-domain calling like so:


For instance, if you want to host a service that is available both over TCP/IP and Basic HTTP and allows cross-domain calls, it could be done like so:


Note that the cross-domain call only relates to HTTP based access, but not to other protocols.

Note also that the cross-domain call is enabled by means of a policy that is now available. You can browse to that policy using your web browser. For instance, if you run this in a test environment on localhost, you can now browse to http://localhost/clientaccesspolicy.xml, to see the exact settings that are exposed. This is what Silverlight accesses to allow a cross-domain call.

Note that it is possible to set additional parameters. In particular, you can specify which sites can make a cross domain call. For instance, if you only want to accept calls from and, you can restrict the cross domain calls in the following fashion:

ServiceGarden.AllowCrossDomainCalls(new Uri[] {
    new Uri(""),
    new Uri("") });

Note that these features are available on the ServiceGarden class as well as the development host. When the development host is used, the policy is listed in the UI as an additional service endpoint.


Posted @ 1:40 PM by Egger, Markus ( -
Comments (15)


RE: Self-Hosted WCF Cross-Domain Service Call Policies
Tuesday, June 21, 2011 9:05 PM by new era -

In particular, you can specify which sites can make a cross domain call.

Wednesday, July 20, 2011 2:02 AM by ed -

I enjoyed every little bit part of it and I will be waiting for the new updates.

RE: Self-Hosted WCF Cross-Domain Service Call Policies
Monday, September 26, 2011 7:56 PM by Rovy Rose Will -

I was regret that I never be part of this program and even such an informative blog to me. It's been too fascinating that I truly stunned this site. Thanks!

RE: Self-Hosted WCF Cross-Domain Service Call Policies
Tuesday, September 27, 2011 12:45 AM by Britney -

You give the nice information that many people don't know before. most of your contents are make me have more knowledge. it is very different.Anyway, thanks for sharing.

RE: Self-Hosted WCF Cross-Domain Service Call Policies
Tuesday, November 08, 2011 6:40 PM by SWF Converter for Mac -

Preparation: Free download and install Mac SWF Video Converter, launch it.

Wednesday, December 07, 2011 8:47 PM by FM TRANSMITTER -

A large number of people are dreaming of having a perfect home theater system. However, installing a home theater has turn out to be rather intricate and long speaker cable runs are normally undesirable for aesthetic reasons. Manufacturers have lately introduced new products and technologies.

tutu app
Monday, May 22, 2017 7:17 AM by tutu app -

Designed for both, iOS and Android, the Tutu app is a widely recognized free app for games and game hacks.

Friday, August 18, 2017 4:00 AM by tplinklogin -

tplinklogin Hello, readers, It’s time to know about one of the best wireless networks present nowadays

RE: Self-Hosted WCF Cross-Domain Service Call Policies
Tuesday, December 12, 2017 12:45 AM by Assignment land

All things considered NET.TCP blueprint isn't perceived by Silverlight 4. At any rate right now it is. Keeping in mind the end goal to utilize NET.TCP authoritative, it's required that we utilize customBinding.
Thursday, February 08, 2018 12:11 AM by - All the candidates who have written Maharastra 10th exams might be eagerly waiting for Mah SSC results 2018
Saturday, March 17, 2018 12:46 AM by - results to check intermediate and ssc 10th results from Manabadi 2018

Thursday, April 12, 2018 1:07 AM by Julie Watson -

Anti Revoke For Android

RE: Self-Hosted WCF Cross-Domain Service Call Policies
Tuesday, July 03, 2018 4:09 AM by asdf -

sad fsadf asdfdsa

RE: Self-Hosted WCF Cross-Domain Service Call Policies
Saturday, July 14, 2018 4:07 AM by bestessay rating -

In this blog I have received the best stories and messages. That all you can use to update better stories and cross domain services. Then we will catch their online essay features.

RE: Self-Hosted WCF Cross-Domain Service Call Policies
Tuesday, July 31, 2018 6:08 AM by 192.168.o.1 -

I thank you for the information! I was looking for and could not find. You helped me!

Post a Comment:

Comment Title (required)

Your Name (optional)

Your Email (optional)

Your Web Site (optional)

Your Comment (required)








Syndication RSS 2.0 RSS 2.0

All My Blogs:
My personal blogs:
Dev and Publishing Dev and Publishing
Travel and Internat. Living Travel and Internat. Living
Other blogs I contribute to:
Milos Blog (US) Milos Blog (US)
VFPConv. Dev Blog (US) VFPConv. Dev Blog (US)
VFPConv. Dev Blog (DE) VFPConv. Dev Blog (DE)


Blog Archives
All Blog Posts

    November (1)
    July (2)
    February (2)
    January (1)
    December (1)
    October (3)
    June (1)
    April (3)
    February (1)
    January (1)
    December (1)
    October (2)
    September (2)
    July (1)
    June (2)
    May (4)
    April (6)
    March (8)
    February (3)
    January (2)
    December (2)
    November (2)




This Blog is powered by MilosTM Collaboration Components.