My SharePoint Blog

Blogs On SharePoint Technologies


Search Site


My SharePoint Blog recommends any of the following books...


Recent comments

Tags

Don't show

    Categories


    Disclaimer

    The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

    © Copyright 2008

    Run regular script (asp, aspx, php, etc.) on your SharePoint site

    There are times when you want to run regular code on your SharePoint server. The SharePoint site runs through a ISAPI filter that intercepts all traffic to the particular port a SharePoint site is located. The filter then works it magic on the request and send it back to IIS for shipping. This presents a problem when you want to run classic ASP, ASPX, PHP or any other scripting language. This tutorial will walk you through the steps to get your SharePoint site to play nice with your scripting code.

    1. On the server create a folder (example: "c:\non_sp_code"). This will be where your non-SharePoint code will call home. Create hello_world.asp (or whatever) file here.
    2. From IIS manager right click your SharePoint site > New > Virtual Directory.
    3. Complete the Virtual Directory Creation Wizard (this is where your code will live virtually).
      1. Virtual Directory Alias = "My_New_Virtual_Directory"
      2. Web Site Content Directory = "c:\non_sp_code"
      3. Fill out the rest of the wizard as appropriate.
    4. Go to Start > All Programs > Administrative Tools > SharePoint Central Administration.
    5. Select "Configure virtual server settings" > "Default Web site" > "Define managed paths"
    6. In the "Add a New Path" Section at the bottom of the page, type the virtual path such as "/My_New_Virtual_Directory".
    7. Select the "Excluded path" radio button and click Ok.
    8. To test go to http://www.mydomain.com/My_New_Vitual_Directory/hello_world.asp.

    Basically what you have told the SharePoint ISAPI NOT to process this directory and allow IIS to handle the files with the appropriate Web Service Extension handler. Note: You may have to enable the particular Web Service Extension from the IIS snap in > Web Service Extensions > Active Server Pages (for classic ASP code) > Allow.


    Categories: SharePoint
    Posted by Kevin on Thursday, March 23, 2006 9:03 AM
    Permalink | Comments (0) | Post RSSRSS comment feed

    Add comment


     

    [b][/b] - [i][/i] - [u][/u]- [quote][/quote]



    Live preview

    Friday, November 21, 2008 2:04 AM