Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6248891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:08:28+00:00 2026-05-24T13:08:28+00:00

I’m programming my first Silverlight app and it uses a Silverlight-enabled WCF service to

  • 0

I’m programming my first Silverlight app and it uses a Silverlight-enabled WCF service to retrieve and send data to my server.

I created a SL application + ASP.NET MVC web page to host the SL app.

In the MVC app I create the WCF service and I consume it on the SL app. So far so good.

I deploy the project using the Web deploy and it works on my remote host but using Fiddler I realize that the remote app is using the WCF service I have on the development server (AKA localhost:port).

I changed the WCF service in VS and it now points to the remote host and if I deploy the solution, so far so good.

But you know, now my service points to a remote server and doesn’t work because I have to create the xml for crossdomain access (and fiddler says to me that is looking on domain.com/crossdomain.xml instead of domain.com/virtualdirectory/crossdomain.xml).

So my question is: How I handle this? Would be good to have my project using the local service and when I deploy, it use the remote one.

Do I have to do this manually or there is an automatic way?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T13:08:29+00:00Added an answer on May 24, 2026 at 1:08 pm

    The endpoint address is included in the ServiceReferences.ClientConfig file, which is then part of the files embedded in the XAP package. You have to update that file when you deploy to the live server.

    A workaround is to build a factory method for the client proxy class, which builds the service address dynamically from the address of the Silverlight package. Here is a guide, which contains the following code:

    public class ServiceUtil {
        public static PeopleServiceClient GetPeopleServiceClient() {
            BasicHttpBinding binding = new BasicHttpBinding(
                Application.Current.Host.Source.Scheme.Equals("https", StringComparison.InvariantCultureIgnoreCase) 
                ? BasicHttpSecurityMode.Transport : BasicHttpSecurityMode.None);
            binding.MaxReceivedMessageSize = int.MaxValue;
            binding.MaxBufferSize = int.MaxValue;
            return new PeopleServiceClient(binding, new EndpointAddress(
                new Uri(Application.Current.Host.Source, "../PeopleService.svc")));
        }
    }
    

    Using such a factory you will be able to deploy your app to any server without reconfiguration, as long as the silverlight XAP file and the service are located in the same way relative to eachother.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We're building an app, our first using Rails 3, and we're having to build
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm making a simple page using Google Maps API 3. My first. One marker
I have some data like this: 1 2 3 4 5 9 2 6
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
That's pretty much it. I'm using Nokogiri to scrape a web page what has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.