Question: I have a class that is called MyMethodQuery that contains a property of entry of my web method

```
[DataContract()]
public class MyMethodQuery
{
    [DataMember(IsRequired = true)]
    [StringLength(100, MinimumLength = 10)]
    public string Id{ get; set; }
}

```

My Web Method :

```
public string MyMethod(MyMethodQuery MyMethodQuery)
{
   return "it's ok !";
} 

```

I want to throw an exception if I leave the empty property. But it doesn't work in spite of the attribute `StringLength`.

I test my method with SoapUI.

Answer: 
Your request includes non-simple headers `Content-type` and `signature` which must be included in the response's `Access-Control-Allow-Headers` header.

(`Content-type` is sometimes a simple header, but only for particular values. `application/json` is not one of those values, and it causes `Content-type` to become non-simple.)

Add `Content-type` to `Access-Control-Allow-Headers` in your server's preflight response.

POSTMAN is not bound by the same-origin policy, so it does not require CORS support from the server.
Not sure if you already have the information you need. But in my local web-server - when I make an http request using postman here is what it adds to the header:

headers:
 { host: 'localhost',
 connection: 'keep-alive',
 pragma: 'no-cache',
 'cache-control': 'no-cache',
 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36',
 accept: '*/*',
 referer: '<http://localhost/>',
 'accept-encoding': 'gzip, deflate, sdch',
 'accept-language': 'en-US,en;q=0.8' },

And here is what I see in the rawHeaders:
 [ 'Host',
 'localhost',
 'Connection',
 'keep-alive',
 'Pragma',
 'no-cache',
 'Cache-Control',
 'no-cache',
 'User-Agent',
 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36',
 'Accept',
 '*/*',
 'Referer',
 '<http://localhost/>',
 'Accept-Encoding',
 'gzip, deflate, sdch',
 'Accept-Language',
 'en-US,en;q=0.8' ],

So perhaps you just need to fake your client to be a recognized browser client.