Community of VE/MapPoint Users and Developers
This is a discussion on Switching from Staging to Production within the MapPoint Web Service and Virtual Earth 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 ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| 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? Thanks, Jeff |
| |||
|
Hello, Settings in web.config file: Method in Global file: Public Sub AuthenticateServices() Try 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") Else 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 reserved. |
![]() |
| Tags |
| production, staging, switching |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| switching from 2004 to 2002 | Wilfried | MapPoint 2006/2009 Discussion | 0 | 02-17-2005 03:19 AM |
| Switching place names off | Winwaed | MapPoint 2006/2009 Discussion | 3 | 08-17-2004 12:28 PM |
| Staging-Geocoding by city instead of country/region | Anonymous | MapPoint 2006/2009 Discussion | 1 | 04-02-2004 04:24 PM |
| WebForms - switching between | Anonymous | MapPoint 2006/2009 Discussion | 0 | 03-26-2004 07:54 AM |