How do I solve this error, “error while trying to deserialize parameter”

后端 未结 8 1816
轻奢々
轻奢々 2020-12-09 02:50

I have a web service that is working fine in one environment but not in another.

The web service gets document meta data from SharePoint, it running on a server wher

相关标签:
8条回答
  • 2020-12-09 03:22

    In our case the problem was that we change the default root namespace name.

    Project Configuration screen

    This is the Project Configuration screen

    We finally decided to back to the original name and the problem was solved.

    The problem actually was the dots in the Root namespace. With two dots (Name.Child.Child) it doesnt work. But with one (Name.ChidChild) works.

    0 讨论(0)
  • 2020-12-09 03:26

    Make sure that the table you are returning has a schema. If not, then create a default schema (i.e. add a column in that table).

    0 讨论(0)
  • 2020-12-09 03:31

    Do you have this namespace setup? You will have to ensure that this namespace matches the message namespace. If you can update your question with the xml input and possibly your data object that would be helpful.

    [DataContract(Namespace = "http://CompanyName.com.au/ProjectName")]
    public class CustomFields
    {
      // ...
    }
    
    0 讨论(0)
  • 2020-12-09 03:33

    This is happening because the web-service relies on using XmlSerializer to convert the wsdl among other things to XML, which doesn't support mixed-mode properties, like these:

    public string strThing { get; private set; }
    

    See: http://msdn.microsoft.com/en-us/library/ms978420.aspx

    More information: http://www.geekscrapbook.com/2010/03/06/serializing-data-with-system-runtime-serialization-datacontractserializer/

    0 讨论(0)
  • 2020-12-09 03:33

    I found the actual solution...There is a problem in invoking your service from the client.. check the following things.

    1. Make sure all [datacontract], [datamember] attribute are placed properly i.e. make sure WCF is error free

    2. The WCF client, either web.config or any window app config, make sure config entries are properly pointing to the right ones.. binding info, url of the service..etc..etc

    Then above problem : tempuri issue is resolved.. it has nothing to do with namespace.. though you are sure you lived with default,

    Hope it saves your number of hours!

    0 讨论(0)
  • 2020-12-09 03:35

    In my case; my WCF service function was using List<byte> Types parameter and i was getting this exception in the client side. Then i changed it to byte[] Types, updated service reference and problem is solved.

    0 讨论(0)
提交回复
热议问题