By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,838 Members | 2,222 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,838 IT Pros & Developers. It's quick & easy.

TIFF file does not open

P: n/a
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.Base Stream.Length));

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

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

Jan 19 '06 #1
Share this Question
Share on Google+
6 Replies


P: n/a
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?

"qysbc" <qy***@discussions.microsoft.com> wrote in message
news:B2**********************************@microsof t.com...
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.Base Stream.Length));

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

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

Jan 19 '06 #2

P: n/a
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" <qy***@discussions.microsoft.com> wrote in message
news:B2**********************************@microsof t.com...
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.Base Stream.Length));

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

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

Jan 19 '06 #3

P: n/a
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" wrote:
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" <qy***@discussions.microsoft.com> wrote in message
news:B2**********************************@microsof t.com...
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.Base Stream.Length));

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

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


Jan 23 '06 #4

P: n/a
What exactly is happening on these clients?

--
HTH,

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

"qysbc" <qy***@discussions.microsoft.com> wrote in message
news:DC**********************************@microsof t.com...
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" wrote:
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" <qy***@discussions.microsoft.com> wrote in message
news:B2**********************************@microsof t.com...
>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.Base Stream.Length));
>
> int size = binFile.Length;
> size = Convert.ToInt32(binReader.BaseStream.Length);
>
> Response.ContentType = "image/tiff";
> Response.BinaryWrite(binFile);
> binReader.Close();
>


Jan 23 '06 #5

P: n/a
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" wrote:
What exactly is happening on these clients?

--
HTH,

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

"qysbc" <qy***@discussions.microsoft.com> wrote in message
news:DC**********************************@microsof t.com...
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" wrote:
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" <qy***@discussions.microsoft.com> wrote in message
news:B2**********************************@microsof t.com...
>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.Base Stream.Length));
>
> int size = binFile.Length;
> size = Convert.ToInt32(binReader.BaseStream.Length);
>
> Response.ContentType = "image/tiff";
> Response.BinaryWrite(binFile);
> binReader.Close();
>


Jan 23 '06 #6

P: n/a
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.

Mar 16 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.