How to 'INCLUDE' an ASP file?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • memento

    How to 'INCLUDE' an ASP file?

    Hello,
    How to include file into an ASP program? I was trying with this command:

    <!-#include file="INC_file. asp" ->

    but unfortunately it does not work :(

    There isn't any error message. IIS server shows primary site, but without
    informations from incuded file.

    How can I make it works?

    With the best Regards,
    MEMENTO

    :)


  • McKirahan

    #2
    Re: How to 'INCLUDE' an ASP file?

    "memento" <memento-pl@gazeta.pl> wrote in message
    news:dkof97$jon $1@inews.gazeta .pl...[color=blue]
    > Hello,
    > How to include file into an ASP program? I was trying with this command:
    >
    > <!-#include file="INC_file. asp" ->[/color]

    Use double dashes:

    <!-- #include file="INC_file. asp" -->


    Comment

    • KeepTrackOfIt.com

      #3
      Re: How to 'INCLUDE' an ASP file?

      And you can use include files also

      <!-- #include virtual="header .inc" -->

      ---
      http://www.KeepTrackOfIt.com - Find the lowest gas prices in your area
      graphically

      Comment

      • middletree

        #4
        Re: How to 'INCLUDE' an ASP file?

        The problem was with the lack of a double hyphen, not this. But for the
        record, there is no advantage to using a .inc extension, and plenty of
        disadvantages. The main one is security. A person who's up to no good can
        figure out the name of the .inc file, and then download it and read the
        text. With an asp extension, this cannot be done.

        Believe it or not, I've actually seen an application which had the database
        login info, including password, in an include file with a .inc extension.



        "KeepTrackOfIt. com" <info@keeptrack ofit.com> wrote in message
        news:1131415070 .591215.200080@ g44g2000cwa.goo glegroups.com.. .[color=blue]
        > And you can use include files also
        >
        > <!-- #include virtual="header .inc" -->
        >
        > ---
        > http://www.KeepTrackOfIt.com - Find the lowest gas prices in your area
        > graphically
        >[/color]


        Comment

        • M P

          #5
          Re: How to 'INCLUDE' an ASP file?

          Is this true? Does include file be seen on the browser cache? How do you see
          these files?

          "middletree " <middletree@ver ywarmmail.com> wrote in message
          news:%23zcxFwG5 FHA.2192@TK2MSF TNGP14.phx.gbl. ..[color=blue]
          > The problem was with the lack of a double hyphen, not this. But for the
          > record, there is no advantage to using a .inc extension, and plenty of
          > disadvantages. The main one is security. A person who's up to no good can
          > figure out the name of the .inc file, and then download it and read the
          > text. With an asp extension, this cannot be done.
          >
          > Believe it or not, I've actually seen an application which had the
          > database login info, including password, in an include file with a .inc
          > extension.
          >
          >
          >
          > "KeepTrackOfIt. com" <info@keeptrack ofit.com> wrote in message
          > news:1131415070 .591215.200080@ g44g2000cwa.goo glegroups.com.. .[color=green]
          >> And you can use include files also
          >>
          >> <!-- #include virtual="header .inc" -->
          >>
          >> ---
          >> http://www.KeepTrackOfIt.com - Find the lowest gas prices in your area
          >> graphically
          >>[/color]
          >
          >[/color]


          Comment

          • KeepTrackOfIt.com

            #6
            Re: How to 'INCLUDE' an ASP file?

            I've never seen them in a browser cache, but middletree is right. I
            didn't recommend it, I was just saying it was an option.

            More info here:

            W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.


            ---
            http://www.KeepTrackOfIt.com - Find the lowest gas prices in your area
            graphically

            Comment

            • Patrice

              #7
              Re: How to 'INCLUDE' an ASP file?

              What middletree meant IMO is that if you take an improper name for an
              include file such as "tools.txt" then someone trying this URL would get the
              file... As ASP files are processed it offers quite a kind of protection (for
              example a .asp include file that contains only functions and subs would just
              produce an empty HTML page client side when served).

              --
              Patrice

              "M P" <mark@textguru. ph> a écrit dans le message de
              news:%23fceA2N5 FHA.1248@TK2MSF TNGP14.phx.gbl. ..[color=blue]
              > Is this true? Does include file be seen on the browser cache? How do you[/color]
              see[color=blue]
              > these files?
              >
              > "middletree " <middletree@ver ywarmmail.com> wrote in message
              > news:%23zcxFwG5 FHA.2192@TK2MSF TNGP14.phx.gbl. ..[color=green]
              > > The problem was with the lack of a double hyphen, not this. But for the
              > > record, there is no advantage to using a .inc extension, and plenty of
              > > disadvantages. The main one is security. A person who's up to no good[/color][/color]
              can[color=blue][color=green]
              > > figure out the name of the .inc file, and then download it and read the
              > > text. With an asp extension, this cannot be done.
              > >
              > > Believe it or not, I've actually seen an application which had the
              > > database login info, including password, in an include file with a .inc
              > > extension.
              > >
              > >
              > >
              > > "KeepTrackOfIt. com" <info@keeptrack ofit.com> wrote in message
              > > news:1131415070 .591215.200080@ g44g2000cwa.goo glegroups.com.. .[color=darkred]
              > >> And you can use include files also
              > >>
              > >> <!-- #include virtual="header .inc" -->
              > >>
              > >> ---
              > >> http://www.KeepTrackOfIt.com - Find the lowest gas prices in your area
              > >> graphically
              > >>[/color]
              > >
              > >[/color]
              >
              >[/color]


              Comment

              • Bob Barrows [MVP]

                #8
                Re: How to 'INCLUDE' an ASP file?

                You misunderstood his point. Server-side includes (SSI) will never show up
                in a browser cache. Only client-side includes:
                <script src="...">

                What he is saying is, that if you use an easily-guessable name for your
                include file, say: scriptlibrary.i nc somebody will be able to browse to it
                by typing its address in the browser's address bar. Since the inc extension
                is not mapped to be executable (by default, this is configurable), the text
                in the page will be shown in the browser. Try it with your own inc file. By
                changing the inc extension to asp, you prevent this: when the file is
                browsed to, it is executed, not displayed.

                Bob Barrows

                M P wrote:[color=blue]
                > Is this true? Does include file be seen on the browser cache? How do
                > you see these files?
                >
                > "middletree " <middletree@ver ywarmmail.com> wrote in message
                > news:%23zcxFwG5 FHA.2192@TK2MSF TNGP14.phx.gbl. ..[color=green]
                >> The problem was with the lack of a double hyphen, not this. But for
                >> the record, there is no advantage to using a .inc extension, and
                >> plenty of disadvantages. The main one is security. A person who's up
                >> to no good can figure out the name of the .inc file, and then
                >> download it and read the text. With an asp extension, this cannot be
                >> done. Believe it or not, I've actually seen an application which had the
                >> database login info, including password, in an include file with a
                >> .inc extension.
                >>
                >>
                >>
                >> "KeepTrackOfIt. com" <info@keeptrack ofit.com> wrote in message
                >> news:1131415070 .591215.200080@ g44g2000cwa.goo glegroups.com.. .[color=darkred]
                >>> And you can use include files also
                >>>
                >>> <!-- #include virtual="header .inc" -->
                >>>
                >>> ---
                >>> http://www.KeepTrackOfIt.com - Find the lowest gas prices in your
                >>> area graphically[/color][/color][/color]

                --
                Microsoft MVP - ASP/ASP.NET
                Please reply to the newsgroup. This email account is my spam trap so I
                don't check it very often. If you must reply off-line, then remove the
                "NO SPAM"


                Comment

                • Kyle Peterson

                  #9
                  Re: How to 'INCLUDE' an ASP file?




                  "memento" <memento-pl@gazeta.pl> wrote in message
                  news:dkof97$jon $1@inews.gazeta .pl...[color=blue]
                  > Hello,
                  > How to include file into an ASP program? I was trying with this command:
                  >
                  > <!-#include file="INC_file. asp" ->
                  >
                  > but unfortunately it does not work :(
                  >
                  > There isn't any error message. IIS server shows primary site, but without
                  > informations from incuded file.
                  >
                  > How can I make it works?
                  >
                  > With the best Regards,
                  > MEMENTO
                  >
                  > :)
                  >
                  >[/color]


                  Comment

                  Working...