Is it possible to add response http headers in web.config?
<p>In my application I need to set a http response header. I'd like to do this in web.config. but I dont'know if this is possible and I can't find it on Google. </p>

<p>Hope you can help me out.</p>

<p><strong>Solution</strong>
Finally, after a long search I found the solution. Create a class with this code:</p>

<pre><code>public class myHTTPHeaderModule : IHttpModule
{

    #region IHttpModule Members

    public void Dispose()
    {

    }

    public void Init(HttpApplication context)
    {
        context.EndRequest += new EventHandler(context_EndRequest);
    }

    void context_EndRequest(object sender, EventArgs e)
    {
        HttpResponse response = HttpContext.Current.Response;

        response.AddHeader("Content-Language", "*");

    }

    #endregion
}
</code></pre>

<p>(Don't ask me why to use this event, but it works..)</p>

<p>Now add a line in web.config in the HttpModule section:</p>

<pre><code>    &lt;httpModules&gt;
        &lt;add type="namespace.myHTTPHeaderModule, assembly name" name="headers" /&gt;
        &lt;add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/&gt;
    &lt;/httpModules&gt;
</code></pre>

<p>And that's it!</p>
