endpoints

WCF Self Host Service - Endpoints in C#

给你一囗甜甜゛ 提交于 2019-11-29 07:05:46
My first few attempts at creating a self hosted service. Trying to make something up which will accept a query string and return some text but have have a few issues: All the documentation talks about endpoints being created automatically for each base address if they are not found in a config file. This doesn't seem to be the case for me, I get the "Service has zero application endpoints..." exception. Manually specifying a base endpoint as below seems to resolve this: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.ServiceModel; using System

WCF Self Host Service - Endpoints in C#

巧了我就是萌 提交于 2019-11-28 00:29:58
问题 My first few attempts at creating a self hosted service. Trying to make something up which will accept a query string and return some text but have have a few issues: All the documentation talks about endpoints being created automatically for each base address if they are not found in a config file. This doesn't seem to be the case for me, I get the "Service has zero application endpoints..." exception. Manually specifying a base endpoint as below seems to resolve this: using System; using

Create WCF endpoint configurations in the client app, in code?

人盡茶涼 提交于 2019-11-27 20:40:53
I am trying to consume a WCF web service from a .NET client application, and I think I need to be able to programmatically create endpoints, but I don't know how. I think I need to do this because, when I try to run the application, I am getting the following error: Could not find default endpoint element that references contract 'IEmailService' 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. While troubleshooting this error,

Getting the IP Address of a Remote Socket Endpoint

放肆的年华 提交于 2019-11-27 13:27:12
How do I determine the remote IP Address of a connected socket? I have a RemoteEndPoint object I can access and well as its AddressFamily member. How do I utilize these to find the ip address? Thanks! Currently trying IPAddress.Parse( testSocket.Address.Address.ToString() ).ToString(); and getting 1.0.0.127 instead of 127.0.0.1 for localhost end points. Is this normal? http://msdn.microsoft.com/en-us/library/system.net.sockets.socket.remoteendpoint.aspx You can then call the IPEndPoint..::.Address method to retrieve the remote IPAddress, and the IPEndPoint..::.Port method to retrieve the

Getting the IP Address of a Remote Socket Endpoint

与世无争的帅哥 提交于 2019-11-26 22:22:59
问题 How do I determine the remote IP Address of a connected socket? I have a RemoteEndPoint object I can access and well as its AddressFamily member. How do I utilize these to find the ip address? Thanks! Currently trying IPAddress.Parse( testSocket.Address.Address.ToString() ).ToString(); and getting 1.0.0.127 instead of 127.0.0.1 for localhost end points. Is this normal? 回答1: http://msdn.microsoft.com/en-us/library/system.net.sockets.socket.remoteendpoint.aspx You can then call the IPEndPoint..