I have a problem is a new VS installation but I want to get a list of 2 connected tables I use the entity and when debugging returns the values of the list monsrando the count but at the time of showing the service gives me the error, They have commented to me that it can be of configuration.
"Failed to receive HTTP response to link . This may be because the service end link does not use the HTTP protocol It may also be due to the server overriding an HTTP request context (possibly due to the closure of the service.) Check server logs for more information.
Server stack trace: in System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException (WebException webException, HttpWebRequest request, HttpAbortReason abortReason) in System.ServiceModel.Channels.HttpChannelFactory'1.HttpRequestChannel.HttpChannelRequest.WaitForReply (TimeSpan timeout) in System.ServiceModel.Channels.RequestChannel.Request (Message message, TimeSpan timeout) in System.ServiceModel.Dispatcher.RequestChannelBinder.Request (Message message, TimeSpan timeout) in System.ServiceModel.Channels.ServiceChannel.Call (String action, Boolean oneway, ProxyOperationRuntime operation, Object [] ins, Object [] outs, TimeSpan timeout) in System.ServiceModel.Channels.ServiceChannelProxy.InvokeService (IMethodCallMessage methodCall, ProxyOperationRuntime operation) in System.ServiceModel.Channels.ServiceChannelProxy.Invoke (IMessage message)
Exception rethrown at [0]: in System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage (IMessage reqMsg, IMessage retMsg) in System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke (MessageData & msgData, Int32 type) in IService1.list () in Service1Client.list ()
Inner Exception: The connection is terminated: Unexpected reception error. in System.Net.HttpWebRequest.GetResponse () in System.ServiceModel.Channels.HttpChannelFactory'1.HttpRequestChannel.HttpChannelRequest.WaitForReply (TimeSpan timeout)
Inner Exception: Unable to write data to the transport connection: The interruption of an existing connection by the remote host has been forced. in System.Net.Sockets.NetworkStream.Read (Byte [] buffer, Int32 offset, Int32 size) in System.Net.PooledStream.Read (Byte [] buffer, Int32 offset, Int32 size) in System.Net.Connection.SyncRead (HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead)
Inner Exception: The interruption of an existing connection has been forced by the remote host in System.Net.Sockets.Socket.Receive (Byte [] buffer, Int32 offset, Int32 size, SocketFlags socketFlags) in System.Net.Sockets.NetworkStream.Read (Byte [] buffer, Int32 offset, Int32 size) "
namespace servicioNew
{
// NOTA: puede usar el comando "Rename" del menú "Refactorizar" para cambiar el nombre de clase "Service1" en el código, en svc y en el archivo de configuración.
// NOTE: para iniciar el Cliente de prueba WCF para probar este servicio, seleccione Service1.svc o Service1.svc.cs en el Explorador de soluciones e inicie la depuración.
public class Service1 : IService1
{
frapuccinoEntities fe = new frapuccinoEntities();
public List<Alumno> list() {
List<Alumno> lista = (from q in fe.Alumno
select q).ToList();
return lista;
}
}
}
// THE INTERFACE IS THIS
[ServiceContract]
public interface IService1
{
[OperationContract]
List<Alumno> list();
}
In the model part the attributes have their [Datacontract]
and member but I do not understand the error.