c# - How to remove default header from WCF REST Outgoing Response? -


The following C # WCF based REST service gives me some unwanted headers, I'm not sure if I can remove them from the API.

Interface:

  [communication of service] Public interface Icantol system {[OperationContract] [WebGet] system. Io About the stream (); }  

implementation:

  public class ControlSystem: About IControlSystem {public System.IO.Stream () {New system. IOM MemoryStream (ASCIII encoding .Default.GetBytes ("Hello World"); It gives the following response from a raw socket connection: 

HTTP / 1.1 200 OK server: ASP.NET Development Server / 9.0.0.0 Date: Tue, 15 Jun 2010 13:12:51 GMT X-AspNet -Version: 2.0.50727 Cash-Control: Private Content-Type: Application / Octet-Stream Content-Length: 39 Connection: Close

Hello World

The question is, what server Is it possible to not report other than actual messages? Due to some small embedded device clients it is required in some calls which will try to connect to the server and I would like to reduce the amount of parsing.

Thanks, b.

What are you actually trying to remove the header?

The X-ASP-version header can be removed by running under IIS (and not on the asp.net dev server, which you will not use in any form). To remove other headers.

He said, not able to remove all HTTP stuff; This is the main protocol design and it is required if you do not want it, so, do not use HTTP at all and your needs (which are required to implement their own custom WCF transport channel, but this Definitely possible) switch to more suitable protocols.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -