Announcement

Collapse
No announcement yet.

ISAPI

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • ISAPI

    Does anyone have an interface or .inc file for doing ISAPI filters for Internet Information Server??


    I finally found a reason to need to write one of these but I'm not sure what the format is or how to tell IIS what procedures the DLL contains..


    Thanks,

    Scott

    -------------
    Scott
    mailto:[email protected][email protected]</A>
    MCSE, MCP+Internet
    Scott Turchin
    MCSE, MCP+I
    http://www.tngbbs.com
    ----------------------
    True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

  • #2
    Scott

    I only check these forums occasionally, so your message may well have scrolled before I see if anyone else jumps in with an answer.

    I can't help you with a PB solution, but I have developed several ISAPI filters using Delphi, and have written a couple of articles that you can refer to online that explain the process. It should be a fairly straightforward process to translate them into PB. Here are the links to the articles:

    www.avdf.com/gcgi/mfs/090000/mar97/delf_isapifil.html

    www.avdf.com/gcgi/mfs/090000/aug98/art_ot001.html

    I seem to recall that there was an include file with all the ISAPI definitions floating around somewhere -- have a hunt around.

    Cheers

    -- Jim


    [This message has been edited by Jim Karabatsos (edited June 05, 2000).]

    Comment


    • #3
      Scott, a quick Altavista search turned up this by Edward Blake: http://www.basicguru.com/pbsound-hq/fdb115.html . It's not for a filter, but for an extension; it may be helpful anyway when combined with MSDN docs on ISAPI. Also, it's not complete, but it's a good beginning.

      I picked up this book at a local store for $4.50, but haven't had the chance to read it yet: http://www.amazon.com/exec/obidos/AS...074544-6779847 (Inside ISAPI); a couple of online stores have it for under $13.00: http://www.bestbookbuys.com/cgi-bin/...39&search.y=16 . It's for C and C++ programmers (as are most of the books in the PowerBasic canon). The store is only about 12mi from my house, so I can check to see if they have another copy at that price (or less than the $36.00 that Amazon wants) if you like.

      ------------------
      Troy King
      [email protected]
      Troy King
      katravax at yahoo dot com

      Comment


      • #4
        Preciate the offer on the book, I'll hold out for now, but I do apprecite it!

        I'll read all of the links today at work and see what I can find out! I Think it'd be awesome to be able to interact with IIS...(It was my favorite of the MCSE tests too! LOL)...

        Thanks everyone!

        Scott

        ------------------
        Scott
        mailto:[email protected][email protected]</A>
        MCSE, MCP+Internet
        Scott Turchin
        MCSE, MCP+I
        http://www.tngbbs.com
        ----------------------
        True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

        Comment


        • #5
          It was my favorite of the MCSE tests too! LOL
          Mine too... it was the easiest. The exam didn't ask any tough questions, and the simulations were a walk in the park. In fact, I would say that the MS exams have gotten constantly easier for the past five years... which is why the MCSE/MCSD (and now the MCDBA) certifications have lost so much value. I put a lot of work into learning MS networking and beginner-level programming (which is all the MCSD tests for) and now people buy books and memorize brain dumps... and on paper look as qualified (minus the experience). And of course all the MCSE 21-year olds get jobs because they work for peanuts *grin*... and still can't troubleshoot a thing. They lower the value of our certification, and it irritates me. That's why I don't list the MCSE, MCSD, MCDBA or MCT(inactive) on my resume. I go for jobs based on knowlege and experience, and bargain for *salary* based on certifications. It's worked so far .

          ------------------
          Troy King
          [email protected]
          Troy King
          katravax at yahoo dot com

          Comment


          • #6
            PB has an isapi sample with an include. The only problem with the sample/include is that it uses a global which is a big no-no for a DLL running under IIS. IIS has a thread pool which handles web requests, which means 2+ threads could be running through your dll at the same time. So you will have to develop some sort of Thread Local Storage OR just convert it to a LOCAL structure and pass it around if needed.
            Also, you can get around the need to shutdown/restart the iisadmin service if you turn off "Cache ISAPI Apps". But be warned, the ASP session object will not work correctly with this off. (not like you can use it anyways from ISAPI)
            My personal opinion of ISAPI programming is that it should be very small and very safe. If you have any heavy work to do, it is better to use IPC(MSMQ) and do the work in a external service EXE. The main benefit is that your ISAPI app is less likely to crash and take down the entire webserver. The second benefit is that your site can scale up in performance by simply adding more computers that run the external service EXE. The counter to my opinion would be that IIS 4 & 5 now have the ability to run your DLL "in a seperate memory space" using MTS.


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

            Comment


            • #7
              PB has an isapi sample with an include.
              Where did you find it? The only one I could find at the ftp site was for an ISAPI extension rather than an ISAPI filter... It's very educational of course, but did you find a sample of a filter? After reading two chapters on filters this morning, it looks terribly simple to make a filter. I would hopefully have time to do one within the next couple of weeks. Where did you find the sample PB ISAPI filter?

              ------------------
              Troy King
              [email protected]
              Troy King
              katravax at yahoo dot com

              Comment


              • #8
                oops. I saw "ISAPI filter" but my mind said "ISAPI extension"
                I have written filters, but not in PB. It doesn't look hard to do, either. If no one else has a sample, I can write a small sample and post it in the source code forum.


                [This message has been edited by Enoch S Ceshkovsky (edited June 07, 2000).]

                Comment


                • #9
                  Enoch, That would be awesome if you have already done this and can post a sample!!


                  In fact, I would say that the MS exams have gotten constantly easier for the past five years...

                  I started mine in 96, took a break from it for a while and came back and finished the last 3 tests...

                  For a while there MCSE got everyone a job.
                  That day is gone, believe me..we don't just hire someone for the paper, you go through a rigorous screening process, in fact 6 of us sat in a room one day and pretty much grilled someone to find out what they knew about NT/IIS because it's our primary OS (Was that is) for our software....

                  I'm pretty much the lead IIS person at this point in time as well, I enjoy the job and software that I work with because it allows me to be creative in solving customer issues

                  (But I am currently looking for a new one closer to home)..

                  Scott


                  ------------------
                  Scott
                  mailto:[email protected][email protected]</A>
                  MCSE, MCP+Internet

                  [This message has been edited by Scott Turchin (edited June 07, 2000).]
                  Scott Turchin
                  MCSE, MCP+I
                  http://www.tngbbs.com
                  ----------------------
                  True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

                  Comment


                  • #10
                    (But I am currently looking for a new one closer to home)..
                    This is probably the wrong place to start this discussion, but where is home? The company I work for needs programmers desperately. Email me.

                    ------------------
                    Troy King
                    [email protected]
                    Troy King
                    katravax at yahoo dot com

                    Comment

                    Working...
                    X