Absent Member.
Absent Member.
2512 views

EndpointNotFoundException was unhandled

Hello,

I downloaded and installed Visual COBOL for Visual Studio Personal Edition v2.2 0.  I have Visual Studio 2012 Pro Version 1.0.61030.00 Update 4.

I wanted to test the WCF program installed here: C:\Users\Public\Documents\Micro Focus\Visual COBOL\Samples\WCF\WEB WCF Service.

When I follow the instructions given in the Readme.xml and key in a number and hit enter, I get the following error:

The debugger highlights this line: Console.WriteLine(client.GetData(enter)); in the Program.cs file.

Does anybody know how to fix this error?

I'm an old COBOL programmer with 40 years of experience on WANG VS and HP3000 systems trying to learn something about the newer COBOL programming.

Any help would be gratefully appreciated.

Thanks,
Tony

0 Likes
4 Replies
Absent Member.
Absent Member.

0 Likes
Absent Member.
Absent Member.

System.ServiceModel.EndpointNotFoundException was unhandled

 HResult=-2146233087

 Message=There was no endpoint listening at localhost/Service.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

 Source=mscorlib

 StackTrace:

   Server stack trace:

      at System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream()

      at System.ServiceModel.Channels.HttpOutput.Send(TimeSpan timeout)

      at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.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.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)

      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 Client.WebWCFService.IService.GetData(Int32 thevalue)

      at Client.WebWCFService.ServiceClient.GetData(Int32 thevalue) in c:\Users\Tony\Documents\Visual Studio 2012\Projects\VisualCobol\WEBWCFService\Client\Service References\WebWCFService\Reference.cs:line 116

      at Client.Program.Main(String[] args) in c:\Users\Tony\Documents\Visual Studio 2012\Projects\VisualCobol\WEBWCFService\Client\Program.cs:line 27

      at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)

      at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)

      at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()

      at System.Threading.ThreadHelper.ThreadStart_Context(Object state)

      at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

      at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

      at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

      at System.Threading.ThreadHelper.ThreadStart()

 InnerException: System.Net.WebException

      HResult=-2146233079

      Message=Unable to connect to the remote server

      Source=System

      StackTrace:

           at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)

           at System.Net.HttpWebRequest.GetRequestStream()

           at System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream()

      InnerException: System.Net.Sockets.SocketException

           HResult=-2147467259

           Message=No connection could be made because the target machine actively refused it 127.0.0.1:61488

           Source=System

           ErrorCode=10061

           NativeErrorCode=10061

           StackTrace:

                at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)

                at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)

           InnerException:

0 Likes
Micro Focus Expert
Micro Focus Expert

Hi,

There appears to be a bug in the example in that the WCF service is set to use a dynamically assigned port number and the client is using a specific port number of 61488 which is specifed in the app.config file.

To fix this open up the properties page for the WebWCFService project and click on the Web tab.

Change the option from auto-assign port to specifc port and use port number 61488.

It should then run correctly.

Thanks

0 Likes
Absent Member.
Absent Member.

Thanks Chris.

That fixed the problem.

Tony

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.