IIS mis-Configuration? SSI referencing .aspx file

G

Guest

I think I may have an IIS / ASP.Net Configuration issue that I need some
guidance with resolving.

Here's the problem:
a) I have a .stm file.
b) I referenc a .aspx file on this .stm file using a server-side-include
directive:
<!-- include virtual="../../foobar.aspx"-->
c)When the .stm file is rendered: The .aspx file is included, but it doesn't
look like the ASP.NET engine is processing the page, because I see the raw
unprocessed .aspx page contents returned (I see <% @ Page language=c#
Codebehind="foobar.aspx.cs"...).

This seems to indicate to me that the ASP.Net processor isn't firing on the
server side include.

What gives?

An auxiliary question:
d) Is it possible to include query string parameters on SSI directives?
<!-- include virtual="../../foobar.aspx?querystringparam=1"-->

thanx muchly
 
M

Mythran

TWEB said:
I think I may have an IIS / ASP.Net Configuration issue that I need some
guidance with resolving.

Here's the problem:
a) I have a .stm file.
b) I referenc a .aspx file on this .stm file using a server-side-include
directive:
<!-- include virtual="../../foobar.aspx"-->
c)When the .stm file is rendered: The .aspx file is included, but it
doesn't
look like the ASP.NET engine is processing the page, because I see the raw
unprocessed .aspx page contents returned (I see <% @ Page language=c#
Codebehind="foobar.aspx.cs"...).

This seems to indicate to me that the ASP.Net processor isn't firing on
the
server side include.

What gives?

An auxiliary question:
d) Is it possible to include query string parameters on SSI directives?
<!-- include virtual="../../foobar.aspx?querystringparam=1"-->

thanx muchly

The server-side include is including the contents of the foobar.aspx page as
if it was hard-coded into the the page itself. Since an .stm (which I'm not
familiar with) does not go through the aspx process, the aspx page is not
parsed as aspx.

HTH,
Mythran
 
S

Steven Cheng[MSFT]

Thanks for Mythran's inputs.

Hi TWEB,

As Mythran has said, the serverside include just simply inject the includee
file's content as static text into the container page (without any
additional parsing). The actual parsing operation on the content depend on
the container document's extention mapping. For example, if you include a
simple txt file in an asp.net aspx page, the included txt file's content
will also be parsed because the container document is asp.net page. For
your scenario, since the container page is a static document (stm), the IIS
won't using asp.net engine to parse it , nor does the included content.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)




--------------------
| From: "Mythran" <[email protected]>
| References: <[email protected]>
| Subject: Re: IIS mis-Configuration? SSI referencing .aspx file
| Date: Wed, 27 Jul 2005 14:50:24 -0700
| Lines: 37
| MIME-Version: 1.0
| Content-Type: text/plain;
| format=flowed;
| charset="Utf-8";
| reply-type=original
| Content-Transfer-Encoding: 7bit
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 139.151.255.7
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:114852
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
|
| | >I think I may have an IIS / ASP.Net Configuration issue that I need some
| > guidance with resolving.
| >
| > Here's the problem:
| > a) I have a .stm file.
| > b) I referenc a .aspx file on this .stm file using a server-side-include
| > directive:
| > <!-- include virtual="../../foobar.aspx"-->
| > c)When the .stm file is rendered: The .aspx file is included, but it
| > doesn't
| > look like the ASP.NET engine is processing the page, because I see the
raw
| > unprocessed .aspx page contents returned (I see <% @ Page language=c#
| > Codebehind="foobar.aspx.cs"...).
| >
| > This seems to indicate to me that the ASP.Net processor isn't firing on
| > the
| > server side include.
| >
| > What gives?
| >
| > An auxiliary question:
| > d) Is it possible to include query string parameters on SSI directives?
| > <!-- include virtual="../../foobar.aspx?querystringparam=1"-->
| >
| > thanx muchly
|
| The server-side include is including the contents of the foobar.aspx page
as
| if it was hard-coded into the the page itself. Since an .stm (which I'm
not
| familiar with) does not go through the aspx process, the aspx page is not
| parsed as aspx.
|
| HTH,
| Mythran
|
|
 
G

Guest

Great - thanks for the info.

I'm taking another line of direction here, and have chosen to go the way of
SSI with the exec directive.

(reference:
http://msdn.microsoft.com/library/d...html/b7e19c37-0693-4e55-aefe-8ee82116e67f.asp)

Example:
<!#exec cgi="foobar.aspx?querystringparm=1">

The trouble is now, that the #exec directive is sending down a bunch of HTTP
headers I don't need.

HTTP/1.1 200 OK Server: Microsoft-IIS/5.0 Date: Thu, 28 Jul 2005 14:51:32
GMT X-Powered-By: ASP.NET Connection: close X-AspNet-Version: 1.1.4322
Transfer-Encoding: chunked Cache-Control: private Content-Type: text/html

KB Article: q290569 shows how to fix this using ASP. The same technique
doesn't appear to work when you include a .aspx file.

thanx muchly
 
S

Steven Cheng[MSFT]

Thanks for your further followup TWEB,

Yes, when using the SSI #exec directive with ASP.NET page, you may meet
some problems since ASP.NET is a well encapuslate dynamic document model it
doesn't like the classic ASP which just simply execute the scripts in the
file from top to end. There exists complex processing steps during the
asp.net page's processing. So IMO, I don't quite recommend you include aspx
page in your SSI file. I think raw ISAPI filters or CGI programs is the
best choice for such scenario.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)




--------------------
| Thread-Topic: SSI referencing .aspx file - #exec
| thread-index: AcWThrYZ1hMKg1mzSqmt/WaCrPEgJw==
| X-WBNR-Posting-Host: 24.211.160.251
| From: "=?Utf-8?B?VFdFQg==?=" <[email protected]>
| References: <[email protected]>
<[email protected]>
<[email protected]>
| Subject: SSI referencing .aspx file - #exec
| Date: Thu, 28 Jul 2005 08:12:04 -0700
| Lines: 22
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:114958
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Great - thanks for the info.
|
| I'm taking another line of direction here, and have chosen to go the way
of
| SSI with the exec directive.
|
| (reference:
|
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iissdk/html
/b7e19c37-0693-4e55-aefe-8ee82116e67f.asp)
|
| Example:
| <!#exec cgi="foobar.aspx?querystringparm=1">
|
| The trouble is now, that the #exec directive is sending down a bunch of
HTTP
| headers I don't need.
|
| HTTP/1.1 200 OK Server: Microsoft-IIS/5.0 Date: Thu, 28 Jul 2005 14:51:32
| GMT X-Powered-By: ASP.NET Connection: close X-AspNet-Version: 1.1.4322
| Transfer-Encoding: chunked Cache-Control: private Content-Type: text/html
|
| KB Article: q290569 shows how to fix this using ASP. The same technique
| doesn't appear to work when you include a .aspx file.
|
| thanx muchly
|
 

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

Similar Threads


Members online

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top