« Previous Next »

Thread: #include incompability from ii6 to II7

Last post 10-26-2009 8:48 AM by msncenter. 4 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (5 items)

Sort Posts:

  • 10-22-2009, 7:15 AM

    • msncenter
    • Not Ranked
    • Joined on 10-22-2009, 11:13 AM
    • Posts 3

    #include incompability from ii6 to II7

    Hi, I am migrating a site from II6 to II7.

    The site is setup like this: Physical folders:

    e:\CSharp

    e:\Site

    e:\Site\root

    Now, in IIS, the root of the site points to "e:\Site\root" and in there is one virtual application "toto" which points to "E:\Site"

    Now in my CSharp folder there is

    "E:\Csharp\tutu.cs" and in Site there is :

    "E:\Site\tata.aspx"

    in tata.aspx there is the line:

    <!-- #include file="../CSharp/tutu.cs" -->

    This works fine in II6, but in IIS7 I have an error: "

    Can not find: E:\Site\root\Csharp\tutu.cs".

    Is there a way to fix the configuration in IIS7 so that the #include file= directive works again? Than you for your help

  • 10-23-2009, 9:32 AM In reply to

    Re: #include incompability from ii6 to II7

    In ASP.NET you normally wouldn't use an include, you'd use a user control.  Beyond that would be the obvious possible issue with permission settings, the ASP.NET process account needs access to the folder.  Plus the fact that you're trying to use a relative URL that navigates above the site root level.

    Jeff

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

    • msncenter
    • Not Ranked
    • Joined on 10-22-2009, 11:13 AM
    • Posts 3

    Re: #include incompability from ii6 to II7

     Hi,

    Thank you for your post, but this does not answer the question.

    The feature is working perfectly fine on iis6. This is not a security or coding issue. This is the behavior of the #include directive.

    I would like to know if it is possible to restore the old behavior on iis7?

     

  • 10-26-2009, 5:10 AM In reply to

    Re: #include incompability from ii6 to II7

    Hi,

    msncenter:

    Now, in IIS, the root of the site points to "e:\Site\root" and in there is one virtual application "toto" which points to "E:\Site"

    You can points the root of the site to "e:\Site", then request the "tata.aspx" in the site root to test again.

    Additionally, this is strongly discouraged because it is a security risk.

    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.
  • 10-26-2009, 8:48 AM In reply to

    • msncenter
    • Not Ranked
    • Joined on 10-22-2009, 11:13 AM
    • Posts 3

    Re: #include incompability from ii6 to II7

     Hi,

     

    Pointing the site root to "E:\Site" will not help, because "Csharp" is still beyond.

    Then, once again, this is not a security problem (by the way, where is risk!!? This config guarantees that only explicit virtual directories are accessible. ) this is a behavior problem in IIS, which I have only with II7 + dotnet2.

    The question is: is there a way to have IIS7 behave like IIS6 regarding SSI ?

     Thank you for your help

Page 1 of 1 (5 items)
Microsoft Communities