C# 将webservice上载到服务器主机时无法调用它

C# 将webservice上载到服务器主机时无法调用它,c#,asp.net,.net,web-services,C#,Asp.net,.net,Web Services,请帮助我解决有关webservice的问题: 服务器无法处理请求。-->生成XML文档时出错。-->序列化WebserviceLicenseKey.License\u PaymentInfo类型的对象时检测到循环引用 当我将localhost与webservice一起使用时,这很好。但当我将其更新到服务器主机时,该主机无法获取数据并引发如上所述的错误 这是我在webservice中的代码,我使用了dbml **[WebMethod] [SoapDocumentMethod(Bin

请帮助我解决有关webservice的问题:

服务器无法处理请求。-->生成XML文档时出错。-->序列化WebserviceLicenseKey.License\u PaymentInfo类型的对象时检测到循环引用

当我将localhost与webservice一起使用时,这很好。但当我将其更新到服务器主机时,该主机无法获取数据并引发如上所述的错误

这是我在webservice中的代码,我使用了dbml

**[WebMethod]
        [SoapDocumentMethod(Binding = "LicenseKeyService")]
        [SoapHeader("UserAccount", Required = true)]
        public List<License_PriceDayInfo> GetAllPriceDayInfo()
        {
            if (!CheckUserAccount())
                return null;
            return _context.License_PriceDayInfos.ToList();
        }**
请帮助我


多谢各位

在数据契约中,您可能有某种类型的属性,该属性将属性返回到其父级。默认情况下,序列化程序无法处理此问题,因为这将导致无休止的序列化


要解决此问题,可以使用扁平数据协定而不是分层数据协定,这样就不会得到推荐的此类关系,或者在数据协定属性上使用。参见示例。

谢谢您的回复,但我无法解决这个问题。你可以通过链接看到我的webservice啊,我想我知道如何修复。因为webservice不在表之间传输引用。
  **_userCredentials.UserName = "abc";
                _userCredentials.Password = "123456";
                _licenseWs.UserCredentialsValue = _userCredentials;
               var a = _licenseWs.GetAllPaymentInfo().ToList();**