You need to sign in to do that
Don't have an account?
balajibondar
How to access salesforce.com database using c#webapplication
Hi ,
I have joined salesforce.com newly
I have undergone through all the document for accesing salesforce database.
i have written one webapplication to remotly access salesforce database using C#.
but i am getting exception unable to remotly login to server .
Please provide me the following information
-procedure to connect to salesforce database
- what is endpoint url.
{
// Create service object
SforceService sfdc = new SforceService();
// Invoke the login call and save results in LoginResult
LoginResult lr = sfdc.login("username","password");
if (!lr.passwordExpired) {
// Reset the SOAP endpoint to the returned server URL
sfdc.Url = lr.serverUrl;
// Create a new session header object
// Add the session ID returned from the login
sfdc.SessionHeaderValue = new SessionHeader();
sfdc.SessionHeaderValue.sessionId = lr.sessionId;
sfdc.GetUserInfoResult userInfo = lr.userInfo;
} else {
Console.Writeline("You password is expired.");
}
}
--------------------------------------------------------------------------------------------------------------------------------------
I am not able to access salesforce database by using following code .Its giving exception as "unable to connect to remote server "
will anybody help me regarding to this so that i can access the database .
-------------------------------------------------------------------------------------------------------------------------------
private void login()
{
// Create service object
SforceService sfdc = new SforceService();
// Invoke the login call and save results in LoginResult
LoginResult lr = sfdc.login("username","password");
if (!lr.passwordExpired) {
// Reset the SOAP endpoint to the returned server URL
sfdc.Url = lr.serverUrl;
// Create a new session header object
// Add the session ID returned from the login
sfdc.SessionHeaderValue = new SessionHeader();
sfdc.SessionHeaderValue.sessionId = lr.sessionId;
sfdc.GetUserInfoResult userInfo = lr.userInfo;
} else {
Console.Writeline("You password is expired.");
}
}
----------------------------------------------------------------------------------------------------------------------
Hi Simon,
Thank u for reply and suggesting the solution .
Now i am able to access database .
My next question is that "how can i integrate my web app with salesforce by creating dll and other stuff"
Thank you .
Hi,
I'm new to salesforce.com application user. Basically i want to insert a record through my WCF service into salesforce database. I don't know from where to start. I've Apex explorer which give sales force query. Can you please pass me steps to connect to Salesforce database and insert records into salesforce DB. I would appreciate if any one post sample application you've developed in C# also fine i can catch up from there.
Really i'll be thankful for that. It is very urgent to kick of my project.
thanks in advance.
--Challenge
thanks for your response. But can you guide me like quick start to connect to salesforce DB and how to use queries. I would appreciate if you could send snippet of code. I've very less to show pilot application as demo.
Thanks in advance
Wow, this thread is cool, the post are informative and helpful specially in the field of database. Thank you for the post.
-------------
Software Development
Hi – I am having the same problem of accessing SalesForce database. What was the setting you made to get it connected ?
Thanks,
Pradip