entity framework - An existing connection was forcibly closed by the remote host. in WCF using database first approach -


I want to display data in a table format by combining two table 'user' and 'company' with foreign key I am trying to relate

Public Carrier Index ()

  var Model = New UserModel ();  

Model.Users = db.Users .OrderBy (o => o. crated bye). Include (C = & gt; C. Companie) .Oolist (); See Return (Model);

  Try ({Production Candidates DB = New Production Entity} {db.configuration.LazyLoadingEnabled = False; Db.configuration.ProxyCreationEnabled = false; IQueryable & LT; Users & gt; _users = db.Users. Orderby (o => O. Crated By). Include (C => C. Companie); Return _Users .Olist (); }} Hold (exception before) {exception data exception data = new exception data (); ExceptionData.ErrorMessage = "Error in GetUsersList"; ExceptionData.ErrorDetails = ex.ToString (); New fault mode & lt; ExceptionData & gt; (ExceptionData, ex.Message); }}   

down stack trace Inner exception:

  InnerException: System.Net.WebException HRESULT = -214623307 9 message was closed = underlying connection receipt on System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply (Taimspen timeout on an unexpected error source = system stacktrace: System.Net.HttpWebRequest.GetResponse ()) InnerException: System.IO. IOException HResult = -2146232800 Message = Unable to read data from the transport connection: An existing connection by remote connection But was discontinued. Source = System StackTrace: on SystemkNetkSocketskNetworkStreamkRead (byte [] buffer, Int32 offset, Int32 size) [(byte System.Net.PooledStream.Read] buffer, Int32 offset, Int32 size) on the system. Net.Connection.SyncRead (HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead) InnerException: System.Net.Sockets.SocketException HRESULT = -2147467259 Message = An existing connection was stopped by force remote host source = System Error = 10054 NativeErrorCode = 10054 StackTrace: on System.Net.Sockets.Socket.Receive (byte [] buffer, Int32 offset, Int32 size, socketFlags socketFlags) (byte SystemkNetkSocketskNetworkStreamkRead [] buffer, Int32 offset, Int32 size)   

Any ideas ??? Thanks,

This is due to circular references.

this link to

We also have to install

  ProductionEntities db = new ProductionEntities () db.Configuration.LazyLoadingEnabled = False is needed; Db.configuration.ProxyCreationEnabled = false;    

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -