# API Help

**URL:** <https://www.epiusers.help/t/api-help/73846>\
**Category:** Epicor ERP 10\
**Tags:** customization\
**Created:** [December 18, 2020, 4:20pm UTC](https://www.epiusers.help/t/api-help/73846 "2020-12-18T16:20:20Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![adlaws1](https://www.epiusers.help/letter_avatar_proxy/v4/letter/a/9e8a1a/32.png) [@adlaws1](https://www.epiusers.help/u/adlaws1)\
**Post date:** [December 18, 2020, 4:20pm UTC](https://www.epiusers.help/t/api-help/73846/1 "2020-12-18T16:20:21Z")

</div>

Hi  
I am using the demo code to attempt to connect to the web services

ServicePointManager.ServerCertificateValidationCallback += (sender, certificate, chain, errors) =\> { return true; };  
EndpointBindingType bindingType = EndpointBindingType.SOAPHttp;  
string epicorUserID = “\*\*\*\*\*\*\*\*”; \<\< my epicor login  
string epiorUserPassword = “\*\*\*\*”; \<\< my password

```
        string scheme = "http"; 
        if (bindingType == EndpointBindingType.BasicHttp)
        {
            scheme = "https";
        }

     
        UriBuilder builder = new UriBuilder(scheme, "e10server3.internal.labs.com");
    // http:///EpicorERPTest/Ice/Lib/SessionMod.svc
        // change 'ERP100500' to the name of your appserver
        builder.Path = "EpicorERPTest/Ice/Lib/SessionMod.svc";
        SessionModSvcContractClient sessionModClient = GetClient<SessionModSvcContractClient, SessionModSvcContract>(
            builder.Uri.ToString(),
            epicorUserID,
            epiorUserPassword,
            bindingType);

        // change 'ERP100500' to the name of your appserver
        builder.Path = "EpicorERPTest/Erp/BO/AbcCode.svc";
        ABCCodeSvcContractClient abcCodeClient = GetClient<ABCCodeSvcContractClient, ABCCodeSvcContract>(
            builder.Uri.ToString(),
            epicorUserID,
            epiorUserPassword,
            bindingType);
        Guid sessionId = Guid.Empty;
        sessionId = sessionModClient.Login();

```

All works until i call the login method and i get the following error  
System.ServiceModel.EndpointNotFoundException: ‘There was no endpoint listening at [http://e10server3.internal.labs.com/EpicorERPTest/Ice/Lib/SessionMod.svc](http://e10server3.internal.labs.com/EpicorERPTest/Ice/Lib/SessionMod.svc) that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.’

if i have checked the url and all seems to be ok  
Any pointers please this is driving me insane

---

<div class="post-metadata">

**Author:** ![Olga](https://www.epiusers.help/letter_avatar_proxy/v4/letter/o/57b2e6/32.png) [@Olga](https://www.epiusers.help/u/Olga)\
**Post date:** [December 18, 2020, 4:26pm UTC](https://www.epiusers.help/t/api-help/73846/2 "2020-12-18T16:26:03Z")

</div>

Do you have  
`<add scheme="http" binding="wsHttpBinding" bindingConfiguration="SOAPHttp" />`  
in your web.config protocolMapping?

---

<div class="post-metadata">

**Author:** ![adlaws1](https://www.epiusers.help/letter_avatar_proxy/v4/letter/a/9e8a1a/32.png) [@adlaws1](https://www.epiusers.help/u/adlaws1)\
**Post date:** [December 21, 2020, 8:57am UTC](https://www.epiusers.help/t/api-help/73846/3 "2020-12-21T08:57:09Z")

</div>

Hi  
No this has not help still getting the same error any help would be very much appreciated  
Regards  
Andy

EndpointNotFoundException: There was no endpoint listening at [http://e10server3.internal.labs.com/EpicorERPTest/Ice/Lib/SessionMod.svc](http://e10server3.internal.labs.com/EpicorERPTest/Ice/Lib/SessionMod.svc) that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.]  
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) +159  
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) +353

---

<div class="post-metadata">

**Author:** ![adlaws1](https://www.epiusers.help/letter_avatar_proxy/v4/letter/a/9e8a1a/32.png) [@adlaws1](https://www.epiusers.help/u/adlaws1)\
**Post date:** [December 21, 2020, 9:22am UTC](https://www.epiusers.help/t/api-help/73846/4 "2020-12-21T09:22:09Z")

</div>

Hi  
Using the SvcUtil.exe tool i get the following

Access to the path ‘C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\SessionModSvcFacade.cs’ is denied.

---

<div class="post-metadata">

**Author:** ![adaniell](https://www.epiusers.help/letter_avatar_proxy/v4/letter/a/278dde/32.png) [@adaniell](https://www.epiusers.help/u/adaniell)\
**Post date:** [December 22, 2020, 7:38pm UTC](https://www.epiusers.help/t/api-help/73846/5 "2020-12-22T19:38:45Z")

</div>

Your URI doesn’t look quite right, try:

```auto
UriBuilder builder = new UriBuilder(scheme, "e10server3");

```

Also, you can browse to endpoint or wsdl. You can use this to verify your URL:

 ![image](https://www.epiusers.help/uploads/default/original/3X/d/c/dcbd54bee62b4c38b6d6894d519777cc54a48d61.png)

---

<div class="post-metadata">

**Author:** ![adlaws1](https://www.epiusers.help/letter_avatar_proxy/v4/letter/a/9e8a1a/32.png) [@adlaws1](https://www.epiusers.help/u/adlaws1)\
**Post date:** [December 23, 2020, 8:18am UTC](https://www.epiusers.help/t/api-help/73846/6 "2020-12-23T08:18:25Z")

</div>

Hi  
Thanks for the response, it seems the server address is good as you can see the, i have tried everything so any help would be appreciated

 ![Capture](https://www.epiusers.help/uploads/default/original/3X/4/4/446368107014cf954e0db71f6dce84e23c3cfb44.png)

---

<div class="post-metadata">

**Author:** ![adlaws1](https://www.epiusers.help/letter_avatar_proxy/v4/letter/a/9e8a1a/32.png) [@adlaws1](https://www.epiusers.help/u/adlaws1)\
**Post date:** [December 23, 2020, 9:04am UTC](https://www.epiusers.help/t/api-help/73846/7 "2020-12-23T09:04:29Z")

</div>

This is the section of my web config

```
<system.serviceModel>
	<protocolMapping>
		<remove scheme="net.tcp" />
		<!--<add scheme="net.tcp" binding="customBinding" bindingConfiguration="TcpCompressedWindows" />-->
		<!--<add scheme="net.tcp" binding="customBinding" bindingConfiguration="TcpCompressedUsernameSslChannel" />-->
		<add scheme="net.tcp" binding="customBinding" bindingConfiguration="TcpCompressedUsernameWindowsChannel" />
		<!--
  <remove scheme="http" />
  <add scheme="http" binding="wsHttpBinding" bindingConfiguration="SOAPHttp" />
  <add scheme="http" binding="customBinding" bindingConfiguration="HttpBinaryUsernameSslChannel" />
  
  <add scheme="http" binding="customBinding" bindingConfiguration="HttpsOffloadBinaryUserNameChannel" />
  <add scheme="http" binding="customBinding" bindingConfiguration="HttpsOffloadBinaryAzureChannel" />
  -->
		<!--
  <remove scheme="https" />
  <add scheme="https" binding="customBinding" bindingConfiguration="HttpsBinaryUsernameChannel"/>
  <add scheme="https" binding="customBinding" bindingConfiguration="HttpsBinaryAzureChannel"/>
  <add scheme="https" binding="customBinding" bindingConfiguration="HttpsBinaryWindowsChannel"/>
  <add scheme="https" binding="basicHttpBinding" bindingConfiguration="BasicHttp" />
  -->
		<remove scheme="https" />
		<add scheme="https" binding="basicHttpBinding" bindingConfiguration="BasicHttp" />
		<remove scheme="http" />
		<add scheme="http" binding="wsHttpBinding" bindingConfiguration="SOAPHttp" />
		<remove scheme="http" />
		<remove scheme="https" />
	</protocolMapping>
	<services>
		<service name="Epicor.Web.TokenResource">
			<endpoint address="" behaviorConfiguration="webBehavior" binding="webHttpBinding" bindingConfiguration="RestHttps" contract="Epicor.Web.TokenResource" />
		</service>
		<service name="Erp.Services.Web.ECC">
			<endpoint address="" behaviorConfiguration="webBehavior" binding="webHttpBinding" bindingConfiguration="RestHttps" contract="Erp.Services.Web.ECC" />
		</service>
	</services>
	<bindings>
		<!--REST/OData - Authentication: Epicor Username - Channel encrypted via https -->
		<webHttpBinding>
			<binding name="RestHttps" transferMode="Buffered">
				<security mode="Transport">
					<transport clientCredentialType="InheritedFromHost" />
				</security>
				<readerQuotas maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxDepth="2147483647" maxStringContentLength="2147483647" />
			</binding>
		</webHttpBinding>
		<!--SOAP 1.1 - Authentication: Epicor Username - Channel encrypted via https -->
		<basicHttpBinding>
			<binding name="BasicHttp" maxReceivedMessageSize="2147483647">
				<security mode="TransportWithMessageCredential">
					<message clientCredentialType="UserName" />
				</security>
				<readerQuotas maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxDepth="2147483647" maxStringContentLength="2147483647" />
			</binding>
		</basicHttpBinding>
		<!--SOAP 1.2 - Authentication: Epicor Username - Message encrypted -->
		<wsHttpBinding>
			<binding name="SOAPHttp" maxReceivedMessageSize="2147483647">
				<security mode="Message">
					<message clientCredentialType="UserName" />
				</security>
				<readerQuotas maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxDepth="2147483647" maxStringContentLength="2147483647" />
			</binding>
		</wsHttpBinding>
		<customBinding>
			<!--HTTPS - Authentication: Epicor Username - Channel encrypted via https -->
			<binding name="HttpsBinaryUsernameChannel" openTimeout="00:10:00" receiveTimeout="9:00:00" sendTimeout="9:00:00">
				<binaryMessageEncoding compressionFormat="Deflate">
					<readerQuotas maxDepth="50" maxArrayLength="2147483647" maxBytesPerRead="2147483647" />
				</binaryMessageEncoding>
				<security authenticationMode="UserNameOverTransport" />
				<httpsTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" />
			</binding>
			<!--HTTPS - Authentication: Windows credentials - Channel encrypted via https -->
			<binding name="HttpsBinaryWindowsChannel" openTimeout="00:10:00" receiveTimeout="9:00:00" sendTimeout="9:00:00">
				<binaryMessageEncoding compressionFormat="Deflate">
					<readerQuotas maxDepth="50" maxArrayLength="2147483647" maxBytesPerRead="2147483647" />
				</binaryMessageEncoding>
				<security authenticationMode="SspiNegotiatedOverTransport" requireSecurityContextCancellation="False" />
				<httpsTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" />
			</binding>
			<!--HTTPS - Authentication: Azure AD token - Channel encrypted via https -->
			<binding name="HttpsBinaryAzureChannel" openTimeout="00:10:00" receiveTimeout="9:00:00" sendTimeout="9:00:00">
				<binaryMessageEncoding compressionFormat="Deflate">
					<readerQuotas maxDepth="50" maxArrayLength="2147483647" maxBytesPerRead="2147483647" />
				</binaryMessageEncoding>
				<httpsTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" />
			</binding>
			<!--HTTP - Authentication: Epicor Username - Channel not encypted - SOAP SSL message security is used-->
			<binding name="HttpBinaryUsernameSslChannel" openTimeout="00:10:00" receiveTimeout="9:00:00" sendTimeout="9:00:00">
				<binaryMessageEncoding compressionFormat="Deflate">
					<readerQuotas maxDepth="50" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxStringContentLength="2147483647" />
				</binaryMessageEncoding>
				<security authenticationMode="UserNameForSslNegotiated" requireSecurityContextCancellation="False" />
				<httpTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" />
			</binding>
			<!--HTTP - Authentication: Epicor Username - Channel not encypted - SSL Offloading must be done on proxy-->
			<binding name="HttpsOffloadBinaryUserNameChannel" openTimeout="00:10:00" receiveTimeout="9:00:00" sendTimeout="9:00:00">
				<binaryMessageEncoding compressionFormat="Deflate">
					<readerQuotas maxDepth="50" maxArrayLength="2147483647" maxBytesPerRead="2147483647" />
				</binaryMessageEncoding>
				<security authenticationMode="UserNameOverTransport" allowInsecureTransport="True" />
				<httpTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" />
			</binding>
			<!--HTTP - Authentication: Azure AD token - Channel not encypted - SSL Offloading must be done on proxy-->
			<binding name="HttpsOffloadBinaryAzureChannel" openTimeout="00:10:00" receiveTimeout="9:00:00" sendTimeout="9:00:00">
				<binaryMessageEncoding compressionFormat="Deflate">
					<readerQuotas maxDepth="50" maxArrayLength="2147483647" maxBytesPerRead="2147483647" />
				</binaryMessageEncoding>
				<httpTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" />
			</binding>
			<!--NET.TCP - Authentication: Epicor Username - Channel encrypted via SSL -->
			<binding name="TcpCompressedUsernameSslChannel" openTimeout="00:10:00" receiveTimeout="9:00:00" sendTimeout="9:00:00">
				<CompressionEncoder>
					<binaryMessageEncoding>
						<readerQuotas maxDepth="50" maxArrayLength="2147483647" maxBytesPerRead="2147483647" />
					</binaryMessageEncoding>
				</CompressionEncoder>
				<security authenticationMode="UserNameOverTransport" />
				<sslStreamSecurity />
				<tcpTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" transferMode="Buffered" />
			</binding>
			<!--NET.TCP - Authentication: Windows Credentials - Channel encrypted via Windows Trusted Domain between Client and Server -->
			<binding name="TcpCompressedWindows" openTimeout="00:10:00" receiveTimeout="9:00:00" sendTimeout="9:00:00">
				<CompressionEncoder>
					<binaryMessageEncoding>
						<readerQuotas maxDepth="50" maxArrayLength="2147483647" maxBytesPerRead="2147483647" />
					</binaryMessageEncoding>
				</CompressionEncoder>
				<windowsStreamSecurity />
				<tcpTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" transferMode="Buffered" />
			</binding>
			<!--NET.TCP - Authentication: Epicor Username - Channel encrypted via Windows Trusted Domain between Client and Server -->
			<binding name="TcpCompressedUsernameWindowsChannel" openTimeout="00:10:00" receiveTimeout="9:00:00" sendTimeout="9:00:00">
				<CompressionEncoder>
					<binaryMessageEncoding>
						<readerQuotas maxDepth="50" maxArrayLength="2147483647" maxBytesPerRead="2147483647" />
					</binaryMessageEncoding>
				</CompressionEncoder>
				<security authenticationMode="UserNameOverTransport" />
				<windowsStreamSecurity />
				<tcpTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" transferMode="Buffered" />
			</binding>
		</customBinding>
	</bindings>
	<extensions>
		<bindingElementExtensions>
			<add name="CompressionEncoder" type="Epicor.ServiceModel.Configuration.CompressionEncodingElement, Epicor.ServiceModel, Culture=neutral" />
		</bindingElementExtensions>
		<behaviorExtensions>
			<add name="AddressFilterModeAny" type="Epicor.Hosting.Wcf.AddressFilterModeAnyElement, Epicor.System, Culture=neutral" />
		</behaviorExtensions>
	</extensions>
	<behaviors>
		<endpointBehaviors>
			<behavior name="webBehavior">
				<webHttp helpEnabled="true" />
			</behavior>
		</endpointBehaviors>
		<serviceBehaviors>
			<behavior>
				<serviceThrottling maxConcurrentCalls="15120" maxConcurrentSessions="500000" maxConcurrentInstances="15120" />
				<serviceDebug includeExceptionDetailInFaults="true" />
				<serviceMetadata httpGetEnabled="true" />
				<serviceSecurityAudit auditLogLocation="Application" serviceAuthorizationAuditLevel="Failure" messageAuthenticationAuditLevel="Failure" suppressAuditFailure="true" />
				<serviceCredentials>
					<!-- Uncomment for Ssl. Set FindType and Value based on your Certificate -->
					<userNameAuthentication userNamePasswordValidationMode="Custom" customUserNamePasswordValidatorType="Ice.Security.UsernameValidator, Epicor.Ice, Culture=neutral" />
					<clientCertificate>
						<authentication revocationMode="NoCheck" certificateValidationMode="PeerOrChainTrust" />
					</clientCertificate>
					<!--<serviceCertificate x509FindType="FindBySubjectName" findValue="E10SERVER3.internal.labs.com" storeLocation="LocalMachine" storeName="My" />-->
				</serviceCredentials>
				<!--
      Note: This service authorization entry must exist to validate calls destined for ICE or Ice-derived application services.
      -->
				<serviceAuthorization serviceAuthorizationManagerType="Ice.Security.AuthorizationManager, Epicor.Ice, Culture=neutral" />
				<!-- Uncomment this element when AddressFilter mismatch at the EndpointDispatcher happens 
      <AddressFilterModeAny/>-->
			</behavior>
		</serviceBehaviors>
	</behaviors>
</system.serviceModel>
```

---

<div class="post-metadata">

**Author:** ![adlaws1](https://www.epiusers.help/letter_avatar_proxy/v4/letter/a/9e8a1a/32.png) [@adlaws1](https://www.epiusers.help/u/adlaws1)\
**Post date:** [December 23, 2020, 11:32am UTC](https://www.epiusers.help/t/api-help/73846/8 "2020-12-23T11:32:33Z")

</div>

When i create the reference in visual studio i get the following screens

 ![Capture](https://www.epiusers.help/uploads/default/original/3X/2/9/2971cac99100cf333cdbc2b2e9438238dd1fda31.png)

---

<div class="post-metadata">

**Author:** ![adlaws1](https://www.epiusers.help/letter_avatar_proxy/v4/letter/a/9e8a1a/32.png) [@adlaws1](https://www.epiusers.help/u/adlaws1)\
**Post date:** [December 23, 2020, 11:33am UTC](https://www.epiusers.help/t/api-help/73846/9 "2020-12-23T11:33:36Z")

</div>

Followed by

 ![Capture1](https://www.epiusers.help/uploads/default/original/3X/0/b/0b7d6ff51f347af5b7091ed5c31f6941de416d53.png)

---

<div class="post-metadata">

**Author:** ![adlaws1](https://www.epiusers.help/letter_avatar_proxy/v4/letter/a/9e8a1a/32.png) [@adlaws1](https://www.epiusers.help/u/adlaws1)\
**Post date:** [December 23, 2020, 12:13pm UTC](https://www.epiusers.help/t/api-help/73846/10 "2020-12-23T12:13:27Z")

</div>

![Capture](https://www.epiusers.help/uploads/default/original/3X/8/3/8338ca08cf2324a0c9bcee19d83cbc8881945e18.png)

---

<div class="post-metadata">

**Author:** ![adaniell](https://www.epiusers.help/letter_avatar_proxy/v4/letter/a/278dde/32.png) [@adaniell](https://www.epiusers.help/u/adaniell)\
**Post date:** [December 23, 2020, 2:12pm UTC](https://www.epiusers.help/t/api-help/73846/11 "2020-12-23T14:12:38Z")

</div>

Your server’s SSL certificate might be too rigid, does it include an asterisk for subdomains?

If this is for development purposes, you may be able to bypass this by declaring the following in your code prior to making any requests:

> if(Development)  
> ServicePointManager.ServerCertificateValidationCallback += (o, c, ch, er) =\> true;

Warning: The above code bypasses the client side validation done in your calling code, basically breaking SSL. This should only be used for development.

---

<div class="post-metadata">

**Author:** ![adlaws1](https://www.epiusers.help/letter_avatar_proxy/v4/letter/a/9e8a1a/32.png) [@adlaws1](https://www.epiusers.help/u/adlaws1)\
**Post date:** [December 23, 2020, 2:42pm UTC](https://www.epiusers.help/t/api-help/73846/12 "2020-12-23T14:42:56Z")

</div>

![Capture (2)](https://www.epiusers.help/uploads/default/original/3X/2/c/2cd1b5b41cc5b8bd2cdbabbeb502e9cc8c8e4fe3.jpeg)  
i will try the above “after Christmas now” i believe it is a cert issue, unfortunately i have only just taken ownership of our new Epicor ERP project and we are still in implementation sprint, so its a bit of a learning curve by very impressed with the functionality of Epicor in the whole week i have been working with it

---

<div class="post-metadata">

**Author:** ![Joseph\_Martin](https://www.epiusers.help/user_avatar/www.epiusers.help/joseph_martin/32/16359_2.png) [@Joseph\_Martin](https://www.epiusers.help/u/Joseph_Martin)\
**Post date:** [December 23, 2020, 7:16pm UTC](https://www.epiusers.help/t/api-help/73846/13 "2020-12-23T19:16:05Z")

</div>

At the end of the protocol mapping node in your web.config, there is 2 remove tags, one for http and one for https. What happens if you remove those? I checked a working web.config on one of my servers, and mine does not end the protocol mapping node with remove tags.

---

<div class="post-metadata">

**Author:** ![adlaws1](https://www.epiusers.help/letter_avatar_proxy/v4/letter/a/9e8a1a/32.png) [@adlaws1](https://www.epiusers.help/u/adlaws1)\
**Post date:** [December 28, 2020, 11:01am UTC](https://www.epiusers.help/t/api-help/73846/14 "2020-12-28T11:01:54Z")

</div>

Hi all  
removed the tags from my web config and replaced the code with  
if(Development)  
ServicePointManager.ServerCertificateValidationCallback += (o, c, ch, er) =\> true;

and still not working, any more ideas what this could be ???/

---

<div class="post-metadata">

**Author:** ![adlaws1](https://www.epiusers.help/letter_avatar_proxy/v4/letter/a/9e8a1a/32.png) [@adlaws1](https://www.epiusers.help/u/adlaws1)\
**Post date:** [December 28, 2020, 11:12am UTC](https://www.epiusers.help/t/api-help/73846/15 "2020-12-28T11:12:27Z")

</div>

![Capture22](https://www.epiusers.help/uploads/default/original/3X/4/6/461a4c4b6591767c3fdf4a04a6b8fb09e61cec79.png)

---

<div class="post-metadata">

**Author:** ![adlaws1](https://www.epiusers.help/letter_avatar_proxy/v4/letter/a/9e8a1a/32.png) [@adlaws1](https://www.epiusers.help/u/adlaws1)\
**Post date:** [December 28, 2020, 11:36am UTC](https://www.epiusers.help/t/api-help/73846/16 "2020-12-28T11:36:56Z")

</div>

![Capture22](https://www.epiusers.help/uploads/default/original/3X/9/8/98e1051d3a33b52371ba68a2ff88f61a979a0f3d.png)  
I have noticed the endpoints dont seem to be set in the admin console, could this be the issues

Andy

---

<div class="post-metadata">

**Author:** ![adlaws1](https://www.epiusers.help/letter_avatar_proxy/v4/letter/a/9e8a1a/32.png) [@adlaws1](https://www.epiusers.help/u/adlaws1)\
**Post date:** [December 28, 2020, 12:05pm UTC](https://www.epiusers.help/t/api-help/73846/17 "2020-12-28T12:05:32Z")

</div>

when i remove the following 2 tags

i get the following error  
Exception caught in: mscorlib  
Error Detail ============ Message:  
The requested service, ‘net.tcp://e10server3/EpicorERPTest/Ice/Lib/SessionMod.svc’ could not be activated. See the server’s diagnostic trace logs for more information. Program: CommonLanguageRuntimeLibrary Method:HandleReturnMessage  
Client Stack Trace

---

<div class="post-metadata">

**Author:** ![Joseph\_Martin](https://www.epiusers.help/user_avatar/www.epiusers.help/joseph_martin/32/16359_2.png) [@Joseph\_Martin](https://www.epiusers.help/u/Joseph_Martin)\
**Post date:** [December 28, 2020, 8:02pm UTC](https://www.epiusers.help/t/api-help/73846/18 "2020-12-28T20:02:35Z")

</div>

Looks like a cert issue then.

Get the subject name of your cert, and uncomment the node under serviceBehaviors / behaviors in your web.config .

You might also need to assign the cert to a binding in your IIS site. In IIS, make sure the site has a https binding and that the cert is assigned to that binding.

You might also need to set the cert

---

<div class="post-metadata">

**Author:** ![adlaws1](https://www.epiusers.help/letter_avatar_proxy/v4/letter/a/9e8a1a/32.png) [@adlaws1](https://www.epiusers.help/u/adlaws1)\
**Post date:** [December 29, 2020, 1:52pm UTC](https://www.epiusers.help/t/api-help/73846/19 "2020-12-29T13:52:18Z")

</div>

After days and days i still could not connect so just made a reference to the dlls direct as so  
static void TestUsingPartContract()  
{

```
        var wcfBinding = NetTcp.UsernameWindowsChannel();
        var appServer = new Uri("net.tcp://localhost/EpicorERPTest/ERP/BO/Part.svc");
        using (ChannelFactory<Erp.Contracts.PartSvcContract> cf = new ChannelFactory<Erp.Contracts.PartSvcContract> (wcfBinding))
        {
            cf.Credentials.UserName.UserName = "";
            cf.Credentials.UserName.Password = "";

            var partClient = cf.CreateChannel(new EndpointAddress(appServer));
            bool morePages;
            var myPartTableset = partClient.GetList("", 10, 1, out morePages);

            foreach (var partRec in myPartTableset.PartList)
            {
                MessageBox.Show(partRec.PartNum + " desc =" + partRec.PartDescription);
            }
            cf.Close();
        }
    }
```

---

<div class="post-metadata">

**Author:** ![Olga](https://www.epiusers.help/letter_avatar_proxy/v4/letter/o/57b2e6/32.png) [@Olga](https://www.epiusers.help/u/Olga)\
**Post date:** [December 29, 2020, 4:46pm UTC](https://www.epiusers.help/t/api-help/73846/20 "2020-12-29T16:46:51Z")

</div>

> [@adlaws1](#):
>
> Error Detail ============ Message:  
> The requested service, ‘net.tcp://e10server3/EpicorERPTest/Ice/Lib/SessionMod.svc’ could not be activated. See the server’s diagnostic trace logs for more information. Program:

If this is still the error you have, open event viewer on your server machine and look for exact error. Check application log and epicor app server log. What error is shown there?

[Next page](https://www.epiusers.help/t/api-help/73846.md?page=2)
