Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 2 of 2

Switching from Staging to Production

This is a discussion on Switching from Staging to Production within the Bing Maps and MapPoint Web Service forums, part of the Map Forums category; Hello, My general question is, what's the easiest way to dynamically change my development environment from staging to production. I ...

  1. #1
    Jeff Smith is offline Junior Member White Belt
    Join Date
    Nov 2004

    Switching from Staging to Production

    My general question is, what's the easiest way to dynamically change my development environment from staging to production. I know the high-level answer is, "just repoint to another wsdl", but...

    I used asp.NET's discovery process to originally access the staging wsdl. From this, as well as the SDK, I now have code that has embedded within it staging references (i.e. public CommonServiceSoap() {
    this.Url = "http://findv3.staging.mappoint.net/Find-30/Common.asmx";
    } )

    Following the SDN, I wrote code that has the following initialization of the various services:
    private MapPointService.RenderServiceSoap renderService;
    private MapPointService.FindServiceSoap findService;
    private MapPointService.RouteServiceSoap routeService;
    private MapPointService.CommonServiceSoap commonService;

    If I look at the URLs, while stepping through the code, these naturally reference the hard-coded staging URLs. Is there a single place (i.e. within MapPointService) that I can just say, re-discover from the production (service) wsdl? Otherwise, is it safe to change each of the Urls dynamically to the production versions. For example:

    renderService.Url = "http://findv3.service.mappoint.net/Find-30/Common.asmx";

    Is this even a valid URL?


  2. #2
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002

    Settings in web.config file:

    Method in Global file:

    Public Sub AuthenticateServices()

    Dim myCredentials As New NetworkCredential(ConfigurationSettings.AppSetting s("MPUser"), ConfigurationSettings.AppSettings("MPPassword"))

    ' Render service
    RService = New RenderServiceSoap
    RService.Credentials = myCredentials
    RService.PreAuthenticate = True

    ' Find service
    FService = New FindServiceSoap
    FService.Credentials = myCredentials
    FService.PreAuthenticate = True

    ' Route service
    RtService = New RouteServiceSoap
    RtService.Credentials = myCredentials
    RtService.PreAuthenticate = True

    ' Common service
    CService = New CommonServiceSoap
    CService.Credentials = myCredentials
    CService.PreAuthenticate = True

    ' Set the endpoints to staging or production
    If ConfigurationSettings.AppSettings("IsProduction") = "T" Then
    RService.Url = ConfigurationSettings.AppSettings("RServiceProduction")
    FService.Url = ConfigurationSettings.AppSettings("FServiceProduction")
    RtService.Url = ConfigurationSettings.AppSettings("RtServiceProduction")
    CService.Url = ConfigurationSettings.AppSettings("CServiceProduction")
    RService.Url = ConfigurationSettings.AppSettings("RServiceStaging")
    FService.Url = ConfigurationSettings.AppSettings("FServiceStaging")
    RtService.Url = ConfigurationSettings.AppSettings("RtServiceStaging")
    CService.Url = ConfigurationSettings.AppSettings("CServiceStaging")
    End If

    Return myServices

    Catch ex As Exception

    End Try

    End Sub

    All you have to do is change the IsProduction value in the config file to T or F, doesn't cause a recompile. Staging and production are exactly the same just different end points which are specified by the .URL property.

    Steven Pushee

    This posting is provided "AS IS" with no warranties, and confers no rights.
    You assume all risk for your use. 2003 Microsoft Corporation. All rights

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. switching from 2004 to 2002
    By Wilfried in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 02-17-2005, 02:19 AM
  2. Switching place names off
    By Winwaed in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 08-17-2004, 11:28 AM
  3. Staging-Geocoding by city instead of country/region
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 04-02-2004, 03:24 PM
  4. WebForms - switching between
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 03-26-2004, 06:54 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59