« Previous Next »

Thread: .shtml / server side includes

Last post 08-21-2008 3:52 PM by harminder_rai. 12 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (13 items)

Sort Posts:

  • 11-08-2007, 8:26 AM

    .shtml / server side includes

    I installed the SSI Role, but server side includes don't seem to work. Is there something that needs to be done in the configuration of an individual site to enable SSI?

    Thanks,

    John

  • 11-08-2007, 9:30 AM In reply to

    Re: .shtml / server side includes

    What does "don't seem to work" mean?  Have you done a trace on this?

    Jeff

    Look for Wrox's new book Professional IIS 7 in your local bookstore, or order now at Amazon.com
  • 11-08-2007, 10:03 AM In reply to

    Re: .shtml / server side includes

    LOL, Ya, I guess I could have been a bit more clear--basically the pages display, but the included content doesn't.

    I set the trace for errors, the only thing recorded for viewing the page is this:

    Site 15
    Process 4752
    Failure Reason STATUS_CODE
    Trigger Status 304
    Final Status 200
    Time Taken 16 msec

    Url http://new.domain.com:80/
    App Pool domain.com
    Authentication anonymous
    User from token NT AUTHORITY\IUSR
    Activity ID {00000000-0000-0000-5C08-0080000000AE}

    Thanks for taking your time with this, let me know what other information you need.

     JK

  • 11-14-2007, 10:48 AM In reply to

    • sdeliasr
    • Not Ranked
    • Joined on 11-14-2007, 3:23 PM
    • Posts 4

    Re: .shtml / server side includes

    I'm having basically the same problem -- I'm trying to use SSI and am finding that the include statement is being treated as a comment.  I can see it in "View Source" intact, the same as in the source file.

     I've tried this under WinXP Pro and Windows Server 2003.  Under the latter, I went into "Web Service Extensions" and allowed SSI.

    Under IIS, the virtual directory is taking the defaults that shows that the .shtml file extension points to the ssinc.dll

    I know that this works with ASP pages, but I need to get it to work with .html as the main page that is including a .shtml file.

    I can send/show the sample code I'm using if that would help.

     I've been googling and searching this issue like crazy and still haven't found anything close to explaining this.

     Thanks in advance!

    Steve Delia

     

  • 11-14-2007, 11:15 AM In reply to

    Re: .shtml / server side includes

    I'm sure glad to hear I'm not the only one having this problem. Misery enjoys company? Well, hopefully someone will have found a solution to this and post it here.

    John

  • 11-14-2007, 12:42 PM In reply to

    • anilr
    • Top 10 Contributor
    • Joined on 05-23-2006, 6:13 PM
    • Redmond, WA
    • Posts 2,247

    Re: .shtml / server side includes

    .html is not mapped to ServerSideInclude module but to StaticFileModule - you will need to map .html to ServerSideInclude module if you want include directives in there to be honored.

    Anil Ruia
    Senior Software Design Engineer
    IIS Core Server
  • 11-14-2007, 1:47 PM In reply to

    Re: .shtml / server side includes

    Thanks Anil,

     For those of us that are more IIS challenged, could you please explain how to do this.

    Thanks again,

    John

  • 11-14-2007, 5:30 PM In reply to

    • sdeliasr
    • Not Ranked
    • Joined on 11-14-2007, 3:23 PM
    • Posts 4

    Re: .shtml / server side includes

    Also, I'm not working in IIS7 -- I'm working in 6 & 5.

    Does the StaticFileModule apply to those versions?

     I'll repost on the other forums just in case.

     Thanks,

    Steve

     

  • 11-14-2007, 8:00 PM In reply to

    • anilr
    • Top 10 Contributor
    • Joined on 05-23-2006, 6:13 PM
    • Redmond, WA
    • Posts 2,247

    Re: .shtml / server side includes

    Please post IIS6 questions in the IIS6 forums in the future.

    On IIS6 also, .htm/.html go to the static-file handler - if you want server-side include functionality for it, you need to map it ssinc.dll (the same that .shtml is mapped to) - I do not have a IIS6 install handy, but there is a UI to configure scriptmappings somewhere

    On IIS7, just use the following command

    %windir%\system32\inetsrv\appcmd.exe set config -section:handlers -+[name='SSINC-htm',path='*.htm',verb='GET,POST',modules='ServerSideIncludeModule',resourceType='File']

    %windir%\system32\inetsrv\appcmd.exe set config -section:handlers -+[name='SSINC-html',path='*.html',verb='GET,POST',modules='ServerSideIncludeModule',resourceType='File']

    the same can be accomplished from the handlers UI

    Anil Ruia
    Senior Software Design Engineer
    IIS Core Server
  • 11-14-2007, 9:47 PM In reply to

    Re: .shtml / server side includes

    Thank you, thank you, thank you.

     John

  • 08-21-2008, 8:17 AM In reply to

    Re: .shtml / server side includes

    HI Anilr

    I have been all over google and your article seems to be most relevant. Here is my situation

    Platform is Windows 2003 server, and IIS6

    a) Application mappings are done for .shtml, shtm to C:\WINDOWS\system32\inetsrv\ssinc.dll Verbs are GET, POST

    b) Web Service Extension is IIS 6 is set to allow Server Side Inclues

    c) I have aslo mapped .html to C:\WINDOWS\system32\inetsrv\ssinc.dll with verbs GET and POST

    When try browse the pages .shtml ( server sitde includes ) it gives me message Page not found.

     Can you  please help me

    Sincerly

    Harminder 

     

  • 08-21-2008, 1:48 PM In reply to

    • anilr
    • Top 10 Contributor
    • Joined on 05-23-2006, 6:13 PM
    • Redmond, WA
    • Posts 2,247

    Re: .shtml / server side includes

    This forum is for IIS7 questions.

    What is the sub-status and win32 error code in the IIS log file.

    Anil Ruia
    Senior Software Design Engineer
    IIS Core Server
  • 08-21-2008, 3:52 PM In reply to

    Re: .shtml / server side includes

    Hi,

     Our Admin had URLSCAN that disallowed .shtml. Well it is working now.

Page 1 of 1 (13 items)