WCF - An error occurred while receiving the HTTP response to http://xxxxx/Service/

前端 未结 6 1729
隐瞒了意图╮
隐瞒了意图╮ 2020-12-18 02:27

I am making this call in my WCF service:

public User GetStudentRecord(string userName)
    {
        try
        {
            return new DashboardFacade().G         


        
6条回答
  •  粉色の甜心
    2020-12-18 03:08

    Found the root cause after a lot of swearing and thinking of how nice the weather is outside. I remove the virtual keyword from the UserDetails object that is inside the User object.

    Now it works!

    As far as why this caused an issue, my assumptions are serialization or DbContext issues, but I will have to look more into it, not sure.

    I'm going outside now.

    So for reference, if you wound up here and have no idea what is going on, among all the other things you should look at (size, timeout, etc):

    Check to see if your object has virtual keyword on it.
    

提交回复
热议问题