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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:06:55+00:00 2026-05-25T19:06:55+00:00

I have an issue that hopefully someone could advise me on. I am creating

  • 0

I have an issue that hopefully someone could advise me on.

I am creating an enterprise iPhone application that will capture information and write it to a local server.

Depending on which of our sites the user is at will depend on which server the information is written to.

I have created a webservice which I can consume in monotouch and pass it information which it will then write to a SQL database on the local server. The problem I face is how do I go about doing this for all of our locations? If i put a web service at each location then each location will need its own version of the app that write using their webservice (all the servers are on the same network and are not separate)

Can I dynamically consume a webservice by passing the relevant URL?

Should I be taking another approach?

Any advice would be appreciated.

  • 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-25T19:06:56+00:00Added an answer on May 25, 2026 at 7:06 pm

    EDIT – I probably should mention we use WCF-style web services that require bindings being generated with SISvcUtil.exe (that is where the WebServiceClient class comes from).

    We do something similar where we have a test server and production server and it is simple to change the URL where the web service points to. Obviously this does assume that the web service hosted at all the different locations are the same…

    When creating the Client object which consumes the web service you need to specify bindings and an endpointaddress, you can simply change the endpointaddress string to point at the appropriate server. The code below should give you an idea of how to do this…

    BasicHttpBinding binding = new BasicHttpBinding();
    binding.OpenTimeout = new TimeSpan(0,1,0);
    binding.CloseTimeout = new TimeSpan(0,1,0);
    binding.SendTimeout = new TimeSpan(0,1,0);
    //snip - any other bindings you need to specify...
    
    string fullDomain;
    string domain;
    
    if (local)
        domain = "local.server.com";
    else
        domain = "production.server.com";
    
    fullDomain = string.Format("https://{0}/WebService/Service.svc", domain);
    
    EndpointAddress endpointAddress = new EndpointAddress(fullDomain);
    
    WebServiceClient client = new WebServiceClient(binding, endpointAddress);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an odd issue that's driving me nuts by now. Hopefully someone here
I have an issue that is driving me nuts and hoping someone can help.
Happy New Year SO users! I have an issue that I hope someone can
hopefully someone here can shed some light on my issue :D I've been creating
Hopefully, someone here can give me some light. I have been researching this issue
Hopefully someone can shed some light onto this issue for me. I have a
I have a common issue that I'd like to (hopefully) find a better solution
Hopefully someone can shed a little light on an issue that I'm currently having
I am having an issue with Aptana that hopefully someone else has experience and
I have issue that is reproduced on g++. VC++ doesn't meet any problems. So

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.