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...
Florida web site design



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)
<< May, 2008 >>
SMTWTFS
123
45678910
11121314151617
18192021222324
25262728293031
Search Blog

Recent Comments
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!!!

3 plus 5 equals
Type in the answer to the question you see above:

Your comment:

Sorry, no HTML allowed!