Click here to Skip to main content
15,883,870 members
Articles / Programming Languages / C# 4.0

Making WCF Service reference configurable from web.config in Silverlight application

Rate me:
Please Sign up or sign in to vote.
5.00/5 (5 votes)
22 Apr 2012CPOL2 min read 392.4K   762   15  
How to make WCF service reference configurabe for Silverlight project(makes easy for deploying on severs like Dev, QA, UAT etc.)
  • How_to_Config_Service_Ref.zip
    • How to Config Service Ref
      • BusinessAppMVVM
        • BusinessAppMVVM.AppWCFService
        • BusinessAppMVVM.sln
        • BusinessAppMVVM.suo
        • BusinessAppMVVM.Web
        • BusinessAppMVVM
          • App.xaml
          • App.xaml.cs
          • Assets
          • BaseClasses
          • Bin
            • Debug
              • AppManifest.xaml
              • ar
                • System.ComponentModel.DataAnnotations.resources.dll
                • System.Windows.Controls.Data.Input.resources.dll
                • System.Windows.Controls.resources.dll
              • bg
                • System.ComponentModel.DataAnnotations.resources.dll
                • System.Windows.Controls.Data.Input.resources.dll
                • System.Windows.Controls.resources.dll
              • BusinessAppMVVM.dll
              • BusinessAppMVVM.pdb
              • BusinessAppMVVM.xap
              • ca
                • System.ComponentModel.DataAnnotations.resources.dll
                • System.Windows.Controls.Data.Input.resources.dll
                • System.Windows.Controls.resources.dll
              • cs
                • System.ComponentModel.DataAnnotations.resources.dll
                • System.Windows.Controls.Data.Input.resources.dll
                • System.Windows.Controls.resources.dll
              • da
                • System.ComponentModel.DataAnnotations.resources.dll
                • System.Windows.Controls.Data.Input.resources.dll
                • System.Windows.Controls.resources.dll
              • de
                • System.ComponentModel.DataAnnotations.resources.dll
                • System.ServiceModel.DomainServices.Client.resources.dll
                • System.ServiceModel.DomainServices.Client.Web.resources.dll
                • System.ServiceModel.Web.Extensions.resources.dll
                • System.Windows.Controls.Data.Input.resources.dll
                • System.Windows.Controls.Navigation.resources.dll
                • System.Windows.Controls.resources.dll
              • el
                • System.ComponentModel.DataAnnotations.resources.dll
                • System.Windows.Controls.Data.Input.resources.dll
                • System.Windows.Controls.resources.dll
              • es
                • System.ComponentModel.DataAnnotations.resources.dll
                • System.ServiceModel.DomainServices.Client.resources.dll
                • System.ServiceModel.DomainServices.Client.Web.resources.dll
                • System.ServiceModel.Web.Extensions.resources.dll
                • System.Windows.Controls.Data.Input.resources.dll
                • System.Windows.Controls.Navigation.resources.dll
                • System.Windows.Controls.resources.dll
              • et
                • System.ComponentModel.DataAnnotations.resources.dll
                • System.Windows.Controls.Data.Input.resources.dll
                • System.Windows.Controls.resources.dll
              • eu
                • System.ComponentModel.DataAnnotations.resources.dll
                • System.Windows.Controls.Data.Input.resources.dll
                • System.Windows.Controls.resources.dll
              • fi
                • System.ComponentModel.DataAnnotations.resources.dll
                • System.Windows.Controls.Data.Input.resources.dll
                • System.Windows.Controls.resources.dll
              • fr
                • System.ComponentModel.DataAnnotations.resources.dll
                • System.ServiceModel.DomainServices.Client.resources.dll
                • System.ServiceModel.DomainServices.Client.Web.resources.dll
                • System.ServiceModel.Web.Extensions.resources.dll
                • System.Windows.Controls.Data.Input.resources.dll
                • System.Windows.Controls.Navigation.resources.dll
                • System.Windows.Controls.resources.dll
              • he
                • System.ComponentModel.DataAnnotations.resources.dll
                • System.Windows.Controls.Data.Input.resources.dll
                • System.Windows.Controls.resources.dll
              • hr
                • System.ComponentModel.DataAnnotations.resources.dll
                • System.Windows.Controls.Data.Input.resources.dll
                • System.Windows.Controls.resources.dll
              • hu
                • System.ComponentModel.DataAnnotations.resources.dll
                • System.Windows.Controls.Data.Input.resources.dll
                • System.Windows.Controls.resources.dll
              • id
                • System.ComponentModel.DataAnnotations.resources.dll
                • System.Windows.Controls.Data.Input.resources.dll
                • System.Windows.Controls.resources.dll
              • it
                • System.ComponentModel.DataAnnotations.resources.dll
                • System.ServiceModel.DomainServices.Client.resources.dll
                • System.ServiceModel.DomainServices.Client.Web.resources.dll
                • System.ServiceModel.Web.Extensions.resources.dll
                • System.Windows.Controls.Data.Input.resources.dll
                • System.Windows.Controls.Navigation.resources.dll
                • System.Windows.Controls.resources.dll
              • ja
                • System.ComponentModel.DataAnnotations.resources.dll
                • System.ServiceModel.DomainServices.Client.resources.dll
                • System.ServiceModel.DomainServices.Client.Web.resources.dll
                • System.ServiceModel.Web.Extensions.resources.dll
                • System.Windows.Controls.Data.Input.resources.dll
                • System.Windows.Controls.Navigation.resources.dll
                • System.Windows.Controls.resources.dll
              • ko
                • System.ComponentModel.DataAnnotations.resources.dll
                • System.ServiceModel.DomainServices.Client.resources.dll
                • System.ServiceModel.DomainServices.Client.Web.resources.dll
                • System.ServiceModel.Web.Extensions.resources.dll
                • System.Windows.Controls.Data.Input.resources.dll
                • System.Windows.Controls.Navigation.resources.dll
                • System.Windows.Controls.resources.dll
              • lt
                • System.ComponentModel.DataAnnotations.resources.dll
                • System.Windows.Controls.Data.Input.resources.dll
                • System.Windows.Controls.resources.dll
              • lv
                • System.ComponentModel.DataAnnotations.resources.dll
                • System.Windows.Controls.Data.Input.resources.dll
                • System.Windows.Controls.resources.dll
              • ms
                • System.ComponentModel.DataAnnotations.resources.dll
                • System.Windows.Controls.Data.Input.resources.dll
                • System.Windows.Controls.resources.dll
              • nl
                • System.ComponentModel.DataAnnotations.resources.dll
                • System.Windows.Controls.Data.Input.resources.dll
                • System.Windows.Controls.resources.dll
              • no
                • System.ComponentModel.DataAnnotations.resources.dll
                • System.Windows.Controls.Data.Input.resources.dll
                • System.Windows.Controls.resources.dll
              • pl
                • System.ComponentModel.DataAnnotations.resources.dll
                • System.Windows.Controls.Data.Input.resources.dll
                • System.Windows.Controls.resources.dll
              • pt
                • System.ComponentModel.DataAnnotations.resources.dll
                • System.Windows.Controls.Data.Input.resources.dll
                • System.Windows.Controls.resources.dll
              • pt-BR
                • System.ComponentModel.DataAnnotations.resources.dll
                • System.Windows.Controls.Data.Input.resources.dll
                • System.Windows.Controls.resources.dll
              • ro
                • System.ComponentModel.DataAnnotations.resources.dll
                • System.Windows.Controls.Data.Input.resources.dll
                • System.Windows.Controls.resources.dll
              • ru
                • System.ComponentModel.DataAnnotations.resources.dll
                • System.ServiceModel.DomainServices.Client.resources.dll
                • System.ServiceModel.DomainServices.Client.Web.resources.dll
                • System.ServiceModel.Web.Extensions.resources.dll
                • System.Windows.Controls.Data.Input.resources.dll
                • System.Windows.Controls.Navigation.resources.dll
                • System.Windows.Controls.resources.dll
              • sk
                • System.ComponentModel.DataAnnotations.resources.dll
                • System.Windows.Controls.Data.Input.resources.dll
                • System.Windows.Controls.resources.dll
              • sl
                • System.ComponentModel.DataAnnotations.resources.dll
                • System.Windows.Controls.Data.Input.resources.dll
                • System.Windows.Controls.resources.dll
              • sr-Cyrl-CS
                • System.ComponentModel.DataAnnotations.resources.dll
                • System.Windows.Controls.Data.Input.resources.dll
                • System.Windows.Controls.resources.dll
              • sr-Latn-CS
                • System.ComponentModel.DataAnnotations.resources.dll
                • System.Windows.Controls.Data.Input.resources.dll
                • System.Windows.Controls.resources.dll
              • sv
                • System.ComponentModel.DataAnnotations.resources.dll
                • System.Windows.Controls.Data.Input.resources.dll
                • System.Windows.Controls.resources.dll
              • System.ComponentModel.DataAnnotations.dll
              • System.ComponentModel.DataAnnotations.xml
              • System.ServiceModel.DomainServices.Client.dll
              • System.ServiceModel.DomainServices.Client.Web.dll
              • System.ServiceModel.DomainServices.Client.Web.xml
              • System.ServiceModel.DomainServices.Client.xml
              • System.ServiceModel.Web.Extensions.dll
              • System.ServiceModel.Web.Extensions.xml
              • System.Windows.Controls.Data.DataForm.Toolkit.dll
              • System.Windows.Controls.Data.Input.dll
              • System.Windows.Controls.Data.Input.xml
              • System.Windows.Controls.dll
              • System.Windows.Controls.Navigation.dll
              • System.Windows.Controls.Navigation.xml
              • System.Windows.Controls.xml
              • TestPage.html
              • th
                • System.ComponentModel.DataAnnotations.resources.dll
                • System.Windows.Controls.Data.Input.resources.dll
                • System.Windows.Controls.resources.dll
              • tr
                • System.ComponentModel.DataAnnotations.resources.dll
                • System.Windows.Controls.Data.Input.resources.dll
                • System.Windows.Controls.resources.dll
              • uk
                • System.ComponentModel.DataAnnotations.resources.dll
                • System.Windows.Controls.Data.Input.resources.dll
                • System.Windows.Controls.resources.dll
              • vi
                • System.ComponentModel.DataAnnotations.resources.dll
                • System.Windows.Controls.Data.Input.resources.dll
                • System.Windows.Controls.resources.dll
              • zh-Hans
                • System.ComponentModel.DataAnnotations.resources.dll
                • System.ServiceModel.DomainServices.Client.resources.dll
                • System.ServiceModel.DomainServices.Client.Web.resources.dll
                • System.ServiceModel.Web.Extensions.resources.dll
                • System.Windows.Controls.Data.Input.resources.dll
                • System.Windows.Controls.Navigation.resources.dll
                • System.Windows.Controls.resources.dll
              • zh-Hant
                • System.ComponentModel.DataAnnotations.resources.dll
                • System.ServiceModel.DomainServices.Client.resources.dll
                • System.ServiceModel.DomainServices.Client.Web.resources.dll
                • System.ServiceModel.Web.Extensions.resources.dll
                • System.Windows.Controls.Data.Input.resources.dll
                • System.Windows.Controls.Navigation.resources.dll
                • System.Windows.Controls.resources.dll
          • BusinessAppMVVM.csproj
          • BusinessAppMVVM.csproj.user
          • Controls
          • Generated_Code
          • GlobalSuppressions.cs
          • Helpers
          • Libs
            • System.Windows.Controls.Data.DataForm.Toolkit.dll
          • MainPage.xaml
          • MainPage.xaml.cs
          • Models
          • obj
          • Properties
          • Service References
          • ServiceReferences.ClientConfig
          • ViewModel
          • Views
          • Web
            • Resources
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.1
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace BusinessAppMVVM
{
    using System;


    /// <summary>
    ///   A strongly-typed resource class, for looking up localized strings, etc.
    /// </summary>
    // This class was auto-generated by the StronglyTypedResourceBuilder
    // class via a tool like ResGen or Visual Studio.
    // To add or remove a member, edit your .ResX file then rerun ResGen
    // with the /str option, or rebuild your VS project.
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
    public class SecurityQuestions
    {

        private static global::System.Resources.ResourceManager resourceMan;

        private static global::System.Globalization.CultureInfo resourceCulture;

        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        internal SecurityQuestions()
        {
        }

        /// <summary>
        ///   Returns the cached ResourceManager instance used by this class.
        /// </summary>
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        public static global::System.Resources.ResourceManager ResourceManager
        {
            get
            {
                if (object.ReferenceEquals(resourceMan, null))
                {
                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("BusinessAppMVVM.Assets.Resources.SecurityQuestions", typeof(SecurityQuestions).Assembly);
                    resourceMan = temp;
                }
                return resourceMan;
            }
        }

        /// <summary>
        ///   Overrides the current thread's CurrentUICulture property for all
        ///   resource lookups using this strongly typed resource class.
        /// </summary>
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        public static global::System.Globalization.CultureInfo Culture
        {
            get
            {
                return resourceCulture;
            }
            set
            {
                resourceCulture = value;
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to What is the name of your favorite childhood friend?.
        /// </summary>
        public static string BestChildhoodFriendQuestion
        {
            get
            {
                return ResourceManager.GetString("BestChildhoodFriendQuestion", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to What was your childhood nickname?.
        /// </summary>
        public static string ChildhoodNicknameQuestion
        {
            get
            {
                return ResourceManager.GetString("ChildhoodNicknameQuestion", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to What was the color of your first car?.
        /// </summary>
        public static string FirstCarColorQuestion
        {
            get
            {
                return ResourceManager.GetString("FirstCarColorQuestion", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to What was the make and model of your first car?.
        /// </summary>
        public static string FirstCarMakeAndModelQuestion
        {
            get
            {
                return ResourceManager.GetString("FirstCarMakeAndModelQuestion", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to In what city or town was your first job?.
        /// </summary>
        public static string FirstJobCityQuestion
        {
            get
            {
                return ResourceManager.GetString("FirstJobCityQuestion", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Where did you vacation last year?.
        /// </summary>
        public static string LastVacationLocationQuestion
        {
            get
            {
                return ResourceManager.GetString("LastVacationLocationQuestion", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to What is your maternal grandmother&apos;s maiden name?.
        /// </summary>
        public static string MaternalGrandmothersMaidenNameQuestion
        {
            get
            {
                return ResourceManager.GetString("MaternalGrandmothersMaidenNameQuestion", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to What is your mother&apos;s maiden name?.
        /// </summary>
        public static string MothersMaidenNameQuestion
        {
            get
            {
                return ResourceManager.GetString("MothersMaidenNameQuestion", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to What is your pet&apos;s name?.
        /// </summary>
        public static string PetNameQuestion
        {
            get
            {
                return ResourceManager.GetString("PetNameQuestion", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to What school did you attend for sixth grade?.
        /// </summary>
        public static string SixthGradeSchoolNameQuestion
        {
            get
            {
                return ResourceManager.GetString("SixthGradeSchoolNameQuestion", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to In what year was your father born?.
        /// </summary>
        public static string YearFatherWasBornQuestion
        {
            get
            {
                return ResourceManager.GetString("YearFatherWasBornQuestion", resourceCulture);
            }
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect
United States United States
Manoj Kumar

AWS Certified Solutions Architect (Web development, Serverless, DevOps, Data)
MSSE - Cloud and Mobile Computing, San Jose State University

A wide range of experience in resolving complex business problems.

* Cloud Technologies: EC2, S3, DynamoDB & RDS databases, Lambda serverless architecture, Microservices architecture, API Gateway, Cloud Front CDN, Linux/Windows systems administration, CloudFormation, DevOps, Docker, CICD, Node.js, Python, Java and other open source technologies. Familiarity with OpenStack.
* Web Technologies: HTML5, Node.Js, MEAN Stack, AngularJS, ASP.Net Core, MVC5, CSS3, jQuery, Bootstrap, MongoDB, JavaScript, JSON, AJAX.
* Data: Experience in database architecture, Big Data, Machine Learning, BI, Data Analytics, No-SQL databases, ETL.
* Mobile: IOS/Android app development

He lives with his wife Supriya and daughter Tisya in Bay Area.

Comments and Discussions