Tags: emf, enhanced, file, files, graphic, graphics, iis, images, meta, microsoft, msdn, scalable, serve, server, software, svg, type, vector
How do I tell IIS that it may serve .SVG and .EMF graphic files?
On Microsoft » Microsoft IIS Development
6,671 words with 2 Comments; publish: Sun, 25 May 2008 15:13:00 GMT; (30093.75, « »)
I have an IIS server that will not serve images when the file type is
.svg (scalable vector graphics) or emf (enhanced meta file).
It does not serve .emf when the image is put in an <img
scr="image.emf"> tag nor when I type the URL of such an image in the
address bar of my browser.
The svg is included in a page as follows:
<embed src="/app/links/?src=image.svg"
pluginspage="http://www.adobe.com/svg/viewer/install/"
TYPE="image/svg+xml" />
In my production environment, the pictures will not show. In my
development environment, they do. I cannot find the differences in
configuration, except for the fact the the authentication mode differs.
How does IIS decide whether or not to serve a page?
I think there are at least two mechanisms, because when I request a
code behind file (page.aspx.vb), I get an error.
Description: The type of page you have requested is not served because
it has been explicitly forbidden. The extension '.vb' may be incorrect.
Please review the URL below and make sure that it is spelled correctly.
For .svgand .emf, I do not get this error. The image simply doesn't
come up if in an html document and if I request it directly by URL, I
get "The page cannot be found".
Any help would be appreciated.
Roel Schreurs
The Netherlands
http://iis.itags.org/q_iis_24013.html
All Comments
Leave a comment...
- 2 Comments

- Hello,
It is possible that there is no defined MIME type for these extensions,
and IIS 6.0 will not serve unknown extensions.
Also see this article regarding this:
"IIS 6.0 does not serve unknown MIME types"
http://support.microsoft.com/default.aspx?scid=kb;en-us;326965
If this does not solve the problem, please tell us the status code,
substatus code and scwin32 status code logged for a failing request for
one (or both) of these files.
--
Regards,
Kristofer Gafvert
http://www.gafvert.info/iis/ - IIS Related Info
roel.schreurs.iis.itags.org.gmail.com wrote:
>I have an IIS server that will not serve images when the file type is
>.svg (scalable vector graphics) or emf (enhanced meta file).
>It does not serve .emf when the image is put in an <img
>scr="image.emf"> tag nor when I type the URL of such an image in the
>address bar of my browser.
>The svg is included in a page as follows:
><embed src="/app/links/?src=image.svg"
>pluginspage="http://www.adobe.com/svg/viewer/install/"
>TYPE="image/svg+xml" />
>In my production environment, the pictures will not show. In my
>development environment, they do. I cannot find the differences in
>configuration, except for the fact the the authentication mode differs.
>How does IIS decide whether or not to serve a page?
>I think there are at least two mechanisms, because when I request a
>code behind file (page.aspx.vb), I get an error.
>Description: The type of page you have requested is not served because
>it has been explicitly forbidden. The extension '.vb' may be incorrect.
>Please review the URL below and make sure that it is spelled correctly.
>For .svgand .emf, I do not get this error. The image simply doesn't
>come up if in an html document and if I request it directly by URL, I
>get "The page cannot be found".
>Any help would be appreciated.
>Roel Schreurs
>The Netherlands
#1; Sun, 25 May 2008 15:15:00 GMT

- Thanks Kristofer,
This turned out to be exactly the problem. I found out that my
development environment and our testing environment run IIS 5.1 that
will just serve files with unregistered extensions. Our production
server, however, already runs IIS 6.0. I added the two MIME types:
.emf images/x-emf
.svg image/svg+xml
and after a while, when the worker process had restarted, all started
working just fine.
Kristofer Gafvert wrote:
> Hello,
> It is possible that there is no defined MIME type for these extensions,
> and IIS 6.0 will not serve unknown extensions.
> Also see this article regarding this:
> "IIS 6.0 does not serve unknown MIME types"
> http://support.microsoft.com/default.aspx?scid=kb;en-us;326965
> If this does not solve the problem, please tell us the status code,
> substatus code and scwin32 status code logged for a failing request for
> one (or both) of these files.
> --
> Regards,
> Kristofer Gafvert
> http://www.gafvert.info/iis/ - IIS Related Info
>
> roel.schreurs.iis.itags.org.gmail.com wrote:
> >I have an IIS server that will not serve images when the file type is
> >.svg (scalable vector graphics) or emf (enhanced meta file).
> >
> >It does not serve .emf when the image is put in an <img
> >scr="image.emf"> tag nor when I type the URL of such an image in the
> >address bar of my browser.
> >
> >The svg is included in a page as follows:
> ><embed src="/app/links/?src=image.svg"
> >pluginspage="http://www.adobe.com/svg/viewer/install/"
> >TYPE="image/svg+xml" />
> >
> >In my production environment, the pictures will not show. In my
> >development environment, they do. I cannot find the differences in
> >configuration, except for the fact the the authentication mode differs.
> >
> >How does IIS decide whether or not to serve a page?
> >
> >I think there are at least two mechanisms, because when I request a
> >code behind file (page.aspx.vb), I get an error.
> >Description: The type of page you have requested is not served because
> >it has been explicitly forbidden. The extension '.vb' may be incorrect.
> >Please review the URL below and make sure that it is spelled correctly.
> >
> >For .svgand .emf, I do not get this error. The image simply doesn't
> >come up if in an html document and if I request it directly by URL, I
> >get "The page cannot be found".
> >
> >Any help would be appreciated.
> >
> >Roel Schreurs
> >The Netherlands
#2; Sun, 25 May 2008 15:16:00 GMT