Adding the xsd MIME Type at the website/vdir level and making sure that xsd
extension is NOT ScriptMapped to something else that is NOT enabled in Web
Service Extension will guarantee that the resource is downloadable. No IIS
restart required.
Basically, this is what is going on. When you make a request to a URL, IIS
has to decide how to handle it. IIS classifies requests as either:
1. Static resource
2. Dynamic resource
This determination is made by the extension of the resource. IIS first
looks up the applicable ScriptMap table for the URL, which lists all the
extension-to-script-engine mappings. If a mapping exists, the resource is
dynamic. If no mapping exists, it is a static resource. .dll, .com, .exe,
..cgi, and .isa are special default extension mappings that IIS deems
dynamic.
After IIS determines whether the resource is static or dynamic, then the
appropriate handler takes over.
Static resources are handled by the static file handler, which does a
MIME-Type check against the extension prior to serving it and will NOT allow
resources without a MIME Type to be served. This is where 404.3 errors come
from.
Dynamic resources are handled by the appropriate script-engine if a
ScriptMapping exists, or by the ISAPI/CGI itself if .dll/.exe/.com/.cgi/.isa
extension. IIS will do a Web Service Extension check against the binary DLL
prior to execution and will NOT allow the binary to load/execute without an
enabled Web Service Extension. This is where 404.2 errors come from.
Thus, adding .xsd MIME Type allows the static file handler to serve the XSD
files, and making sure no XSD ScriptMap exists will ensure that the static
file handler and NOT aspnet_isapi.dll, etc from stealing the request.
--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"Aaron B. Hockley" <ahockley.DeleteThis@newsgroup.nospam> wrote in message
news:338584D0-D3C7-42B5-B3FC-6F281552583F@microsoft.com...
I tried editing the xsd MIME type as described and see no change in
behavior... it's still returning 404 errors.
I've tried setting it to either application/octet-stream or text/xml with
the same results. I have restarted IIS between attempts.
Any other ideas?
"Tom Kaminski [MVP]" wrote:
> "Aaron B. Hockley" <ahockley.DeleteThis@newsgroup.nospam> wrote in message
> news:F8EE2E7B-E24B-4296-9188-6DBC965382EE@microsoft.com...
> > I have a web site that links to several files of various types, all in
the
> same directory. Examples of file types include .doc, .xls, .html, and
..xsd.
> >
> > Everything works fine except the XSD... when linking to it at
> <a style='text-decoration: underline;' href="http://server.domain.com/directory/filename.xsd," target="_blank">http://server.domain.com/directory/filename.xsd,</a> IIS 6 (Windows Server
2003,
> all critical updates) returns a 404 file not found. Opening the file from
> the filesystem into IE works fine.
> >
> > I tried adding the XSD type to be handled by aspnet_isapi.dll with no
> change in results.
> >
> > Help? Is this a bug? Is there a fix?
>
> Not a bug, but by design:
<font color=purple> > <a style='text-decoration: underline;' href="http://support.microsoft.com/default.aspx?scid=kb;en-us;326965</font" target="_blank">http://support.microsoft.com/default.aspx?scid=kb;en-us;326965</font</a>>
>
> --
> Tom Kaminski IIS MVP
<font color=purple> > <a style='text-decoration: underline;' href="http://www.microsoft.com/windowsserver2003/community/centers/iis/</font" target="_blank">http://www.microsoft.com/windowsserver2003/community/centers/iis/</font</a>>
<font color=purple> > <a style='text-decoration: underline;' href="http://mvp.support.microsoft.com/</font" target="_blank">http://mvp.support.microsoft.com/</font</a>>
<font color=purple> > <a style='text-decoration: underline;' href="http://www.iisfaq.com/</font" target="_blank">http://www.iisfaq.com/</font</a>>
> <a style='text-decoration: underline;' href="http://www.iistoolshed.com/" target="_blank">http://www.iistoolshed.com/</a> - tools, scripts, and utilities for running
IIS
<font color=purple> > <a style='text-decoration: underline;' href="http://www.tryiis.com</font" target="_blank">http://www.tryiis.com</font</a>>
>
>
><!-- ~MESSAGE_AFTER~ -->
>> Stay informed about: IIS returning 404 not found for .xsd files