We developed/tested CRUD operations of Sandbox SalesForce Enterprise WSDL object through .NET application. We create Web Service Reference in the .NET IDE by authenticating using User and Pasword in "Add Web Reference" dialog box which creates SFWebRference with wsdl and Reference.map file.
We use the following .NET code to instantiate SalesForce objects:
_sForceRef = New SforceService()
_loginResults = _sForceRef.login(SalesForce_User, SalesForce_Password & SalesForce_Token)
_sessionId = _loginResults.sessionId
_sForceRef.Url = _loginResults.serverUrl
_sForceRef.SessionHeaderValue = New SessionHeader()
_sForceRef.SessionHeaderValue.sessionId = _sessionId
We tested against Sandbox SalesForce, and now we want to deploy this solution in the Production using Production SalesForce Web Reference. Should I need to create a separate Web Service Reference for Production SalesForce and have a different object (other than SforceService()) and handle in the code to check Test or Production to use the respective objects?
I tried to use _sForceRef.Url = and it didn’t work.
It's not letting us to set _sForceRef.URL = , before we call _sForceRef.Login() with respective credentials, so do we need 2 Separate SalesForce Web Service Reference objects (Sandbox and Prod)? Please let me know your thoughts. I will be online in a short while.