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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:17:47+00:00 2026-06-17T17:17:47+00:00

i am making an application in silverlight.The XAP folder of that application contains ServiceReferencesClientConfig

  • 0

i am making an application in silverlight.The XAP folder of that application contains ServiceReferencesClientConfig file.I have deployed that application on webserver and whenever i am accessing that website from other machine like (http://192.168.1.15/SampleApplication/Login.aspx), I want to write that IP address(192.168.1.15) into ServiceReferencesClientConfig and after that the Xap file should be downloaded to client side. But i am not getting idea of editing the ServiceReferencesClientConfig file by programmatically. (I want to do that change as i change the IP address of webserver on which application is deployed, it should change the ServiceReferencesClientConfig automatically so there is no need to to change ServiceReferencesClientConfig file manually.)

  • 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-06-17T17:17:49+00:00Added an answer on June 17, 2026 at 5:17 pm

    As an option, you can configure your service proxies dinamically, changing the default constructor to use dinamically generated endpoints and bindings, or using a factory to do the same:

    public MyService()
            : base(ServiceEx.GetBasicHttpBinding(), ServiceEx.GetEndpointAddress<T>())
    {
    }
    
    
    
    public static class ServiceEx
    {
        private static string hostBase;
        public static string HostBase
        {
            get
            {
                if (hostBase == null)
                {
                    hostBase = System.Windows.Application.Current.Host.Source.AbsoluteUri;
                    hostBase = hostBase.Substring(0, hostBase.IndexOf("ClientBin"));
                    hostBase += "Services/";
                }
                return hostBase;
            }
        }
    
        public static EndpointAddress GetEndpointAddress<TServiceContractType>()
        {
            var contractType = typeof(TServiceContractType);
    
            string serviceName = contractType.Name;
    
            // Remove the 'I' from interface names
            if (contractType.IsInterface && serviceName.FirstOrDefault() == 'I')
                serviceName = serviceName.Substring(1);
    
            serviceName += ".svc";
    
            return new EndpointAddress(HostBase + serviceName);
        }
    
        public static Binding GetBinaryEncodedHttpBinding()
        {
            // Binary encoded binding
            var binding = new CustomBinding(
               new BinaryMessageEncodingBindingElement(),
               new HttpTransportBindingElement()
               {
                   MaxReceivedMessageSize = int.MaxValue,
                   MaxBufferSize = int.MaxValue
               }
            );
    
            SetTimeouts(binding);
    
            return binding;
        }
    
        public static Binding GetBasicHttpBinding()
        {
            var binding = new BasicHttpBinding();
            binding.MaxBufferSize = int.MaxValue;
            binding.MaxReceivedMessageSize = int.MaxValue;
    
            SetTimeouts(binding);
    
            return binding;
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am making an application in silverlight 3.0. In that application i have one
I am making an application in Silverlight 3.0. In that application i am using
I am making an application in silverlight 3.0 In that application i want to
I am making a Progressbar as part of my Silverlight application that is triggered
I have client apps that talk to my silverlight application and its web services.
We currently have a quite complex business application that contains a huge lot of
I have a Silverlight 4.0 (ASP.Net 4.0) application on our website for our customers
I've got a silverlight LOB application that requires a valid FormsAuthentication cookie when making
I have a Silverlight application that is interacting with a WCF service. This service
I have an application in WP7 silverlight that needs to be launched after a

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.