I have a couple of web applications deployed in an IIS Server (IIS 7.5 in W2k8 R2). In order to remove some HTTP Response Headers, I created a module (C# .dll), copied this .dll to each bin folder of each web application, and reference this module in the web.config of each one like below:
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules>
<add name="MyModule" type="MyNamespace.MyClass" />
</modules>
</system.webServer>
From that point on, when I check the Module section of the web application in IIS, the reference is there and it works fine (the headers are not in the HTTP response).
PS.: I was not successful in using the GAC, anyways...
Here is what happens:
- when I connect to https://example.com/myapp the header is not present in the response, as expected.
- when I connect to https://example.com the header is present, as I didn´t want, but that is expected because I didn´t touch the Default Web Site at this point. Also, this Default Web Site is just an HTML redirection to one of the webapps.
The problem is, when it comes to the Default Web Site, I can´t find its web.config, nor do I find the place where I drop the .dll. Can anyone help?