Remove namespace in XML from ASP.NET Web API

Option 1 is to switch to using XmlSerializer in GlobalConfiguration:

config.Formatters.XmlFormatter.UseXmlSerializer = true;

Option 2 is to decorate your models with

[DataContract(Namespace="")]

(and if you do so, you’d need to decorate the members with [DataMember] attributes).

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)