私はEF4を使用する.net4アプリケーションを持っています.BasicHttpBindingを使用してWCFを介してモデルを公開します(ただし、これは変更できます)。このメソッドを呼び出そうとするたびに、Webサーバープロセスがメモリ内で成長し始め、プロセスが停止します.
問題は、エンティティをシリアル化しようとしている DataContractSeralizer (いくつかの関係がある) が再帰スタックに入るときです。それで、WCFを介してこのエンティティをサーバー化するために、何か特別な構成や欠けているものはありますか?
ここにいくつかの追加情報があります: 私の EF モデルのスクリーンショット: http://www.luisguerrero.net/stackoverflow/efmodel.jpg
public List<ExtendedSession> GetAllExtendedSessionByFilter(int id)
{
QueryDataAccess<ExtendedSession, NextWebEntities> query = new QueryDataAccess<ExtendedSession, NextWebEntities>("ExtendedSession");
List<ExtendedSession> result = query.GetAllByFilter(item => item.SessionId == id, "Rule");
return result;
}