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

script problem in IIS6

 
   Web Hosting Problem Solving Community! (Home) -> IIS RSS
Next:  Intranet  
Author Message
sorin

External


Since: Sep 08, 2003
Posts: 3



(Msg. 1) Posted: Mon Sep 08, 2003 10:44 pm
Post subject: script problem in IIS6
Archived from groups: microsoft>public>inetserver>iis (more info?)

The server is Windows 2003 with IIS 6
I have the following simple code in default.asp:
<script language="JavaScript" src="functions.inc"></script>
<script language="JavaScript">
alert(strVal);
</script>

the file functions.inc contains:
var strVal = "ABCD"

When I'm trying to view the default.asp page in IE I get the error strVal is undefined.
If I move both files (default.asp and functions.inc) on another server which runs Windows 2000 and IIS 5 it is working fine.
On Windows 2003 machine I did checked the "Include parent paths" checkbox. Also ASP is enabled.
Any ideeas ? Thank you



**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...

 >> Stay informed about: script problem in IIS6 
Back to top
Login to vote
kgafvert

External


Since: Aug 23, 2003
Posts: 3146



(Msg. 2) Posted: Tue Sep 09, 2003 11:49 am
Post subject: Re: script problem in IIS6 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi,

I *think* that this could be related to that IIS6 will not serve .inc
extension by default. Have you tried to change this?

--
Regards,
Kristofer Gafvert
<a style='text-decoration: underline;' href="http://www.ilopia.com" target="_blank">http://www.ilopia.com</a> - My personal Web Site, with information about things
i find interesting, for example Windows Server 2003.
Reply to newsgroup only. Remove NEWS if you must reply by email, but please
do not.


"Sorin" <sorin.RemoveThis@kaisha-tec.com> wrote in message
news:OwFtBxndDHA.3948@TK2MSFTNGP11.phx.gbl...
 > The server is Windows 2003 with IIS 6
 > I have the following simple code in default.asp:
 > <script language="JavaScript" src="functions.inc"></script>
 > <script language="JavaScript">
 > alert(strVal);
 > </script>
 >
 > the file functions.inc contains:
 > var strVal = "ABCD"
 >
 > When I'm trying to view the default.asp page in IE I get the error strVal
is undefined.
 > If I move both files (default.asp and functions.inc) on another server
which runs Windows 2000 and IIS 5 it is working fine.
 > On Windows 2003 machine I did checked the "Include parent paths" checkbox.
Also ASP is enabled.
 > Any ideeas ? Thank you
 >
 >
 >
 > **********************************************************************
<font color=purple> > Sent via Fuzzy Software @ <a style='text-decoration: underline;' href="http://www.fuzzysoftware.com/</font" target="_blank">http://www.fuzzysoftware.com/</font</a>>
 > Comprehensive, categorised, searchable collection of links to ASP &
ASP.NET resources...<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: script problem in IIS6 
Back to top
Login to vote
kenremove

External


Since: Aug 23, 2003
Posts: 3041



(Msg. 3) Posted: Tue Sep 09, 2003 4:05 pm
Post subject: Re: script problem in IIS6 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

The problem may be that the alert(); is firing before functions.inc has a
chance to download (and possibly the browser is being told not to cache it).

It is working on the IIS v5 server because IE has already downloaded
functions.inc sometime previously and has it cached in the local browser
cache.

To test this, I would suggest that you move the alert() call into the
functions.inc file, or run the function onLoad or similar.

Since this is a javascript issue, I don't think any of the ASP, or Parent
Path settings are relevant to the problem.

Cheers
Ken

"Sorin" <sorin.RemoveThis@kaisha-tec.com> wrote in message
news:OwFtBxndDHA.3948@TK2MSFTNGP11.phx.gbl...
: The server is Windows 2003 with IIS 6
: I have the following simple code in default.asp:
: <script language="JavaScript" src="functions.inc"></script>
: <script language="JavaScript">
: alert(strVal);
: </script>
:
: the file functions.inc contains:
: var strVal = "ABCD"
:
: When I'm trying to view the default.asp page in IE I get the error strVal
is undefined.
: If I move both files (default.asp and functions.inc) on another server
which runs Windows 2000 and IIS 5 it is working fine.
: On Windows 2003 machine I did checked the "Include parent paths" checkbox.
Also ASP is enabled.
: Any ideeas ? Thank you
 >> Stay informed about: script problem in IIS6 
Back to top
Login to vote
sorin

External


Since: Sep 08, 2003
Posts: 3



(Msg. 4) Posted: Tue Sep 09, 2003 4:05 pm
Post subject: Re: script problem in IIS6 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thank you for your answer but is not that. I've changed the code to call the alert() from a function which is called when I press a button. So is 100% sure that the functions.inc is loaded.
Also, on Windows 2000 and IE 5 it worked fine from the very beginning so IE cache was not used.
I assume is a server problem (IIS 6 not necessary ASP) because THE SAME CODE is working fine on IIS 5.
Also I'm sure is not a browser problem (on Windows 2003 I have IE 6) because using Windows 2003 as client I can load ok the file if I'm using Windows 2000 as web server.


**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
 >> Stay informed about: script problem in IIS6 
Back to top
Login to vote
sorin

External


Since: Sep 08, 2003
Posts: 3



(Msg. 5) Posted: Tue Sep 09, 2003 4:05 pm
Post subject: Re: script problem in IIS6 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I found something:
if I change the include file extension from inc to js is working fine.
As I don't want (and cannot) to change my whole web application I will search to see if I can find some settings in IIS 6 to allow to specify files with diferent extensions.
It seems the IIS 6 designers choosed to "fix" a security issue in a functionality by disabling the whole functionality.

**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
 >> Stay informed about: script problem in IIS6 
Back to top
Login to vote
kenremove

External


Since: Aug 23, 2003
Posts: 3041



(Msg. 6) Posted: Tue Sep 09, 2003 7:12 pm
Post subject: Re: script problem in IIS6 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Oh, IIS 6 will not serve a file is there is no MIME type mapping for the
extension. .inc is not included in the default list of extensions. You need
to add that in yourself (either globally, or for a particular website). You
can do this via the IIS MMC Snapin.

Cheers
Ken

"Sorin" <sorin RemoveThis @kaisha-tec.com> wrote in message
news:%232tCvMpdDHA.1532@TK2MSFTNGP10.phx.gbl...
: I found something:
: if I change the include file extension from inc to js is working fine.
: As I don't want (and cannot) to change my whole web application I will
search to see if I can find some settings in IIS 6 to allow to specify files
with diferent extensions.
: It seems the IIS 6 designers choosed to "fix" a security issue in a
functionality by disabling the whole functionality.
:
: **********************************************************************
: Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
: Comprehensive, categorised, searchable collection of links to ASP &
ASP.NET resources...
 >> Stay informed about: script problem in IIS6 
Back to top
Login to vote
timcof

External


Since: Sep 02, 2003
Posts: 912



(Msg. 7) Posted: Thu Sep 11, 2003 12:25 pm
Post subject: RE: script problem in IIS6 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Make sure you have enabled server-side includes.
add/remove windows comp
application server
IIS
WWW
Server Side Includes (check it).
OK.

Thank you. I hope this information is helpful.

Tim Coffey [MSFT]

This posting is provided “AS IS” with no warranties, and confers no rights. You assume all risk for your use. © 2001 Microsoft
Corporation. All rights reserved.
--------------------
| From: Sorin (sorin@kaisha-tec.com)
| Subject: script problem in IIS6
| Message-ID: <OwFtBxndDHA.3948.DeleteThis@TK2MSFTNGP11.phx.gbl>
| Newsgroups: microsoft.public.inetserver.iis
| Date: Mon, 08 Sep 2003 19:44:13 -0700
| NNTP-Posting-Host: shared2.orcsweb.com 66.129.69.1
| Lines: 1
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.inetserver.iis:274532
| X-Tomcat-NG: microsoft.public.inetserver.iis
|
| The server is Windows 2003 with IIS 6
| I have the following simple code in default.asp:
| <script language="JavaScript" src="functions.inc"></script>
| <script language="JavaScript">
| alert(strVal);
| </script>
|
| the file functions.inc contains:
| var strVal = "ABCD"
|
| When I'm trying to view the default.asp page in IE I get the error strVal is undefined.
| If I move both files (default.asp and functions.inc) on another server which runs Windows 2000 and IIS 5 it is working fine.
| On Windows 2003 machine I did checked the "Include parent paths" checkbox. Also ASP is enabled.
| Any ideeas ? Thank you
|
|
|
| **********************************************************************
| Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
| Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
|
 >> Stay informed about: script problem in IIS6 
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 ]