Welcome to HostingForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

IIS 6 handle images without extension

 
   Web Hosting Problem Solving Community! (Home) -> IIS RSS
Next:  Getting Integrated Authentication to work in IIS6..  
Author Message
Steve

External


Since: Jan 22, 2007
Posts: 4



(Msg. 1) Posted: Mon Feb 05, 2007 5:11 pm
Post subject: IIS 6 handle images without extension
Archived from groups: microsoft>public>inetserver>iis (more info?)

I'm migrating an application for IIS 5 to IIS 6, and part of the
application is thousands of cached images - jpgs, gifs and bmps.
However, they are stored on the server with no file extension - i.e.
no .jpg, no.gif and no .bmp - they are just stored as coded file names
such as a4ef0 - which corresponds to a key in the database yada yada
yada.

Anyway, on IIS5, it seems to read the header of these files fine when
they are called in an img src=./cache/images/a4ef0 alt=""
border="0" . However, IIS6 just comes up with a missing image.
Short of going through and changing the code, database, and thousands
of images to include a file type extension, where should I be poking
around in IIS 6 to fix this at the server level and not the code
level.

Many thanks to anyone who can answer this!

 >> Stay informed about: IIS 6 handle images without extension 
Back to top
Login to vote
David Wang

External


Since: Dec 22, 2006
Posts: 560



(Msg. 2) Posted: Mon Feb 05, 2007 7:06 pm
Post subject: Re: IIS 6 handle images without extension [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Feb 5, 5:11 pm, "Steve" <steve.lo... DeleteThis @gmail.com> wrote:
> I'm migrating an application for IIS 5 to IIS 6, and part of the
> application is thousands of cached images - jpgs, gifs and bmps.
> However, they are stored on the server with no file extension - i.e.
> no .jpg, no.gif and no .bmp - they are just stored as coded file names
> such as a4ef0 - which corresponds to a key in the database yada yada
> yada.
>
> Anyway, on IIS5, it seems to read the header of these files fine when
> they are called in an img src=./cache/images/a4ef0 alt=""
> border="0" . However, IIS6 just comes up with a missing image.
> Short of going through and changing the code, database, and thousands
> of images to include a file type extension, where should I be poking
> around in IIS 6 to fix this at the server level and not the code
> level.
>
> Many thanks to anyone who can answer this!


For security reasons, IIS6 does not serve resources without a MIME
Type (it automatically prevents ASP/ASP.Net source disclosure, for
example). Extensionless resources do not have a MIME-Type by default,
so they are not served by default. You will need to manually make the
appropriate security decision -- IIS6 makes it explicit (off-by-
default); IIS5 implicitly allows everything to work (on-by-default) so
that you don't have to configure much to have things work, but history
says that approach does is insecure due to the tremendous attack
surface exposed.

Determine the MIME-Type you used on IIS5, go to the directory of
extensionless resources (such as /cache/images) in IIS Manager UI, and
add that MIME Type there. Then download of extensionless resources
will work.

You can also troubleshoot this by simply looking at the IIS log file
entry for the failing requests, noticing it saying 404 3 50, and
search for a solution to it.
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library...S/0f4ac


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//

 >> Stay informed about: IIS 6 handle images without extension 
Back to top
Login to vote
Tray

External


Since: Feb 05, 2007
Posts: 10



(Msg. 3) Posted: Tue Feb 06, 2007 7:05 pm
Post subject: RE: IIS 6 handle images without extension [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I know a useful freeware program called pictview.

You can batch convert all the pictures to the same format and then do a mass
rename from command line to get the extension.

The quality is wonderful.

"Steve" wrote:

> I'm migrating an application for IIS 5 to IIS 6, and part of the
> application is thousands of cached images - jpgs, gifs and bmps.
> However, they are stored on the server with no file extension - i.e.
> no .jpg, no.gif and no .bmp - they are just stored as coded file names
> such as a4ef0 - which corresponds to a key in the database yada yada
> yada.
>
> Anyway, on IIS5, it seems to read the header of these files fine when
> they are called in an img src=./cache/images/a4ef0 alt=""
> border="0" . However, IIS6 just comes up with a missing image.
> Short of going through and changing the code, database, and thousands
> of images to include a file type extension, where should I be poking
> around in IIS 6 to fix this at the server level and not the code
> level.
>
> Many thanks to anyone who can answer this!
>
>
 >> Stay informed about: IIS 6 handle images without extension 
Back to top
Login to vote
Display posts from previous:   
   Web Hosting Problem Solving Community! (Home) -> IIS All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]