« Previous Next »

Thread: enable server side includes in iis5.1 with winxp sp2

Last post 07-15-2009 9:28 PM by father_time. 8 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (9 items)

Sort Posts:

  • 06-26-2009, 6:33 AM

    • chanshuk
    • Not Ranked
    • Joined on 06-26-2009, 10:20 AM
    • Posts 6

    enable server side includes in iis5.1 with winxp sp2

    Hi All,

    New over here, Finding answer on how to enable server side includes in iis5.1.

    i m using winxp pro sp2 and i have a site with .shtml extension on pages which includes "server side includes" but doesn't display the contents when browsed with "localhost".

    shows following error in spot of include page content-------------------------

    HTTP/1.1 404 Object Not Found Server: Microsoft-IIS/5.1 Date: Fri, 26 Jun 2009 10:29:20 GMT Connection: close Content-Type: text/html

    404 Object Not Found

     ----------------------------------------

    hope to have an answer here.

    Thanks in advance....

  • 06-27-2009, 12:32 AM In reply to

    Re: enable server side includes in iis5.1 with winxp sp2

    Hi chanshuk,

     

    try this :

    Open your IIS >> right click on web site in question >> Properties >> Home Directory >> Configuration >> Add >> in front of Executable enter path = C:\windows\system32\inetsvr\ssinc.dll >> in front of Extension enter .shtm >> Ok

    Repeat these steps and add extension .shtml with same executable  C:\windows\system32\inetsvr\ssinc.dll

     Hope this helps you :)

     

  • 06-29-2009, 4:23 AM In reply to

    • chanshuk
    • Not Ranked
    • Joined on 06-26-2009, 10:20 AM
    • Posts 6

    Re: enable server side includes in iis5.1 with winxp sp2

    Hi Gabriel_EUK,

    thanx for reply.

    both the extensions already exists at extension mapping with same information you've replied. I edited once again both of them but  :(    same results....

    let me know if you have any other idea to activate.

    waiting 4 reply...

  • 07-01-2009, 1:58 AM In reply to

    • chanshuk
    • Not Ranked
    • Joined on 06-26-2009, 10:20 AM
    • Posts 6

    Re: enable server side includes in iis5.1 with winxp sp2

    Hi

    I am searching for solution to this like Crazy plz... help..

    I can post the code I am working with if one is ready to check and let me know whether I am doing wrong at there.

    Anticipating answer .......Thanks in advance...

     

  • 07-01-2009, 6:27 AM In reply to

    Re: enable server side includes in iis5.1 with winxp sp2

    Hi,

    Could you post the minimum code sample here? 

    Below is an article about server side includes, for your reference:

    IIS Server-Side Include Directives
    http://msdn.microsoft.com/en-us/library/ms525185.aspx

    Leo Tang
    Microsoft Online Community Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • 07-01-2009, 9:40 AM In reply to

    • chanshuk
    • Not Ranked
    • Joined on 06-26-2009, 10:20 AM
    • Posts 6

    Re: enable server side includes in iis5.1 with winxp sp2

    Thanks for reply…

    I read the article, its about what is SSI and SSI Functions.

    I am working on Win XP SP2… with IIS 5.1 and I want to use it to test a site (containing server side includes) locally before uploading.

    For example I’ve 2 Files

    1. test.shtml (file that needs be run, having INCLUDES code)
    2. ssitest.txt (file that I want to include in “test.shtml” file)

    Code for “test.shtml”

    -----------------------start-----------------------------
    <HTML>
    <HEAD>
    <TITLE>SSI Test</TITLE>
    </HEAD>
    <BODY BGCOLOR="#000000" TEXT="#FFFFFF">
    <p>&nbsp;</p>
    <p>There Should be a Sentence Below This Line To Confirm Working of SSI</p>
    <!--#include virtual="ssi-test.txt" -->
    </BODY>
    </HTML>
    -----------------------end-----------------------------

    Code for “ssitest.txt”
    -----------------------start-----------------------------
    <h1> Your SSI Configuration Worked….. </h1>
    -----------------------end----------------------------

    Both files are in same folder "c:\inetpub\wwwroot\ssi" & 
    I run "http://localhost/ssi/test.shtml"

    I’ve also mapped the extensions .html  & .shtml to ssinc.dll

    This files when uploaded to web-server works fine.. but gives Following error when tried locally

    ----

    HTTP/1.1 404 Object Not Found Server: Microsoft-IIS/5.1 Date: Wed, 01 Jul 2009 13:23:51 GMT X-Powered-By: ASP.NET Connection: close Content-Type: text/html

    404 Object Not Found

    ----

    Will wait for your reply

    Thanks once agin for your time

  • 07-01-2009, 10:13 PM In reply to

    Re: enable server side includes in iis5.1 with winxp sp2

    Hi,

    <!--#include virtual="ssi-test.txt" -->

    I assume your website’s home directory is c:\inetpub\wwwroot. If you specify the virtual path type, then the file name must be a full virtual path from a virtual directory of your Web site. Hence , the statement looks like
    <!--#include virtual="/ssi/ssi-test.txt" -->

    For more information about the path type, please refer to:
    #include
    http://msdn.microsoft.com/en-us/library/ms525940.aspx

    Leo Tang
    Microsoft Online Community Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • 07-02-2009, 8:19 AM In reply to

    • chanshuk
    • Not Ranked
    • Joined on 06-26-2009, 10:20 AM
    • Posts 6

    Re: enable server side includes in iis5.1 with winxp sp2

    So,..Finally it works - Thanks to you Leo Tang - MSFT

    But still I have 2 questions, if you answer them also...

    1. which one would be a better option if I want to put the site on web (hosting with Linux-Apache) after testing it locally (on IIS---thanks to you) ?

    "include virtual" or "include file"

    2. when i uploaded the folder with "include virtual" (as previous) on domain host running with "Apache" it worked fine. Does INCLUDE Directives work different for both IIS and Apache?

    Thanks a lot once again...

     

  • 07-15-2009, 9:28 PM In reply to

    Re: enable server side includes in iis5.1 with winxp sp2

     Just in case anybody else is having this issue, mine was related to C:\WINDOWS\system32\inetsrv\urlscan\UrlScan.ini being set to block .shtml files.  So if you're having this issue that is another thing to check.

Page 1 of 1 (9 items)
Microsoft Communities