Click here to Skip to main content
15,918,742 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi,,

I am new to WCF. I am accessing data from database using Entity framework.

Whilw Accessing i m getting error. Please help me
Posted
Comments
Kenneth Haugland 18-Jul-12 6:18am    
Yes, but what does it say? And the code you are using?
jagadeesh123qqq 18-Jul-12 6:25am    
I returning from server but while bindind to client. It's showing this error

1 solution

You'll find an article here at codeproject covering the exact exception:
The underlying connection was closed: The connection closed unexpectedly in EF 4.0[^]
 
Share this answer
 
Comments
jagadeesh123qqq 18-Jul-12 6:24am    
Thanks for your reply .
I put following code in Entity class.

en.ContextOptions.LazyLoadingEnabled = false;

still i am getting this error.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900