asp on IIS7

J

Jason Hartsoe

I'm running IIS7(2008 Server) and SQL both 64 bit. There's a simple client
side code...that just doesn't make any sense. Is there something in IIS7
that could possibly have some effect on including the file. The problem is:

<script src="myfiletoinclude.inc"></script>

it works fine on my 2000 and 2003 box....running IE8 emulating IE7. No
problems....but on the 08 box...it won't pull in the page. Is there a
setting or a place I can go to fix this? I'm clueless....

Thanks!
 
A

Anthony Jones

Jason Hartsoe said:
I'm running IIS7(2008 Server) and SQL both 64 bit. There's a simple client
side code...that just doesn't make any sense. Is there something in IIS7
that could possibly have some effect on including the file. The problem is:

<script src="myfiletoinclude.inc"></script>

it works fine on my 2000 and 2003 box....running IE8 emulating IE7. No
problems....but on the 08 box...it won't pull in the page. Is there a
setting or a place I can go to fix this? I'm clueless....


Change the .inc file extension to .js or .vbs which ever matches the
content.

A possible cause of the problem is the server not having a .inc in its
mimemap, without a catch all .* being present (which is not recommended) the
file won't be served.

Another possible cause is IE being more restrictive, it may not like
treating a .inc file that doesn't have a text/javascript or text/vbscript
content type as a script. Thats a guess I haven't played with IE8 yet.
 
J

Jason Hartsoe

well i did try changing it to a js...but still ended up with nothing...it's a
weird thing. The exact same page served on two different machines...one
works, the other doesn't. IIS7 is still new to me...I wouldn't think it'd be
anything to do server side...rather than client side...

I'll keep looking.

Thanks Anthony!
 
J

Jason Hartsoe

I found the problem. IIS7 requires the MIME Type to be defined for all files
used. Currently the file was serving a 404...but with the added type it now
serves it correctly without any problems.

THanks again!
 
A

Anthony Jones

Jason Hartsoe said:
I found the problem. IIS7 requires the MIME Type to be defined for all files
used. Currently the file was serving a 404...but with the added type it now
serves it correctly without any problems.


Strange thats true of IIS6 too. By default it has a .js mapping. Did your
IIS7 not have a .js mapping in the server mimetypes? Or could it be that
you had some mime types at the site level? This is a common problem since
from IIS point of view the mimemap is a single property. Hence assigning
something to the mimemap lower down masks the whole mimemap from the server
level in the metabase.
 
D

Dave Anderson

Jason said:
I found the problem. IIS7 requires the MIME Type to be defined for
all files used. Currently the file was serving a 404...but with the
added type it now serves it correctly without any problems.

IIS6 has the same requirement.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top