5

I am trying to host a .rdp file that will be publically available on the internet (without password, of course). IIS is not letting me use this file - I'm getting a 404 error saying it cannot find the file. It works fine if I change the file extension to .txt.

Any idea what I'm doing wrong?

user66827
  • 215
  • 2
  • 3
  • 9

2 Answers2

10

I recommend you try adding a .RDP MIME type to your website configuration in IIS

File name Extension: .rdp

MIME type: application/rdp

ChrisNZ
  • 606
  • 2
  • 9
  • 24
  • 2
    This is incorrect - "application/rdp" is **not registered** with the IANA: http://www.iana.org/assignments/media-types/media-types.xhtml - you should use `application/octet-stream` instead. – Dai May 22 '17 at 14:38
  • For those of you who host ASP.NET in the IIS site like me, where you have the HTTP Status 404 due to the lack of MIME mappigs: you can add the new MIME-type mapping via system.webServer/staticContent/mimeMap in web.config as well, as described here: https://stackoverflow.com/questions/18562580/possible-to-add-mime-type-to-web-config-without-possibly-breaking-the-site – pholpar Jul 03 '22 at 13:45
2

+1 with ChrisNZ's tip, and:

In case you run IIS 7.5:

  • Start the Internet Information Services (IIS)-Manager
  • Unfold [+]Servername and [+]Site and [+]Default Web Site and find the site you'd like to serve that file from and select that site
  • At the right pane, find the 'Request Filtering' icon in the IIS section and double-click it
  • Now you should see a list of file extensions and their allowance; by default all of them are set to 'false'
  • Right-click and select: 'Allow File Name Extension' -> Put .rdp in there.
desasteralex
  • 968
  • 4
  • 5
  • This would not be necessary in the default config, since .rdp is not filtered. But worth checking nonetheless. – the-wabbit Sep 03 '12 at 14:37