• Greg Robinson 1
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Our Enterprise WSDL undergone some changes due to new fields in a table. So, we removed the Web Service reference in .NET project and deleted and added back. It's now throwing the below error in the line _sForceRef.login(SalesForce_User, SalesForce_Password & SalesForce_Token) as follows.

An unhandled exception of type 'System.StackOverflowException' occurred in Microsoft.GeneratedCode

The same code works good in another laptop, but I tried in both VS 2013 and 2015 and I get same error. Please help.

'New line added for SalesForce TLS changes
System.Net.ServicePointManager.SecurityProtocol = DirectCast(3072, SecurityProtocolType)

Dim wp As WebProxy = New WebProxy("cwybcproxy.us.dnb.com", 8080)
wp.BypassProxyOnLocal = False
_sForceRef.Proxy = wp

_loginResults = _sForceRef.login(SalesForce_User, SalesForce_Password & SalesForce_Token)

_sessionId = _loginResults.sessionId
_sForceRef.Url = _loginResults.serverUrl
_sForceRef.SessionHeaderValue = New SessionHeader()
_sForceRef.SessionHeaderValue.sessionId = _sessionId