ASP Woes in Vista

apu95

Caffeine-->Code Converter
Joined
25 Apr 2002
Messages
502
We're starting ASP in school, and the computers are running WinXP Pro (which I think comes with IIS 6). Anyways, we're playing around with opening and writing to text files, so I wrote this piece of code:
Code:
<% Option Explicit %>

<html>

<head>
    <title>
        Text Data Files
    </title>
</head>

<body>

    <h3>Writing to a text data file...</h3>
    
    <%
        dim FileObj, FileOpen, strTempo
        
        Set FileObj = CreateObject("Scripting.FileSystemObject")
        Set FileOpen = FileObj.opentextfile("c:\inetpub\wwwroot\data.txt",2)
        
        FileOpen.Writeline "Line 1"
        FileOpen.Writeline "Line 2"
        FileOpen.Writeline "Line 3"
        
        FileOpen.Close
        
    %>
    
    <h3>Reading from a text data file...</h3>
    
    <%
        Set FileOpen = FileObj.opentextfile("c:\inetpub\wwwroot\data.txt",1)
        
        while not FileOpen.atendofline
            response.write("<br>")
            strTempo = FileOpen.readline
            response.write(strTempo)
        wend
        
        FileOpen.close
                
    %>
    
</body>
</html>

Now, I'm trying to run it on my laptop, and it doesn't work! I have the data.txt file in the appropriate folder, but it keeps giving a HTTP 500 error. I got it to run fine on the WinXP computers, but not on my own. My guess is that there's some weird incompatibility with IIS 7 that comes with Vista...

Any ideas?
 

fitz

Woah.. I'm still here?
Political Access
Joined
26 Apr 2004
Messages
4,084
Classic ASP is dead and dying.. not really sure why you are studying it in school.. but then, I know people in school still learning on Pascal/Fortran/and *shudder* scheme!

Let's start from the basics.. installing ASP in Vista -
Go to: Control Panel/Programs/Windows Features/IIS/World Wide Web Services/Application Development Features - make sure ASP is checked
Restart IIS after installing ASP

other things to check after that..
Permissions.. who has write access to the c:\inetpub\wwwroot directory?
 
Last edited:

apu95

Caffeine-->Code Converter
Joined
25 Apr 2002
Messages
502
Sorry for taking so long to reply -_-. I had to take an emergency trip home...

Anyways, thanks for replying ^_^. I'm not sure where to find this. I know that I can right click on the folder, and then I see the list of users for permissions. In said list, I saw a user called IISUSERS (or something along those lines). I put that user in Full Control, and it still didn't work...maybe I skipped a step, I'm not sure. I can't think of any other place to look other than that one.
 

Members online

No members online now.

Latest profile posts

hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.
Terrahertz wrote on Electronic Punk's profile.
Yo fellas!
Electronic Punk wrote on Sazar's profile.
Where are you buddy?
Perris Calderon wrote on Electronic Punk's profile.
Hey EP! All good with me, applying for Microsoft MVP right now, should have done this a while ago.

Notifications don't work, I only found your response by coming back to hunt up some threads, if you want, give me your email address so we can keep in touch easier!

Forum statistics

Threads
62,000
Messages
673,425
Members
5,593
Latest member
moussa021