Could not find default endpoint element that references contract 'OutSystems.NssMyProject.MyService' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element. I can run the C# code in a stand alone C# Windows Form and it works fine. It acts like OutSystems isn't reading the app.config file. Any ideas??? Thanks.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="InquiryServiceSoapBinding">
<readerQuotas maxStringContentLength="2000000" maxNameTableCharCount="2147483647"/>
<security mode="TransportWithMessageCredential"/>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address=https://mydomain.com/Inquiry.svc
binding="basicHttpBinding" bindingConfiguration="InquiryServiceSoapBinding"
contract="OutSystems.NssMyExtension.InquiryService"
name="InquiryServiceSoap" />
</client>
</system.serviceModel>
</configuration>
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using System.ServiceModel.Configuration;
using System.Web.Configuration;
using System.Data;
using OutSystems.HubEdition.RuntimePlatform;
using GotDotNet.ApplicationBlocks;
namespace OutSystems.NssMyExtension {
public class CssMyExtension: IssMyExtension {
private const string _USERNAME = "user";
private const string _PASSWORD = "password";
/// <summary>
///
/// </summary>
/// <param name="ssAcctId"></param>
/// <param name="ssAcctType"></param>
/// <param name="ssCurrBal"></param>
/// <param name="ssAvailBal"></param>
public void MssAcctInq(string ssAcctId, string ssAcctType, out string ssCurrBal, out string ssAvailBal) {
ssCurrBal = string.Empty;
ssAvailBal = string.Empty;
// TODO: Write implementation for action
InquiryServiceClient proxy = new InquiryServiceClient();
AcctInqRequest request = new AcctInqRequest();
AcctInqResponse response = new AcctInqResponse();
request.MsgRqHdr = new MsgRqHdr_CType();
request.MsgRqHdr.subHdr = new subHdr_CType();
request.MsgRqHdr.subHdr.AuditUsrId = "Test";
request.MsgRqHdr.subHdr.AuditWsId = "Test";
request.InAcctId = new AccountId_CType();
request.InAcctId.AcctId = new AcctId_Type();
request.InAcctId.AcctType = new AcctType_Type();
request.InAcctId.AcctId.Value = ssAcctId;
request.InAcctId.AcctType.Value = ssAcctType;
proxy.ClientCredentials.UserName.UserName = _USERNAME;
proxy.ClientCredentials.UserName.Password = _PASSWORD;
response = proxy.AcctInq(request);
ssCurrBal = response.CurBal.ToString();
ssAvailBal = response.AvlBal.ToString();
} // MssAcctInq
} // CssMyExtension
} // OutSystems.NssMyExtension
Paulo, the code has sensitive client info, so I can not divuldge more than I have. As a temporary work around I have added the ServiceModel portion of the app.config to the eSpace web.config. I know this is a bad way since the web.config is replaced each time the eSpace is republished. So I need to either put this in the C# CS code, of some how be able to reference a static config file on the server. I prefer to not use the machine.config. What do you recommend? And how best would I impliment your recommendation? Thanks, Jeff