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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T04:50:02+00:00 2026-05-16T04:50:02+00:00

I need to deploy a silverlight 4 soltution where it consumes data from a

  • 0

I need to deploy a silverlight 4 soltution where it consumes data from a WCF service. The challenge is this will be a production install and so I have no way of controlling the server name of the service and the silver light app will not be installed on the same server as the WCF.

Starting down this path here is what I have come up with thus far:

I will have to pass the server name of teh WCF to my silverligth app via initParams.

within the aspx file I have

<param name="initparams" value="servicepoint=http://myservice" />

then within the app.xaml.cs
I call the param:

private void Application_Startup(object sender, StartupEventArgs e)
    {
        this.RootVisual = new MainPage(e.InitParams); //pass parameter from html direclty to main page

    }

I called this within app startup so the paramater would be in scope of the entire app.

Now within main page I assign this param to a variable

dswconnection = initParams["servicepoint"];

and then whenever I query the service I set the address to override what is defaulted within the service refernece.config file

QueryClient selAct = new QueryClient("BasicHttpBinding_IQuery");
            selAct.Endpoint.Address = new System.ServiceModel.EndpointAddress(dswconnection);

My question is…. is this the best approach or is there another way to dynamically identify the server name of a service when you don’t know what that server name could be. This the key point I can’t use some of the features to detect host name or address within channelfactory as the silverlight app will reside on a different host than the WCF.

Right now the value that is passed to initparams is stored in a config file that is read by javascript and then assigend as the value. In my code here I hard coded it for brevity.

Thanks for any suggestions.

  • 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-16T04:50:02+00:00Added an answer on May 16, 2026 at 4:50 am

    After some more research it appears in instances where the sl app is to be installed on separate servers or if hte need is to have it point to different WCF endpoints the above approach worked the best for this project. We ended up storing the full qualified server name for the endpoin in a web.config file with other connection strings. Then passed this value to the init params using JSON. Silverlightwas then able at intializtion to pick up the new server name and point the SL app towards the new service.

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

Sidebar

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.