MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Switching from Staging to Production

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 ...


Go Back   MapPoint Forums > Map Forums > MapPoint Web Service and Virtual Earth

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-20-2005
Junior Member
White Belt
 
Join Date: Nov 2004
Posts: 4
Switching from Staging to Production

Hello,
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 03-29-2005
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
production, staging, switching


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -5. The time now is 09:36 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map


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