Description
KML files copied to the ArcGIS Server KML directory cannot be accessed from the Web using URLs in the form of, http://myServer/arcgis/Kml/myFile.kml, where ‘myServer’ and ‘myFile' are unique to the ArcGIS Server Web Services' host and the KML file to be served respectively.
Cause
ArcGIS Server primarily serves only KMZ documents. As a result of this initial design, support for serving simple KML files was overlooked.
Workaround
To allow KML file access from the http://myServer/arcgis/Kml virtual directory to Web browsers, follow the steps outlined below.
- Open IIS Manager from Control Panel > Administrative Tools > Internet Information Services.
- Navigate to YourHost (local computer) > Web Sites > Default Web Site > ArcGIS > kml. Right-click on kml.
- Select Properties. Select the HTTP Headers tab and click on 'File Types'.
- Click the 'New Type...' button.
- In the File Type dialog box type '.kml' (without the quotation marks) in the 'Associated extension:' text box, and type 'application/vnd.google-earth.kml+xml' (without the quotation marks) in the 'Content type (MIME):' text box and click OK.
- Click OK in the 'File Types' dialog box. Click Apply in the 'kml' Properties dialog box.
KML files should now be accessible from Web browsers using URLs in the form of, http://myServer/arcgis/Kml/myFile.kml, where ‘myServer’ and ‘myFile' are unique to the ArcGIS Server Web Services' host and the KML file to be served respectively.