TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Deepak Pathak
NA
108
28.5k
Could not load 'Microsoft.Practices.EnterpriseLibrary.Common
Apr 14 2010 5:48 AM
Hi,
I have a DataContract class, on which I have defined 4 event handler methods as shown below:
//[OnSerializing] and [OnSerialized] marked method not getting called
DataContract class
[DataContract]
public
class
Customer
{
[DataMember]
public
int
customerID;
[DataMember]
public
string
customerName;
[DataMember]
public
long
phoneNumber;
[OnSerializing]
private
void
OnSerializing(StreamingContext context)
{
//This is not getting called.
}
[OnSerialized]
private
void
OnSerialized(StreamingContext context)
{
//This is not getting called.
}
[OnDeserializing]
private
void
OnDeserializing(StreamingContext context)
{
//I know this gets override by OnDeserialized method.
customerName =
"This is set again in OnDeserializing."
;
}
[OnDeserialized]
private
void
OnDeserialized(StreamingContext context)
{
//This is working fine.
customerName =
"This is set again in OnDeserialized."
;
}
}
Service class
public
class
Booking : IBooking
{
public
string
bookTicket(Customer cust)
{
return
String.Format(
"Dear {0}, your order has been received by us. "
+
"You will receive a confirmation SMS shortly on your phone no- {1}"
, cust.customerName, cust.phoneNumber);
}
}
Any ideas why the above 2 Serialization methods are not getting called when invoked through client.
Regards,
Deepak
Reply
Answers (
0
)
binding type basichttpbinding instance not found in config.
WCF Webservices and FaultContract - Client’s receiving SoapExc insted of FaultException