0
안녕하세요. 내 wcf 서비스에 문제가 있습니다. 타입 객체의리스트를 돌려주는 메소드를 호출하려고하고 있습니다. 나는 또한 엔티티 프레임 워크를 사용하고있다.메서드를 호출 할 때 WCF 서비스가 중지되지만 메서드가 작동 중입니다.
public IList<Product> GetAllProducts()
{
using (var db = new AuctionContext())
{
return db.Products.ToList();
}
}
</service>
<service name="AuctionSystem.WcfService.ProductService">
<endpoint address="" binding="wsDualHttpBinding" contract="AuctionSystem.WcfService.Contracts.IProductService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:9993/Design_Time_Addresses/AuctionSystem.WcfService/ProductService/" />
</baseAddresses>
</host>
</service>
그리고 계약 :
[OperationContract]
IList<Product> GetAllProducts();
자체가 작동 방법,하지만 난 그게 "호출 서비스"에 붙어있어 내 WCF 서비스의 UI에이 메소드를 호출 할 때 나는 wsdualhttpbinding을 사용하고 있습니다.
어떤 아이디어로주세요?
편집 : Product 개체에 가상 목록이 있음을 깨달았습니다. wcf가 중단되는 이유는 무엇입니까?