 |
|
 |
|
|
 |
IIS 6.0 can't serve multiple .bat files - 404 error |
 |
 |
|
|
10-30-04 12:46 PM
We have an application that creates potentially 1,000's of unique .bat files
in a Virtual Directory based on user and site information. When the .asp is
called, the File Scripting Object creates a .bat file based on information
about the user and places it in the physical location referenced by the
Virtual Directly. The .asp then creates a link to that file so the user can
click on it and open the .bat file. With the move to Server 2003, IIS 6.0
is giving a 404 error when that link is referenced, and obviously it exists
so it's not recognizing the extension.
I'm aware that IIS 6.0 needs to know the extensions of a file before it will
recognize them and that you can identify extentions in the Internet
Information Services Manager by defining a new Web Service Extension, but
only for a specific file.
Is there any way to allow the downloading of all .bat files?
Thanks,
Steve Ricketts
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: IIS 6.0 can't serve multiple .bat files - 404 error |
 |
 |
|
|
10-30-04 10:49 PM
Hi,
It looks like you have some terms confused. A web service extension allows
IIS to use an application to process a file on the server (like allowing
ASP, in order to have .asp files processed by the ASP compiler/server).
What you want is a MIME Type setting in order to serve all .bat files
In the IIS Manager, expand the computer's name, and the "Web Sites" folder,
then right-click the website which you would like to allow .bat files to be
served on, and select "Properties". Alternatively, you can right click on
the "Web Sites" folder and select "Properties" to apply these settings to
all of the websites hosted on the computer, instead of applying the settings
website by website.
In the Properties screen, click on the "HTTP Headers" tab. On the bottom of
this property page, click the "MIME Types." button. A list of the custom
MIME types set on this computer will now be displayed. On the right side of
the MIME type window click the "New." button. Since you want to allow .bat
sites to be served, type the extension ".bat" (without the quotes) into the
first text box. In the "MIME type" text box, type "text/plain" (without the
quotes) and press the "OK" button on both of the dialogs, and "Apply" on the
Properties window.
--
--Jonathan Maltz [Microsoft MVP - Windows Server - IIS, Virtual PC]
http://www.visualwin.com - A Windows Server 2003 visual, step-by-step
tutorial site :-)
http://vpc.visualwin.com - Does <insert OS name> work on VPC 2004? Find out
here
Only reply by newsgroup. I do not do technical support via email. Any
emails I have not authorized are deleted before I see them.
"Steve Ricketts" <steve@velocedge.com> wrote in message
news:OetgjXovEHA.3416@TK2MSFTNGP09.phx.gbl...
> We have an application that creates potentially 1,000's of unique .bat
> files
> in a Virtual Directory based on user and site information. When the .asp
> is
> called, the File Scripting Object creates a .bat file based on information
> about the user and places it in the physical location referenced by the
> Virtual Directly. The .asp then creates a link to that file so the user
> can
> click on it and open the .bat file. With the move to Server 2003, IIS 6.0
> is giving a 404 error when that link is referenced, and obviously it
> exists
> so it's not recognizing the extension.
>
> I'm aware that IIS 6.0 needs to know the extensions of a file before it
> will
> recognize them and that you can identify extentions in the Internet
> Information Services Manager by defining a new Web Service Extension, but
> only for a specific file.
>
> Is there any way to allow the downloading of all .bat files?
>
> Thanks,
>
> Steve Ricketts
>
>
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: IIS 6.0 can't serve multiple .bat files - 404 error |
 |
 |
|
|
10-30-04 10:49 PM
Outstanding!! Yeah, I have a lot of things confused, but as long as I can
find the answers as good as this I'm not complaining! Your directions did
the trick and thanks a ton for responding so quickly and so well.
Regards,
Steve
"Jonathan Maltz [MS-MVP]" <jmaltz@mvps.org> wrote in message
news:OCM5mhqvEHA.1292@TK2MSFTNGP10.phx.gbl...
> Hi,
>
> It looks like you have some terms confused. A web service extension
allows
> IIS to use an application to process a file on the server (like allowing
> ASP, in order to have .asp files processed by the ASP compiler/server).
> What you want is a MIME Type setting in order to serve all .bat files
>
> In the IIS Manager, expand the computer's name, and the "Web Sites"
folder,
> then right-click the website which you would like to allow .bat files to
be
> served on, and select "Properties". Alternatively, you can right click on
> the "Web Sites" folder and select "Properties" to apply these settings to
> all of the websites hosted on the computer, instead of applying the
settings
> website by website.
>
> In the Properties screen, click on the "HTTP Headers" tab. On the bottom
of
> this property page, click the "MIME Types." button. A list of the custom
> MIME types set on this computer will now be displayed. On the right side
of
> the MIME type window click the "New." button. Since you want to allow
.bat
> sites to be served, type the extension ".bat" (without the quotes) into
the
> first text box. In the "MIME type" text box, type "text/plain" (without
the
> quotes) and press the "OK" button on both of the dialogs, and "Apply" on
the
> Properties window.
>
> --
> --Jonathan Maltz [Microsoft MVP - Windows Server - IIS, Virtual PC]
> http://www.visualwin.com - A Windows Server 2003 visual, step-by-step
> tutorial site :-)
> http://vpc.visualwin.com - Does <insert OS name> work on VPC 2004? Find
out
> here
> Only reply by newsgroup. I do not do technical support via email. Any
> emails I have not authorized are deleted before I see them.
>
>
> "Steve Ricketts" <steve@velocedge.com> wrote in message
> news:OetgjXovEHA.3416@TK2MSFTNGP09.phx.gbl...
.asp[vbcol=seagreen]
information[vbcol=seagreen]
6.0[vbcol=seagreen]
but[vbcol=seagreen]
>
>
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: IIS 6.0 can't serve multiple .bat files - 404 error |
 |
 |
|
|
12-13-04 11:38 PM
Hi Jonathon -
I followed your instructions and added MIME extensions for .bat,
.cmd, and .xnk. It worked for the .xnk extension.
However, I still receive the same 404 error when I click on a test .cmd
or .bat file. I can see the file because 'directory browsing' is on.
However, when I click on the .cmd or .bat file, I'm still denied
access. Any other suggestions would be greatly appreciated. I too am
using Windows 2003 Server and IIS6.
Thanks!
Jonathan Maltz [MS-MVP] wrote:
> Hi,
>
> It looks like you have some terms confused. A web service extension
allows
> IIS to use an application to process a file on the server (like
allowing
> ASP, in order to have .asp files processed by the ASP
compiler/server).
> What you want is a MIME Type setting in order to serve all .bat files
>
> In the IIS Manager, expand the computer's name, and the "Web Sites"
folder,
> then right-click the website which you would like to allow .bat files
to be
> served on, and select "Properties". Alternatively, you can right
click on
> the "Web Sites" folder and select "Properties" to apply these
settings to
> all of the websites hosted on the computer, instead of applying the
settings
> website by website.
>
> In the Properties screen, click on the "HTTP Headers" tab. On the
bottom of
> this property page, click the "MIME Types." button. A list of the
custom
> MIME types set on this computer will now be displayed. On the right
side of
> the MIME type window click the "New." button. Since you want to
allow .bat
> sites to be served, type the extension ".bat" (without the quotes)
into the
> first text box. In the "MIME type" text box, type "text/plain"
(without the
> quotes) and press the "OK" button on both of the dialogs, and "Apply"
on the
> Properties window.
>
> --
> --Jonathan Maltz [Microsoft MVP - Windows Server - IIS, Virtual PC]
> http://www.visualwin.com - A Windows Server 2003 visual, step-by-step
> tutorial site :-)
> http://vpc.visualwin.com - Does <insert OS name> work on VPC 2004?
Find out
> here
> Only reply by newsgroup. I do not do technical support via email.
Any[vbcol=seagreen]
> emails I have not authorized are deleted before I see them.
>
>
> "Steve Ricketts" <steve@velocedge.com> wrote in message
> news:OetgjXovEHA.3416@TK2MSFTNGP09.phx.gbl...
.bat[vbcol=seagreen]
the .asp[vbcol=seagreen]
information[vbcol=seagreen]
the[vbcol=seagreen]
user[vbcol=seagreen]
IIS 6.0[vbcol=seagreen]
it[vbcol=seagreen]
before it[vbcol=seagreen]
Extension, but[vbcol=seagreen]
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: IIS 6.0 can't serve multiple .bat files - 404 error |
 |
 |
|
|
12-14-04 08:37 AM
Hi,
Turn off Internet Explorer's friendly error messages (Tools -> Internet
Options -> Advanced) and paste the real error
Also, do you have anything like UrlScan installed?
--
--Jonathan Maltz [Microsoft MVP - Windows Server - IIS, Virtual PC]
http://www.visualwin.com - A Windows Server 2003 visual, step-by-step
tutorial site :-)
http://vpc.visualwin.com - Does <insert OS name> work on VPC 2004? Find out
here
Only reply by newsgroup. I do not do technical support via email. Any
emails I have not authorized are deleted before I see them.
<waynea@tek.com> wrote in message
news:1102982877.148800.189070@z14g2000cwz.googlegroups.com...
> Hi Jonathon -
> I followed your instructions and added MIME extensions for .bat,
> .cmd, and .xnk. It worked for the .xnk extension.
>
> However, I still receive the same 404 error when I click on a test .cmd
> or .bat file. I can see the file because 'directory browsing' is on.
> However, when I click on the .cmd or .bat file, I'm still denied
> access. Any other suggestions would be greatly appreciated. I too am
> using Windows 2003 Server and IIS6.
>
>
> Thanks!
>
>
> Jonathan Maltz [MS-MVP] wrote:
> allows
> allowing
> compiler/server).
> folder,
> to be
> click on
> settings to
> settings
> bottom of
> custom
> side of
> allow .bat
> into the
> (without the
> on the
> Find out
> Any
> .bat
> the .asp
> information
> the
> user
> IIS 6.0
> it
> before it
> Extension, but
>
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: IIS 6.0 can't serve multiple .bat files - 404 error |
 |
 |
|
|
12-14-04 08:37 AM
what's the sub status code of the request ? look at IIS log file
--
Regards,
Bernard Cheah
http://www.tryiis.com/
http://support.microsoft.com/
http://www.msmvps.com/bernard/
<waynea@tek.com> wrote in message
news:1102982877.148800.189070@z14g2000cwz.googlegroups.com...
> Hi Jonathon -
> I followed your instructions and added MIME extensions for .bat,
> .cmd, and .xnk. It worked for the .xnk extension.
>
> However, I still receive the same 404 error when I click on a test .cmd
> or .bat file. I can see the file because 'directory browsing' is on.
> However, when I click on the .cmd or .bat file, I'm still denied
> access. Any other suggestions would be greatly appreciated. I too am
> using Windows 2003 Server and IIS6.
>
>
> Thanks!
>
>
> Jonathan Maltz [MS-MVP] wrote:
> allows
> allowing
> compiler/server).
> folder,
> to be
> click on
> settings to
> settings
> bottom of
> custom
> side of
> allow .bat
> into the
> (without the
> on the
> Find out
> Any
> .bat
> the .asp
> information
> the
> user
> IIS 6.0
> it
> before it
> Extension, but
>
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: IIS 6.0 can't serve multiple .bat files - 404 error |
 |
 |
|
|
12-14-04 11:41 PM
Hi Bernard -
I pasted the end of the log below. I think it's '2'
Let me know if I copied the wrong part of the logfile.
Thanks!!
sc-status sc-substatus sc-win32-status sc-bytes cs-bytes time-taken
404 2 1260 1830 312 10
[ Post a follow-up to this message ]
|
|
|
 |
|
|
|
 |
Re: IIS 6.0 can't serve multiple .bat files - 404 error |
 |
 |
|
|
12-14-04 11:41 PM
Johnathon and Bernard -
Looks like it's working now. I went back and checked the
configuration and I had added .cmd / .bat as an "application extension"
(Via IIS Admin - Properties of site - Directory / Home Directory tab -
Configuration - Mappings). After I removed it, my files started
exectuing again. I'll let you know if I run into other questions.
Johnathon - thanks for the tip on the 'friendly' error messages. I
didn't know that checkbox even existed.
Thanks again for your replies.
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: IIS 6.0 can't serve multiple .bat files - 404 error |
 |
 |
|
|
12-15-04 08:37 AM
404.2 is dynamic extenstion not enabled.
404.3 is unknown mime type.
why you get 404.2? are you trying to execute it ?
--
Regards,
Bernard Cheah
http://www.tryiis.com/
http://support.microsoft.com/
http://www.msmvps.com/bernard/
<waynea@tek.com> wrote in message
news:1103062853.966230.68790@z14g2000cwz.googlegroups.com...
> Johnathon and Bernard -
> Looks like it's working now. I went back and checked the
> configuration and I had added .cmd / .bat as an "application extension"
> (Via IIS Admin - Properties of site - Directory / Home Directory tab -
> Configuration - Mappings). After I removed it, my files started
> exectuing again. I'll let you know if I run into other questions.
>
> Johnathon - thanks for the tip on the 'friendly' error messages. I
> didn't know that checkbox even existed.
> Thanks again for your replies.
>
[ Post a follow-up to this message ]
|
|
|
 |
|
|
|
|
Sponsored Links |
 |
 |
|
|
 |
All times are GMT. The time now is 01:15 PM. |
 |
|
|
 |
|
 |
|
|
 |
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
|
|
|
|
Medical and Health forum | Computer Games Reviews | Graphics design forum
|
 |
|
 |
|