Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem in Browsing .dat files

Status
Not open for further replies.

vcplearner

Programmer
Sep 28, 2005
10
US
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 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 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? is it that it may be trying to download the file and hit upon some permisson problem?

Thanks in advance.
 
As far as I know, a .dat file is not a standard file type like a .txt or .doc or .xls. The problem is probably that the browser doesn't know what to do with that type of data and throws the error.

Jim
 
Hi Jb,

Thanks for the reply. You see my development and the staging environments have IIS 5.0 and 6.0 respectively.

In my development computer, I am able toview the .dat file, but not in the staging. Any suggestions?

Thanks.
 
Is the .dat file extension on your dev pc associated with a specific program?
 
Hi Jb,

I thank you again for having a look at my posting. No the .dat is NOT associated withany program...it is simply a document that has some text in it and is being opened in a browser.

It is currently workiing in production, which runs with IIS 4.0 and windows NT. In my machine running in XP and IIS 5.0, it prompts for download and on clicking open, it opens it.

But the staging, which runs in IIS 6.0, it gives an error.

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top