David
Thu Jan 12 03:14:54 CST 2006
Hmm... you want the script file to be downloadable... not return a 403. What
is the HTTP substatus code for the 403 response to the .vb file?
--
//David
IIS
http://blogs.msdn.com/David.Wang
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"Martin Walke" <martin.walke_no_spam@vega_dot_co_dot_uk> wrote in message
news:ucM5WOsFGHA.1260@TK2MSFTNGP15.phx.gbl...
> Thanks guys.. the log file shows a code of 403. I'll change the extension.
>
> Martin
>
>
> "Martin Walke" <martin.walke_no_spam@vega_dot_co_dot_uk> wrote in message
> news:emVV%23LqFGHA.3000@TK2MSFTNGP14.phx.gbl...
>> Hi Kristofer
>>
>> As far as I know it is IIS 6. I did actually look at the known extension
>> types and saw .vb there so assumed it would be OK. Didn't realise that
>> the ASP.NET ISAPI would prevent it from donwloading. (Haven't taken the
>> plunge to .NET yet :o ) I understand now why that is. Thanks.
>>
>> Just as a check, isn't having a file with an extension of .vbs also a
>> problem due to security issues. I know it is at email levels. It's no
>> problem to change the extension as currently we were only testing a
>> prototype to prove the concept. I've requested the log file but I'll also
>> send them a system with .vbs extension. Sounds like that may be an easy
>> solution and one that at least I know why it wasn't working.
>>
>> (BTW, I think you're right about URLScan and it reporting 404.)
>>
>> Thanks again
>> Martin
>>
>> "Kristofer Gafvert" <kgafvert@NEWSilopia.com> wrote in message
>> news:xn0eh3ruc762ewm00f@news.microsoft.com...
>>> Hello,
>>>
>>> Do you use IIS 6 (Windows Server 2003)? If so, I think i know what your
>>> problem is. By default, there is no MIME type for the .vb extension
>>> (this is required on IIS 6 if IIS will serve the file[1]). I also
>>> noticed that .vb is mapped to the ASP.NET web service extension on a
>>> standard installation, which in your situation is not correct (you want
>>> the file to be downloaded to the client, not executed on the server). I
>>> also think that by default, .vb-files will not be downloadable (denied
>>> by the ASP.NET ISAPI) when mapped to the ASP.NET ISAPI, because they
>>> usually contain source code (server side source code) that should not be
>>> downloaded to the client.
>>>
>>> I think that the best solution is to use a .vbs-extension for your
>>> VBScript files that will be downloaded and executed on the client. This
>>> extension is by default in the MIME list, so no additional configuration
>>> is required on the server.
>>>
>>> If it is not possible to change the extension (because it requires a lot
>>> of work to change the references to the vb-files), you need to unmap the
>>> extension from the ASP.NET isapi, and add a MIME type for the extension
>>> instead.
>>>
>>> If the above is true in your situation, you will have a status code of
>>> 403, because the ASP.NET ISAPI took care of the request, but refused to
>>> serve the file.
>>>
>>> If you have a 404 and the substatus code is 2, there is a web service
>>> extension defined for this extension, but it is not allowed to execute.
>>> If the substatus is 3, the request is denied because there is no MIME
>>> type defined for the extension. I also think that URLScan generates 404
>>> if it denies requests based on extension (i am not sure however).
>>>
>>> Note that most of what i write in the message is based on speculations,
>>> and may not apply to your situation.
>>>
>>> If you need further help, please also include information about what OS
>>> (or IIS version) you use, because IIS 5 and IIS 6 is different in this
>>> (IIS 5 serves all files by default, but IIS 6 does not).
>>>
>>> [1] "IIS 6.0 Does Not Serve Unknown MIME Types"
>>>
http://support.microsoft.com/?id=326965
>>>
>>> Other link(s):
>>>
>>> "Common reasons IIS Server returns "HTTP 404 - File not found" error"
>>>
http://support.microsoft.com/kb/248033/en-us
>>>
>>>
>>> --
>>> Regards,
>>> Kristofer Gafvert
>>>
http://www.gafvert.info/iis/ - IIS Related Info
>>>
>>>
>>> Martin Walke wrote:
>>>
>>>>Hi Kristofer,
>>>>
>>>>Thanks for the reply. This may take some time as the client is 150 miles
>>>>away (UK based) and I'm not there all the time. I'll get him to email me
>>>>the log file and then I can work from that. I understand what you're
>>>>saying (should have figured it out myself!). The code shouldn't be 404
>>>>as the menu.vb file does exist in the same directory as the html parent
>>>>file but if it is what can be causing that? Obviously, other codes I can
>>>>try and track down their meaning first, before reposting.
>>>>
>>>>Thanks
>>>>Martin
>>>>
>>>>
>>>>"Kristofer Gafvert" <kgafvert@NEWSilopia.com> wrote in message
>>>>news:xn0eh2ocr65nmdn00c@news.microsoft.com...
>>>>>Hello,
>>>>>
>>>>>This is code (script) that executes on the client, so the only thing
>>>>>that can go wrong on the server if is the file cannot be downloaded
>>>>>from the server. Everything else is a client-side issue.
>>>>>
>>>>>So let's find out if this file is not being downloaded from the server
>>>>>to the client.
>>>>>
>>>>>Open the latest IIS log file for this website (located in
>>>>>C:\Windows\System32\LogFiles\W3SVCNNNN where NNNN is the website ID).
>>>>>Do a search for menu.vb, and check the sc-status, sc-substatus and
>>>>>sc-win32-status. Is the sc-status perhaps 404?
>>>>>
>>>>>If you are unable to solve the issue with help of knowing the status
>>>>>codes, please post back the full entry for a request for menu.vb
>>>>>(including the status codes, you may remove any username and/or IP if
>>>>>you want, but if you do, please say so), so we can have a look at it
>>>>>(it is too much to write to detail out every possible combination and
>>>>>their solutions).
>>>>>
>>>>>
>>>>>-- Regards,
>>>>>Kristofer Gafvert
>>>>>
http://www.gafvert.info/iis/ - IIS Related Info
>>>>>
>>>>>
>>>>>Martin Walke wrote:
>>>>>
>>>>>>Hi all,
>>>>>>
>>>>>>Not sure whether I've got the right groups but... I have a standard
>>>>>>HTML
>>>>>>file that uses the following line to include some VBScript code.
>>>>>>
>>>>>><script type='text/vbscript' src='menu.vb'></script>
>>>>>>
>>>>>>which appears to work fine except when I install it at my client's
>>>>>>site,
>>>>>>where it flatly refuses to load the VBScript file. If I include the
>>>>>>code
>>>>>>from this include file into the main HTML everything's fine. Is there
>>>>>>a
>>>>>>setting somewhere that prevents VBS files from being loaded? I've sort
>>>>>>of narrowed it down to a server setting but not sure...
>>>>>>
>>>>>>BTW, someone over in the ie6.browser forum has the same problem but
>>>>>>with JS files.
>>>>>>
>>>>>>TIA
>>>>>>Martin
>>
>>
>
>