Click to See Complete Forum and Search --> : problem in Browsing .dat files


vcp_learner
January 31st, 2006, 05:24 PM
Hi Everyone,

I have a simple ASP.NET code that lists all the .txt and .dat files in a directory with links. On clicking one of the links, it simple opens the file through the browser.

For e.g., if we click on a file called sample.txt, it opens up the link http://hxxxxc61/hts/bisfiles/sample.txt, where the url is the exact path.

Now, I am able to display the .txt files without any problems. But when it is the .dat file, the link http://hxxxxc61/hts/bisfiles/sample.dat fails, with "page not found".

I ve verified the path and also the .dat files are not corrupt as I am able to open with wordpad and read.

I also tried to browse the .dat file, through IIS 6.0, and get the same error.

Any inputs in this regards? Thanks in advance.

HairyMonkeyMan
February 1st, 2006, 03:47 AM
You probably need to change your MIME settings to tell the server what to do with the file when it is requested.

Go into your IIS, right click on your website > properties. Click the HTTP headers tab, and you can access the MIME map at the bottom... Sorry if you already know this.

Regards ;)