Click here to Skip to main content
15,897,273 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
The relocating of our web site to a new server continues apace, and I've run into yet another frustration. I am generating a XML Formatted Data File (XFDF) which merges data provided by a web user with an Adobe document and serves up the result. This works just fine on the old site, but IIS 7 returns a 404 error on the new site. The file exists, and it is formatted properly: I can generate the file on the new site and it works fine when copied to the old, and I can generate the file on the old site where it gets served, copy it to the new and get the same error. I can copy the URL to the PDF and that works on both sites.

The problem seems to be that IIS is finding the file but not serving the request. I cannot see any place on the old system (IIS 6) that explicitly allows XFDF files to be delievered: there are no HTTP filters, no explicit declarations of MIME type, nothing.

Any suggestions on how I can get this fixed?
Posted

1 solution

IIS configuration
Server properties / HTTP Headers in web site properties
Mime Types

IIS only serves files with extensions registered in the Mime types list
So add an entry for XFDF files with a suitable mime type.

I've just checked my IISv6 installation and can't see an entry for XFDF files (make sure you check BOTH the server properties AND HTTP Header properties for individual web sites) - if there's no entry I'm slightly surprised if IIS serves the files - unless there's also an ISAPI filter that gets ASP.NET or something else to handle it and generate a response (might be worth checking!).
 
Share this answer
 
Comments
Gregory Gadow 2-May-11 16:45pm    
That was actually the first thing I checked: I have custom HTTP filters for delivering PDF and a few other document types. Neither the old nor the new servers have references for XFDF, and yet the old server delivers them up with nary a complaint. That's why I'm so frustrated.
NuttingCDEF 2-May-11 17:06pm    
Can you check what ISAPI extensions / filters were installed on the old site. Is there any chance that serving XFDFs relied on a ColdFusion ISAPI component (or any other similar from Adobe)?

A quick google also suggests that ColdFusion / ISAPI / IIS7 may not be plain sailing - see e.g. http://www.codecurry.com/2009/09/installing-coldfusion-on-iis-7.html - not sure where this takes you but it might be worth a look.
NuttingCDEF 2-May-11 17:10pm    
P.S. If all you want to do is get the XFDF served and don't need any other processing, you could still try adding a Mime type to handle it (application/vnd.adobe.xfdf ?) - doesn't explain why the older server works, but might be effective (if a tad quick and dirty)
Gregory Gadow 3-May-11 10:34am    
I'm not sure why, but manually adding the MIME type to the new site's root web.config did the trick; it is nowhere to be found on the old site. Many thanks.
NuttingCDEF 3-May-11 11:29am    
Glad you've got it solved!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900