Questions tagged [wcf-serialization]

19 questions
16
votes
3 answers

Remove "d1p1" namespace prefix in DataContractSerializer XML output

I'm using DatacontractSerializer to serialize my domainModel into a xml file. I'm getting output like below.
16
votes
2 answers

Newtonsoft.Json causing serialization to happen twice causing duplicate definition in the Reference.cs

I have a project Common that has a service reference. After adding a reference to Newtonsoft.json(Version 6.0.2 to the same project(Common) which has service reference, and a Serializable class ChatLine [Serializable] public class ChatLine { …
Sameer
  • 3,124
  • 5
  • 30
  • 57
10
votes
2 answers

How to trace WCF serialization issues / exceptions

I occasionally run into the problem that an application exception is thrown during the WCF-serialization (after returning a DataContract from my OperationContract). The only (and less meaningfull) message I get…
Fabiano
  • 5,124
  • 6
  • 42
  • 69
5
votes
2 answers

WCF Serialization Exception - NetDataContractSerializer

I am getting an error while trying to send an collection of data over to our service. If however I add only a single item to the collection then it works fines. As soon as I add more then one item I get the following error The use of type…
Amitesh
  • 677
  • 1
  • 10
  • 24
3
votes
1 answer

WCF, Streaming, Message Contract Error: Error in deserializing body of request message

I have developed a bit of a complicated WCF Service method. I would like to use the Streaming transfer mode, and because I have more than one parameter, I have defined a MessageContract with a body and a header. [MessageContract] public class…
essedbl
  • 520
  • 1
  • 7
  • 19
3
votes
2 answers

Problems with the WCF Datacontract serialization of circular reference in Entity Framework

I am using Entity Framework 4, having the circular reference among some of entities, but I am getting stackoverflow exception, this is the scenario when lazy loading is enabled... Then I have made lazy loading enabled as false and include all the…
Manish Pandey
  • 175
  • 2
  • 13
1
vote
1 answer

MVCContrib CustomPagination WCF Serialization

All the parameters for CustomPagination (datasource, page number, page size, and total items count) I retrieve in the WCF Service. It would be awesome if I could instantiate CustomPagination right there, in WCF and pass it back to my…
1
vote
1 answer

Is it possible to define the usage of bits in the DataContract of a WCF service?

I have a C++ program with a typical mode int that uses a bitmask. This bitmask is defined in an enum like this: enum EModeEntryPoint { // Mode entryPointNone =0x00, entryPointNormal =0x01, …
xMRi
  • 14,982
  • 3
  • 26
  • 59
1
vote
0 answers

How can i Replace the SoapFormatter Serialize and Deserialize with .net core 2.0?

I am working on migrating an old wcf project to .net core 2.0. At some places the code uses SoapFormatter class to serialize and deserialize data in Soap format.The Soap Formatter is no more supported in .net core 2.0 so i need to replace the piece…
Dinesh
  • 41
  • 5
1
vote
2 answers

Best approach to exposing data from domain models thru WCF services

I have a large collection of domain models in a core library which also contains methods for getting various sets of models. Multiple WCF service projects reference this library and publish the sets e.g. GetProducts(int categoryId) My initial…
1
vote
2 answers

WCF Service throw : An error occurred while receiving the HTTP response

I have WCF service and I host it in my local Server (local machine) it work's fine but when I host it in server (internet) at that time it throws below error An error occurred while receiving the HTTP response to…
Darshan Faldu
  • 1,471
  • 2
  • 15
  • 32
1
vote
0 answers

Use 'pre-serialises' object as WCF OperationContract method parameter

I'm building a shared state application in which a WCF server application aggregates data from disparate sources into a single data model, which it then synchronises with clients. It provides each client with an initial snapshot of the model, then…
1
vote
1 answer

Configure WCF to deserialize arrays as collections without svcutil

I have a net.tcp WCF service and its client, each in one assembly and sharing another assembly containing the service interface and DTOs. The client is implemented as a proxy to the service using a Channel instantiated through ChannelFactory: public…
jnovo
  • 5,659
  • 2
  • 38
  • 56
1
vote
2 answers

How to define string arrays in Data Contract?

I have a string array in datacontract as below [DataMember(Name = "photos", IsRequired = true, Order = 3)] public string[] photos { get; set; } In WCF REST Service call I am passing below xml input for this string array
Naga
  • 2,368
  • 3
  • 23
  • 33
1
vote
1 answer

Keep a WCF transferred object deflated / serialized

Possible Duplicate: Get Just the Body of a WCf Message Good Morning, I have a WCF service that build a complex object then sends it to the consuming client. Currently the service works great but the xml is reinflated / deserialized on the client…
GPGVM
  • 5,515
  • 10
  • 56
  • 97
1
2