TIFF file does not open

G

Guest

I have a web page and there is a link to open a TIFF file. The way I do it is
to have the server code open a binary stream, set the content type to
"image/tiff" and call Response.BinaryWrite. On the client machine, the file
type TIFF is associated with Kodak Imaging Preview. This app works on most
client machines. When you click on the link, Kodak Imaging Preview will open
the TIFF file on the client machine. However, on some machines, the file
doesn't open. Is there some browser setting that needs to be done for this to
work?

The following C# code is used:

BinaryReader binReader =
new BinaryReader(File.Open(docPath,
FileMode.Open,FileAccess.Read));
byte[] binFile =

binReader.ReadBytes(Convert.ToInt32(binReader.BaseStream.Length));

int size = binFile.Length;
size = Convert.ToInt32(binReader.BaseStream.Length);

Response.ContentType = "image/tiff";
Response.BinaryWrite(binFile);
binReader.Close();
 
P

Peter Rilling

Are you sure the default app is set correctly for all machines? What
happens if you have a TIFF on the desktop and you double-click it?
 
K

Kevin Spencer

The application that opens a given image file format is determined by what
applications are installed on the machine, and by the configuration of the
machine. Windows does not come with a TIFF file viewer. If software is
installed on the machine that can open and view TIFFs, and it is configured
as the default viewer for the image type, it will open. I would suspect that
no application exists on those machines that cannot open it.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Who is Mighty Abbott?
A twin turret scalawag.
 
G

Guest

I have checked the client machines and they have Kodak Imaging Preview
installed and TIF/TIFF file type is associated with Kodak Imaging Preview. I
can start Kodak Imaging Preview and open a TIFF file from there. I suspect
there is some other setttings that need to be changed.

Kevin Spencer said:
The application that opens a given image file format is determined by what
applications are installed on the machine, and by the configuration of the
machine. Windows does not come with a TIFF file viewer. If software is
installed on the machine that can open and view TIFFs, and it is configured
as the default viewer for the image type, it will open. I would suspect that
no application exists on those machines that cannot open it.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Who is Mighty Abbott?
A twin turret scalawag.

qysbc said:
I have a web page and there is a link to open a TIFF file. The way I do it
is
to have the server code open a binary stream, set the content type to
"image/tiff" and call Response.BinaryWrite. On the client machine, the
file
type TIFF is associated with Kodak Imaging Preview. This app works on most
client machines. When you click on the link, Kodak Imaging Preview will
open
the TIFF file on the client machine. However, on some machines, the file
doesn't open. Is there some browser setting that needs to be done for this
to
work?

The following C# code is used:

BinaryReader binReader =
new BinaryReader(File.Open(docPath,
FileMode.Open,FileAccess.Read));
byte[] binFile =

binReader.ReadBytes(Convert.ToInt32(binReader.BaseStream.Length));

int size = binFile.Length;
size = Convert.ToInt32(binReader.BaseStream.Length);

Response.ContentType = "image/tiff";
Response.BinaryWrite(binFile);
binReader.Close();
 
K

Kevin Spencer

What exactly is happening on these clients?

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Who is Mighty Abbott?
A twin turret scalawag.

qysbc said:
I have checked the client machines and they have Kodak Imaging Preview
installed and TIF/TIFF file type is associated with Kodak Imaging Preview.
I
can start Kodak Imaging Preview and open a TIFF file from there. I suspect
there is some other setttings that need to be changed.

Kevin Spencer said:
The application that opens a given image file format is determined by
what
applications are installed on the machine, and by the configuration of
the
machine. Windows does not come with a TIFF file viewer. If software is
installed on the machine that can open and view TIFFs, and it is
configured
as the default viewer for the image type, it will open. I would suspect
that
no application exists on those machines that cannot open it.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Who is Mighty Abbott?
A twin turret scalawag.

qysbc said:
I have a web page and there is a link to open a TIFF file. The way I do
it
is
to have the server code open a binary stream, set the content type to
"image/tiff" and call Response.BinaryWrite. On the client machine, the
file
type TIFF is associated with Kodak Imaging Preview. This app works on
most
client machines. When you click on the link, Kodak Imaging Preview will
open
the TIFF file on the client machine. However, on some machines, the
file
doesn't open. Is there some browser setting that needs to be done for
this
to
work?

The following C# code is used:

BinaryReader binReader =
new BinaryReader(File.Open(docPath,
FileMode.Open,FileAccess.Read));
byte[] binFile =

binReader.ReadBytes(Convert.ToInt32(binReader.BaseStream.Length));

int size = binFile.Length;
size = Convert.ToInt32(binReader.BaseStream.Length);

Response.ContentType = "image/tiff";
Response.BinaryWrite(binFile);
binReader.Close();
 
G

Guest

On most client machines, if you click on the link, a new browser window will
open and the server runs the attached C# code that sends the binary stream to
the browser. The browser window then closes (the opening and closing of the
browser windows takes only a second) and Kodak Imaging Preview opens and
displays the TIFF image.

On the client machines that fails to open the TIFF file, a new browser
window opens and a little image icon is displayed on the window. The browser
window does not close and Kodak Imaging Preview does not open.


Kevin Spencer said:
What exactly is happening on these clients?

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Who is Mighty Abbott?
A twin turret scalawag.

qysbc said:
I have checked the client machines and they have Kodak Imaging Preview
installed and TIF/TIFF file type is associated with Kodak Imaging Preview.
I
can start Kodak Imaging Preview and open a TIFF file from there. I suspect
there is some other setttings that need to be changed.

Kevin Spencer said:
The application that opens a given image file format is determined by
what
applications are installed on the machine, and by the configuration of
the
machine. Windows does not come with a TIFF file viewer. If software is
installed on the machine that can open and view TIFFs, and it is
configured
as the default viewer for the image type, it will open. I would suspect
that
no application exists on those machines that cannot open it.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Who is Mighty Abbott?
A twin turret scalawag.

I have a web page and there is a link to open a TIFF file. The way I do
it
is
to have the server code open a binary stream, set the content type to
"image/tiff" and call Response.BinaryWrite. On the client machine, the
file
type TIFF is associated with Kodak Imaging Preview. This app works on
most
client machines. When you click on the link, Kodak Imaging Preview will
open
the TIFF file on the client machine. However, on some machines, the
file
doesn't open. Is there some browser setting that needs to be done for
this
to
work?

The following C# code is used:

BinaryReader binReader =
new BinaryReader(File.Open(docPath,
FileMode.Open,FileAccess.Read));
byte[] binFile =

binReader.ReadBytes(Convert.ToInt32(binReader.BaseStream.Length));

int size = binFile.Length;
size = Convert.ToInt32(binReader.BaseStream.Length);

Response.ContentType = "image/tiff";
Response.BinaryWrite(binFile);
binReader.Close();
 
G

Guest

I have figured out the difference between the client machines. The code will
not work if a a browser has plugin to display a TIFF image.

Now, I just open a new window and pass an URL to let a user access a TIFF
file.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top