Buda Gavril Buda Gavril - 1 year ago 163
C# Question

web api: get the request origin

I am testing a web api and I am setting the From header in the request with Postman, like this:
enter image description here

But in my controller, when I evaluate

, I'm getting a false result:

enter image description here

But when I am evaluating only the Request.Headers and I'm scrolling to the
, I see that U have a header with the key From.

enter image description here

So what's the point of the member
from the

Answer Source

It looks like the From header is standardized to an email address. Likely the .NET code is excluding it since it is not an email address.

Consider using a different header.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download