WCF service fails if users enter invalid data structures from a separate project

I have a wcf service in 1 project and an object model that contains all my objects in another project. I add a reference to the object model in the service project and can use the objects in my service unnecessarily.

When I publish this service, other users use it. They may enter incorrect data and schema, and the service is down.

I need a service that will be connected to the object model. If users do not adhere to the object schema, the service will automatically work.

I'm not sure, maybe I need to configure the configuration, perhaps in web.config?

What I don't understand is setting the property of the required object. If the user does not add this property to the object being passed to the service, why does the service not stop automatically?

[DataMember(IsRequired = true)]
        public string VendorName { get; set; }
+3
source share
1 answer

WCF Automatic Approaches

To automate WCF verification under a WSDL contract, you can use the MSDNWsdlExporter as the common one for this blog .

WCF Raw Approaches

WCF

, / WCF .

XML- WCF .

+2

All Articles