• ManiKannan
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
Hi All,

This is i am writing the code to be listed below.

Imports SalesForceWebservice
Imports SForce

Partial Class _Default
    Inherits System.Web.UI.Page
    Private _userId As String = "kanmani84@gmail.com"
    Private _password As String = "mani2104"
    Private _sessionId As String
    Private _serverUrl As String
    Private _nextLoginTime As DateTime
    Private _LoginURL As String = "https://na6.salesforce.com/sserv/frontdoor.jsp?sid="
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
      Check()
    End Sub


 Sub check()

        Try
            Dim lr As SForce.LoginResult = sfdc.login("kanmani84@gmail.com", "mani2104")
            sfdc.Url = lr.serverUrl
            sfdc.SessionHeaderValue = New SForce.SessionHeader()
            sfdc.SessionHeaderValue.sessionId = lr.sessionId
            Label1.Text = "The session id is: " + lr.sessionId
            Label1.Text += "<br />The new server url is: " + lr.serverUrl
        Catch ex As Exception
            Label1.Text = ex.ToString()

        End Try

    End Sub
end class

  After i run the program this error message is coming . how to solve this problem. if any one help me. Very urgent needs.

This the Error message i listed below

System.Web.Services.Protocols.SoapException: LOGIN_MUST_USE_SECURITY_TOKEN: Invalid username, password, security token; or user locked out. Are you at a new location? When accessing Salesforce--either via a desktop client or the API--from outside of your company’s trusted networks, you must add a security token to your password to log in. To receive a new security token, log in to Salesforce at http://www.salesforce.com and click Setup | My Personal Information | Reset Security Token. at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at SForce.SforceService.login(String username, String password) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\sfleadlookup\9467f327\80e7e73a\App_WebReferences.8bzmrpb7.1.cs:line 304 at _Default.check() in F:\Sample_Projects\SFLeadLookup\Default.aspx.vb:line 52


  Plz Very Urgent


With Regard,

K.Mani
Sofent Technologies
Hi All,

I want Some doubt for Salesforce.com integreation with asp.net.

If any one help for me. How to integreate Salesforce.com with asp.net any one send for me sample working program...

I waiting for Favourable Reply for all.

With Regards,
K.Mani
Sofent technologies.
Hi All,

This is i am writing the code to be listed below.

Imports SalesForceWebservice
Imports SForce

Partial Class _Default
    Inherits System.Web.UI.Page
    Private _userId As String = "kanmani84@gmail.com"
    Private _password As String = "mani2104"
    Private _sessionId As String
    Private _serverUrl As String
    Private _nextLoginTime As DateTime
    Private _LoginURL As String = "https://na6.salesforce.com/sserv/frontdoor.jsp?sid="
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
      Check()
    End Sub


 Sub check()

        Try
            Dim lr As SForce.LoginResult = sfdc.login("kanmani84@gmail.com", "mani2104")
            sfdc.Url = lr.serverUrl
            sfdc.SessionHeaderValue = New SForce.SessionHeader()
            sfdc.SessionHeaderValue.sessionId = lr.sessionId
            Label1.Text = "The session id is: " + lr.sessionId
            Label1.Text += "<br />The new server url is: " + lr.serverUrl
        Catch ex As Exception
            Label1.Text = ex.ToString()

        End Try

    End Sub
end class

  After i run the program this error message is coming . how to solve this problem. if any one help me. Very urgent needs.

This the Error message i listed below

System.Web.Services.Protocols.SoapException: LOGIN_MUST_USE_SECURITY_TOKEN: Invalid username, password, security token; or user locked out. Are you at a new location? When accessing Salesforce--either via a desktop client or the API--from outside of your company’s trusted networks, you must add a security token to your password to log in. To receive a new security token, log in to Salesforce at http://www.salesforce.com and click Setup | My Personal Information | Reset Security Token. at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at SForce.SforceService.login(String username, String password) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\sfleadlookup\9467f327\80e7e73a\App_WebReferences.8bzmrpb7.1.cs:line 304 at _Default.check() in F:\Sample_Projects\SFLeadLookup\Default.aspx.vb:line 52


  Plz Very Urgent


With Regard,

K.Mani
Sofent Technologies