function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
vinod kumar 164vinod kumar 164 

Can we work with WindowService(dotnet) to integrate with salesforce using Soap Api

Hi

We are new to the salesforce and we are tyring to intgerate our data to salesforce and vice versa.
Right now we are tyring to authenticate the salesforce with WindowsService using Soap Api.but we are failed to authenticate and its throwing exception

"The underlying connection was closed: An unexpected error occurred on a receive."

And also we are mentioning the code below how we tried to authenicate the salesforce through WindowsService.

              string sfdcToken = ConfigurationManager.AppSettings["Securitytoken"].ToString();
                string sfdcPassword = ConfigurationManager.AppSettings["Password"].ToString();
                string sfdcuserName = ConfigurationManager.AppSettings["Username"].ToString();
                string loginPassword = string.Concat(sfdcPassword,sfdcToken);
                SfdcBinding = new SforceService();
                SfdcBinding.Timeout = 30000;
                CurrentLoginResult = SfdcBinding.login(sfdcuserName, loginPassword);


But when we tried the same above code in web application it is not throwing any exception and it is successfully authenticated with salesforce.
So please let us know the solution whether we can work with windowservice using Soap Api to integrate the data to salesforce and vice versa.

Regards
Vinod
Daniel BallingerDaniel Ballinger
Have you confirmed that the .config file has been deployed along with the windows service and that it is in the correct location?
See Windows service app.config location (http://stackoverflow.com/q/14074563/54026)

If the code can't find the config file it won't get the correct URL for the web service (or the credentials).