#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    61
    Rep Power
    11

    IIS not able to run functions and classes from ASP file


    Hi there,

    I am having some problems when running ASP files that contain functions and classes in IIS..... this is not a problem when i upload to the webserver tho...... does anyone know why this happens and how to correct it??...... i am running windows XP and IIS 5.1 with no configuration changes that i have done to the system... if anyone could help me with this it would be greatly apprecicated.....

    thanx for your time in advance....
  2. #2
  3. No Profile Picture
    Stumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,409
    Rep Power
    4538
    Does other server-side script execute properly? Do you get any errors?
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    61
    Rep Power
    11
    Yes it does... i have created ASP pages before with just normal pages and no functions and classes and it works just fine..... it just doesn't work when i create functions and classes in ASP.... thanx for your time
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2002
    Location
    Southeast Asian Tropics
    Posts
    3
    Rep Power
    0

    Default Language


    What scripting language are you coding your classes and functions in? The default for IIS is VBScript, not JavaScript or JScript.. You will have to check the settings in IIS under the configuration area in order to specify the settings differently, or explicitly declare the script you are using with asp directives.

    Switch to ASP.NET. You're better off.
  8. #5
  9. No Profile Picture
    Stumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,409
    Rep Power
    4538
    Post some code and maybe some clues will become visible.
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    61
    Rep Power
    11
    Well heres some sample code that i tried to use tokens with.... just a simple replacement on an HTML template file.... no errors whatsoever... just that the file will not load on IIS.... just seems to hang when trying to run... the status bar in IE just stays on the same place and not move at all....

    PHP Code:
    <%
    '---  ---
    index.asp
    '------  ----
    option explicit
    %>

    <%
    '
    Declare our variables
    dim g_oPageGen
    'Cerate the class object
    set g_oPageGen = New parseTMPL
    '
    Set the template file
    g_oPageGen
    .TemplateFile "template.html"
    'Add some custom tags to the dictionary
    g_oPageGen.AddToken "title", "Template Example"
    g_oPageGen.AddToken "copyright", "This is mine! All mine!"
    g_oPageGen.AddToken "quote", """Tell Jabba I'
    ve got his money!""<br>--Han SoloStar Wars 1977"
    g_oPageGen.AddToken "
    menu", "Home Page<br>News Page<br>Link Page"
    g_oPageGen.AddToken "
    content", "Welcome To My Home Page... Yadda Yadda Yadda!"
    'Generate the page
    g_oPageGen.GenerateHTML
    'Destroy our objects
    set g_oPageGen = nothing
    %> 
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    61
    Rep Power
    11
    sorry guys.... this is an update of the situation.... after much headbanging and frustration.... i have narrowed this down to the use of tokens.... classes and functions does work..... but tokens will not (i.e. HTML template keyword replacements) work on IIS only on the web server..... any ideas??? cos i sure am out of them
  14. #8
  15. No Profile Picture
    Stumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,409
    Rep Power
    4538
    set g_oPageGen = New parseTMPL
    The syntax in asp if parseTMPL is an activex should be

    set g_oPageGen = Server.CreateObject(<progid>.parseTMPL)

    Otherwise, I assume parseTMPL is a VBS class defined somewhere else on the page you snipped this code from.

    Is your code from this tutorial?

    http://www.4guysfromrolla.com/webtech/091300-1.2.shtml
  16. #9
  17. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    61
    Rep Power
    11
    yes it is........ the token tutorials that i took are from 4guysfromrolla...... you had any experience with dealing with the idea behind it??...... cos i've been doing it with PHP and it works really great...... now i have a project with ASP and i wanna try it out using that concept in ASP...... did you get the particular program to work on IIS???
  18. #10
  19. No Profile Picture
    Stumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,409
    Rep Power
    4538
    I haven't tried this one. I don't see the include file statement in your code to include the class file page.
  20. #11
  21. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    61
    Rep Power
    11
    yeah......... i accidentally erased it when i cut and pasted it on the forum......... but i been playing with the script that was given from the tutorial.... nothing changed at all

IMN logo majestic logo threadwatch logo seochat tools logo