This weird Error was appearing from one day before posting this post. Previously it was working fine, but not now.
At one movement restarting the system, the error disappears and able to access the application.
and after again rebooting the system the error begins to appear without knowing the root cause.
Enabled Protocols: `net.tcp,http`
I could able to browse the below link
- http://localhost/TNA/TAServices/AuthenticationManager.svc
- http://username.domainname.com/TAServices/AuthenticationManager.svc?wsdl
- http://username.domainname.com/TAServices/AuthenticationManager.svc?singleWsdl
Here is the below snippet which causes an exception
- objCheckUserLoginResponse = AuthenticationManagerClient.Check(objCheckUserLoginRequest, objCustomer);
Exception:
The message could not be dispatched because the service at the endpoint address 'net.tcp://localhost/TAServices/AuthenticationManager.svc' is unavailable for the protocol of the address.
System.ServiceModel.EndpointNotFoundException: The message could not be dispatched because the service at the endpoint address 'net.tcp://localhost/TNA/TAServices/AuthenticationManager.svc' is unavailable for the protocol of the address.
Server stack trace:
at System.ServiceModel.Channels.ConnectionUpgradeHelper.DecodeFramingFault(ClientFramingDecoder decoder, IConnection connection, Uri via, String contentType, TimeoutHelper& timeoutHelper)
at System.ServiceModel.Channels.StreamedFramingRequestChannel.SendPreamble(IConnection connection, TimeoutHelper& timeoutHelper, ClientFramingDecoder decoder, SecurityMessageProperty& remoteSecurity)
at System.ServiceModel.Channels.StreamedFramingRequestChannel.StreamedConnectionPoolHelper.AcceptPooledConnection(IConnection connection, TimeoutHelper& timeoutHelper)
at System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
at System.ServiceModel.Channels.StreamedFramingRequestChannel.StreamedFramingRequest.SendRequest(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at TA.ServiceProxy.AuthenticationManager.IAuthenticationManager.Check(CheckUserLoginRequest1 request)
at TA.ServiceProxy.AuthenticationManager.AuthenticationManagerClient.TA.ServiceProxy.AuthenticationManager.IAuthenticationManager.Check(CheckUserLoginRequest1 request) in D:\2017_TFS\TestandAssessment\Dev\Manifest\TestPrepAdmin\ServiceProxy\Service References\AuthenticationManager\Reference.cs:line 3370
at TA.ServiceProxy.AuthenticationManager.AuthenticationManagerClient.Check(CheckUserLoginRequest Request, Customer Customer) in D:\2017_TFS\TestandAssessment\Dev\Manifest\TestPrepAdmin\ServiceProxy\Service References\AuthenticationManager\Reference.cs:line 3377
at TA.UIFrameWork.AuthenticationManagement.AuthenticateUser(CheckUserLoginRequest objCheckUserLoginRequest) in D:\2017_TFS\TestandAssessment\Dev\Manifest\TestPrepAdmin\UIFrameWork\Authentication\AuthenticationManagement.cs:line 19
T: 2020-05-09 12:19:52,242 |L: INFO |TH: 8 |L: Utilities.PageBase |MSG:
SessionID: Method: LoadLanguages
Info: Page: Login.aspx Method: LoadLanguages Enters
AuthenticationManagement.cs
- using TA.ServiceProxy.AuthenticationManager;
- using System;
- namespace TA.UIFrameWork
- {
- public class AuthenticationManagement
- {
- public CheckUserLoginResponse AuthenticateUser(CheckUserLoginRequest objCheckUserLoginRequest)
- {
- Customer objCustomer;
- CheckUserLoginResponse objCheckUserLoginResponse = null;
- try
- {
- objCustomer = new Customer();
- objCustomer.CustomerName = "ABC";
- objCustomer.CultureInfo = "English";
- AuthenticationManagerClient AuthenticationManagerClient = new AuthenticationManagerClient();
- AuthenticationManagerClient.Open();
- objCheckUserLoginResponse = AuthenticationManagerClient.Check(objCheckUserLoginRequest, objCustomer);
- AuthenticationManagerClient.Close();
- AuthenticationManagerClient = null;
- objCustomer = null;
- objCheckUserLoginRequest = null;
- }
- catch (Exception ex)
- {
- LoggingFramework.log.Error(ex.Message, ex);
- }
- return objCheckUserLoginResponse;
- }
- }
- }
- }
web.config
- "1.0"?>
"dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data" />"log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />"dns" type="System.Configuration.NameValueFileSectionHandler" />"LocalSqlServer" />"dns.config" />"AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="LocalSqlServer" applicationName="/MVCFramework" />"true" defaultProvider="TableProfileProvider">"TableProfileProvider" type="Microsoft.Samples.SqlTableProfileProvider" connectionStringName="LocalSqlServer" table="aspnet_Profile" applicationName="/MVCFramework" />"false" enableEventValidation="false" enableViewStateMac="false" maintainScrollPositionOnPostBack="false" controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">namespace ="AjaxControlToolkit" assembly="AjaxControlToolkit" tagPrefix="ajaxToolkit" />"Off" >"403" redirect="Status.aspx" />"404" redirect="Status.aspx" />"true" >"false" localOnly="true">"2097151" executionTimeout="220000" requestValidationMode="2.0" />"true" defaultLanguage="c#" targetFramework="4.0">".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />"InProc" timeout="6000" cookieless="UseCookies">"?" />"Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false" />"ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false" />"false" />"1024000000" >"false" />"ChartImageHandler" />"ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD,POST" path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />"QueryStringValidation" type="Presentation.Utilities.QueryStringValidation" />"MySql.Data.MySqlClient" />"MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.3.7.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />"BasicHttpBinding_Framework" closeTimeout="00:50:00" openTimeout="00:50:00" receiveTimeout="00:50:00" sendTimeout="00:50:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="999999999" maxBufferPoolSize="524288" maxReceivedMessageSize="999999999" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">"32" maxStringContentLength="999999999" maxArrayLength="999999999" maxBytesPerRead="4096" maxNameTableCharCount="16384" />"None" />"NetTcpBinding_Framework" closeTimeout="00:50:00" openTimeout="00:50:00" receiveTimeout="00:50:00" sendTimeout="00:51:00" transactionFlow="false" transferMode="Streamed" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" listenBacklog="10" maxBufferPoolSize="999999999" maxBufferSize="999999999" maxConnections="10" maxReceivedMessageSize="999999999">"32" maxStringContentLength="999999999" maxArrayLength="999999999" maxBytesPerRead="4096" maxNameTableCharCount="16384" />"true" inactivityTimeout="00:50:00" enabled="false" />"None" >"Windows" protectionLevel="EncryptAndSign" />"Windows" />"net.tcp://localhost/TNA/TAServices/AccountManager.svc" binding="netTcpBinding" bindingConfiguration="NetTcpBinding_Framework" contract="AccountManager.IAccountManager" name="NetTcpBinding_Framework" />"ClientBehavior" >"10000000" />"Common" >"?" />"5000000" />
Without knowing the cause I was not able to do anything.
Please suggest in resolving `EndpointNotFoundException` issue wrt to code or from windows 10 (1903)
Sandhiya PriyaPosted Jan 2, 2026, 11:12 AM
This
EndpointNotFoundExceptionis caused by a WCF net.tcp hosting issue in IIS, not by your application code. The HTTP service works, but the net.tcp protocol is not always active.After restarting the system, required Windows services (especially Net.Tcp Port Sharing Service and Windows Process Activation Service) start correctly, so the service works. Later, IIS or Windows stops/recycles these services, and the net.tcp endpoint becomes unavailable.
To fix the issue:
Ensure Net.Tcp Port Sharing Service is running and set to Automatic
Enable
http,net.tcpin IIS (server and site level)Verify net.tcp binding exists for the site
Make sure the service URL path (
/TNA) is consistent everywhereSet the IIS Application Pool to AlwaysRunning
Once IIS net.tcp is properly configured, the error will stop occurring.