Server side include not working

Server side include not working

am 20.07.2007 15:42:24 von Water Cooler v2

There're two files in the directory structure shown below:

wwwroot
\myapp
foo.asp
bar.asp

In the file foo.asp I include a second file as:




On browsing to the page:

http://localhost/myapp/foo.asp

I get the following error:

The system cannot locate the resource specified.
/myapp/bar.asp, line 7

with an HTTP status code 500 (Internal Server Error).

Is there something one needs to do in IIS 5.1 in order to activate
server side includes?

Re: Server side include not working

am 20.07.2007 16:02:04 von .._..

Use a virtual include instead.





Includes tend to not work in a lot of cases on a patched or newer server
because you can "escape" the root of the web site and get files you
shouldn't under certain conditions. So they are often simply blocked.

Virtual includes interact with the file system of the web, not the disk, so
are "more secure" and rarely disabled.

Otherwise, ask your host about what include they want you to use.

"Water Cooler v2" wrote in message
news:1184938944.318657.296740@z24g2000prh.googlegroups.com.. .
> There're two files in the directory structure shown below:
>
> wwwroot
> \myapp
> foo.asp
> bar.asp
>
> In the file foo.asp I include a second file as:
>
>
>
>
> On browsing to the page:
>
> http://localhost/myapp/foo.asp
>
> I get the following error:
>
> The system cannot locate the resource specified.
> /myapp/bar.asp, line 7
>
> with an HTTP status code 500 (Internal Server Error).
>
> Is there something one needs to do in IIS 5.1 in order to activate
> server side includes?
>

Re: Server side include not working

am 21.07.2007 00:55:47 von Deniz

On Jul 20, 6:42 am, Water Cooler v2 wrote:
> There're two files in the directory structure shown below:
>
> wwwroot
> \myapp
> foo.asp
> bar.asp
>
> In the file foo.asp I include a second file as:
>
>
>
> On browsing to the page:
>
> http://localhost/myapp/foo.asp
>
> I get the following error:
>
> The system cannot locate the resource specified.
> /myapp/bar.asp, line 7
^^^^^ Your include is working, problem is in the file
that you include.

Deniz