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 594069
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:54:50+00:00 2026-05-13T15:54:50+00:00

I have a silverlight application which works perfectly and can access the WCF services

  • 0

I have a silverlight application which works perfectly and can access the WCF services which are hosted in silverlight application itself. The port it is using is 1794.

When I deploy to other servers (dev or test or staging), the application is not able to access WCF services.

This is a snippet from my ServiceReference.ClientConfig looks like

<endpoint address="http://localhost:1794/MyWebService.svc"
                binding="customBinding" bindingConfiguration="CustomBinding_MyWebService"
                contract="ConfigMgmtServiceReference.MyWebService"
                name="CustomBinding_MyWebService" />

My root folder contains the clientaccesspolicy.xml file too.

How can I get past this issue?

  • 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-13T15:54:50+00:00Added an answer on May 13, 2026 at 3:54 pm

    I suspect the localhost:1794 would be causing the issue – when the silverlight application executes on a client machine the localhost will not get it back to the server.

    The technique i use to eliminate issues like this is to programmatically set the end points at run time. The two pieces of info i need are the location within my web project of the service (which is known ahead of time), and the address (domain) that the silverlight app has been served from (which i can find out).

        private void initEndpoint(ServiceEndpoint endPoint, string serviceName)
        {
            Uri hostUri = Application.Current.Host.Source;
            string wcfBaseUri = string.Format("{0}://{1}:{2}/WebServices/", hostUri.Scheme, hostUri.Host, hostUri.Port);
    
            endPoint.Address = new EndpointAddress(new Uri(wcfBaseUri + serviceName));
        }
    

    In this piece of code, the folder /WebServices is where my web services are located within my web app. I then call the function like this:

            LoggingServiceClient loggingService = new LoggingServiceClient();
            initEndpoint(loggingService.Endpoint, "LoggingService.svc");
    

    my actual setup is slightly more complex than that, because i also want to be able to override that and manually configure the end points, but you get the point. By doing this, i have been able to deploy to all sorts of setups, with webservers running on odd ports, and the silverlight->webservice bit just works every time.

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

Sidebar

Related Questions

I have a Silverlight application using a WCF service hosted in IIS. I make
I have a Silverlight application in which I would like to call a WCF
I have a Silverlight application communicating with the server side through WCF services. Initially
I have a Silverlight 3 application which needs to call WCF service. The WCF
I have a Silverlight 4 desktop application which I control using a touchscreen (on
I have a set of WCF services which I have been using with an
We are consuming wcf services on the silverlight application trough creating proxies using ChanellFacotry.
I have a Silverlight application which has on it a Canvas. On that Canvas,
I have a silverlight application which reads data from a db and displays them
I have a silverlight application which users will be running in various time zones

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.