NO MORE CAREER
POLITICIANS!
Get Out Of Our House: Replacing congress with TRUE citizens!
Contact Doug!
Learn About Doug!
View Doug Boude's online resume
updated 11/18/2009

View Doug Boude's profile on LinkedIn
Link to me!

Follow Doug Boude on Twitter
Follow me!

Be Doug's friend on Facebook
Befriend me!
(I promise not to follow you home)
OO Lexicon
Chat with Doug!
Recent Entries
You may also be interested in...
Web Hosting

best web hosting - top web hosting sites, thetop10bestwebhosting.com

Czech your Page Rank!
Check Page Rank of any web site pages instantly:
This free page rank checking tool is powered by Page Rank Checker service
Surf's Up!
Visit Egosurf.org and massage YOUR web ego!
My Score: 9,001
Doug's Books

Read (and recommend)

  • Men are from Mars, Women are from Venus
  • The Wisdom of Crowds: Why the Many Are Smarter Than the Few and How Collective Wisdom Shapes Business, Economies, Societies and Nations
  • Blink: The Power of Thinking Without Thinking
  • Head First Design Patterns
  • Transact-SQL Programming
  • What's So Amazing About Grace?
  • Just So Stories (Rudyard Kipling collection)

Reading

  • Prayer: Does it Make Any Difference?
  • Data Mining (Practical Machine Learning Tools and Techniques)
<< December, 2008 >>
SMTWTFS
123456
78910111213
14151617181920
21222324252627
28293031
Search Blog

Recent Comments
Re: Railo 3.1 on Windows Server 2008 and IIS7 - Part 3 of 3 (by Jon at 8/27 2:04 PM)
Re: Hosts File Changes Not Acknowledged on Vista 64 (by Spacy at 8/24 3:46 PM)
Re: THE DAY CFUNITED DIED (by ComboFusion at 8/23 10:50 AM)
Re: My Grandpa (by Tasha at 8/10 4:29 PM)
Re: Just What IS a 'Service Layer', Anyway? (by dougboude at 8/02 10:10 AM)
Re: Just What IS a 'Service Layer', Anyway? (by Isaac at 8/02 2:25 AM)
Re: PayPal IPN Coldfusion CFC (by Soyestudiambre at 7/25 6:12 PM)
Re: PHP vs COLDFUSION (by Tony Garcia at 7/17 11:24 AM)
Re: PHP vs COLDFUSION (by dougboude at 7/14 8:45 AM)
Re: PHP vs COLDFUSION (by Lola LB at 7/14 5:51 AM)
Categories
Archives
Photo Albums
Funnies (5)
Family (3)
RSS

Powered by
BlogCFM v1.11

05 October 2009
Weird 404 Error on IIS7 When Accessing Flat File

We recently migrated a site from a freeBSD environment to a Windows environment. This morning accounting shared an error with me they were receiving when trying to access a system generated flat file. Typically, they select a few options and click a button, and are then presented with a page that contains a link to the generated flat file. Their process is to then right click the link and perform a "save target as" action. Now, however, right clicking the link and choosing 'save target as' produced a 404 error.

 I first suspected that perhaps there was an issue with pathing since obviously 404 indicates a file not found. Going in the back door, though, there the file sat in all its glory, and with all the content it should have had.

Turns out that the real issue was the fact that IIS7 did not have a clue as to the mime type of the file generated. The previous developer had been quite fond of using the ".dat" extension when generating flat files, and, although the code was creating the file just fine, when attempting to navigate to it for a "save target as" action IIS7 didn't have a clue what to do with it. I would have thought IIS might have defaulted to a mime type of text, but instead it just pretended the file didn't exist.

The solution: add ".dat" to the list of mime types for that particular site, with a type of "text/plain".




Posted by dougboude at 10:16 AM | PRINT THIS POST! |Link | 1 comment
Subscription Options

You are not logged in, so your subscription status for this entry is unknown. You can login or register here.

Re: Weird 404 Error on IIS7 When Accessing Flat File
You might want to do a server-wide search for "*.dat", and check that there aren't any sensitive .dat instances in a location other than what you intend. There might be something you don't necessarily want returned as text to whomever guesses the winning URL.
Posted by Alan McCollough on October 5, 2009 at 2:13 PM

Name:   Required
Email:   Required your email address will not be publicly displayed.

Want to receive notifications when new comments are added? Login/Register for an account.

Time to take the Turing Test!!!

15 plus 18 equals
Type in the answer to the question you see above:

Your comment:

Sorry, no HTML allowed!