Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to set the MIME type for Flash's cross domain file in web.config. Since this file has an extension of .XML the following command will edit the MIME type of all XML documents in my site (not wanted)

      <mimeMap fileExtension="xml" mimeType="text/x-cross-domain-policy"/>

How do I make this only affect the one file, crossdomain.xml

share|improve this question
up vote 0 down vote accepted

In the web.config file at that location, something like:

<location path="crossdomain.xml">
            <clear />
            <mimeMap fileExtension=".xml" mimeType="text/x-cross-domain-policy" />

Would be my guess.

(Tales From Behind The Curtain) That's a slight variation on what the UI does, which is worth explaining because it's not easily discoverable - to edit a setting for a particular file but not the folder, you can go to the Content view tab in that folder, then pick the file you're interested in, right-click it and choose Features View. That targets just that file (as can be confirmed in the pane at the left, and in the status bar when you're editing a feature).

It Removed and Add -ed the type, but I find that fragile, so I put a Clear in there instead.

share|improve this answer
Thanks. I'm seeing security guidance that says this in combination with a crossdomain.xml file will prevent XSS from user uploads & Flash – LamonteCristo Mar 5 '12 at 14:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.