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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem opening a file in IE Browser

Status
Not open for further replies.

james0816

Programmer
Jan 9, 2003
295
US
Not sure why this is occuring but I am having an issue opening PDF files on my local intranet via a webpage I just created. I can access them if I use FILE:// but not HTTP://

Example:

FILE://<server>/<share>/test.pdf - I can open it this way
- Page cannot be displayed

I can open PDF files in my browser. I tested by going to other sites on the internet.

What could be causing this?

Thx
 
Is the web server providing the correct mime type information? Is it only your system or do others (using the same browser version) have the same problem?
 
i have tried from a couple other machines with the same results.
 
Then it sounds like a server problem. What web server are you getting these files from (apache, IIS, or something else)?
 
Then this iw where I'll bow out. You might look in forum41. It's very likely that IIS is not providing the correct mime-type info to the browser. If it were apache, I could help, but I don't know where to tell you to look in IIS.
 
feherke...the webserver is a separate machine. not where the files are stored. Only the web pages are located here (html and php). The files I am trying to access are physically located on a seperate server.

 
Exactly. A .pdf file is a standard thing for Hyper Text Transfer Protocol. Unless the server tells the browser what to do with it, the browser won't know.
 
Thas should say: "A .pdf file is [!]not[/!] a standard thing...
 
Also are you sure the web server is getting the file from the correct location? Feherke's question is probably a better place to start. If the file is not found (404 error), it won't matter what type it is. What do the server logs say?
 
yes...file is in correct location.

as stated above, I CAN access the file doing it this way:

FILE://<server>/<share>/test.pdf

I CANNOT access the file using this:

I have verified that I can open PDF files (and other files for that matter) from my browser by visited other websites and opening files from there.
 
As Feherke mentioned, the URL/path using the file:// reference is independant of the URL/path using the http:// reference. Put a simple text or html file in that same folder for testing. What is the actuall 3 digit error code returned by the web server? If you don't have access to the web server logs, turn off friendly error messages in your browser.
 
The web server logs are somewhere on the IIS web server; I don't know where they are stored, but I'm sure it's specified within the IIS configuration.
 
Also, are you sure the web server is even running? The only time that I see the 'can not display' error is when DNS resolves but the web site is down.
 
question...if my files are located on a different server, can i still use HTTP: to open them? Wondering if that may have something to do with it?

My web server runs on a different machine than that of where the files are stored.

so...to access the web app i use:

- this is my app

from within the app, I am trying to access the files located here:


just curious.
 
yes .. web site is up. I can access the application...sign on to it....pull up all the data....i just cannot open files using http:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top