Help needed with Web.config file

narrowgauge

92 year oldTrainz veteran
One of the problems with hosting Trainz content is that .CDP is not always recognized as a valid extension. I understand that with a Windows IIs 7.0 server, a web.config file can add the needed mime types. The following is the web.config file I am using which gives a server error. It was created in Context and exported as a .XML file.

Code:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
    
      <staticContent>
    <mimeMap fileExtension=".cdp" mimeType="application/compressed" />
    <mimeMap fileExtension=".txt" mimeType="text/plain" />
      </staticContent>

  </system.webServer>
</configuration>

I would be most grateful if someone can pick an error in the file or better still, send me a version that works. My host is Godaddy if that makes things a bit clearer.

Peter
 
If I understand correctly you would like to host .cdp files on a web server which does not recognize this file format? If so, why not just use WinZIP or WinRAR for the CDP and it gets another ending (.zip, .rar) which most if not all web servers will recognize. Another way of hosting. :wave:

Cheers

VinnyBarb
 
Thanks,Vinny. .EXE files work as well. Using .ZIP is one way out but it does make things for complex for some users. I will use it as a last resort.

Peter
 
Persistance is always pays off. It does work now I have added a space in front of the ?> on the first line. That was all it needed.

Peter
 
Back
Top