By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,114 Members | 1,570 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,114 IT Pros & Developers. It's quick & easy.

IIS mis-Configuration? SSI referencing .aspx file

P: n/a
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
Nov 19 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a

"TWEB" <tw******@noemail.nospam> wrote in message
news:25**********************************@microsof t.com...
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

Nov 19 '05 #2

P: n/a
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" <ki********@hotmail.comREMOVETRAIL>
| References: <25**********************************@microsoft.co m>
| 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: <um**************@TK2MSFTNGP10.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 139.151.255.7
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP10.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:114852
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
|
| "TWEB" <tw******@noemail.nospam> wrote in message
| news:25**********************************@microsof t.com...
| >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
|
|

Nov 19 '05 #3

P: n/a
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/de...e82116e67f.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
Nov 19 '05 #4

P: n/a
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==?=" <tw******@noemail.nospam>
| References: <25**********************************@microsoft.co m>
<um**************@TK2MSFTNGP10.phx.gbl>
<QK*************@TK2MSFTNGXA01.phx.gbl>
| Subject: SSI referencing .aspx file - #exec
| Date: Thu, 28 Jul 2005 08:12:04 -0700
| Lines: 22
| Message-ID: <28**********************************@microsoft.co m>
| 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!TK2MSF TNGXA03.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/de...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
|

Nov 19 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.