« Previous Next »

Thread: Server.CreateObject http 500 internal error

Last post 03-02-2009 9:42 PM by Leo Tang - MSFT. 2 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (3 items)

Sort Posts:

  • 02-24-2009, 9:19 AM

    • dm78741
    • Not Ranked
    • Joined on 02-24-2009, 2:09 PM
    • Posts 1

    Server.CreateObject http 500 internal error

    This is a basic createa text file problem. I used another path to avoid the vista user account permissions as opposed to the wwwroot file, it worked fine with another file "FirstFile.asp" from the book "ASP programming for the absolute beginner". As a beginner, I had to ask... been trying different things for a long time without actually digging to far into IIS programming... please help...

    here's the code for the "SecondFile.asp"

    <html>
    <title>Working with the File Object</title>
    <body>
    <b>A second example of working with the File object!</b>
    <hr>

    <%
    set TestFile=Server.CreateObject("Scripting.FileSystemObject")
    set TFileStream=TestFile.CreateTextFile("c:\Dfiles\docs\
    Test2File.txt")
    TFileStream.WriteLine "Welcome to the File Object in ASP!"
    TFileStream.WriteBlankLines(3)
    TFileStream.WriteLine "Between this line and the opening line are
    three blank lines. These blank lines were inserted using the
    WriteLine method of the TextStream object. Now, let's write three
    more blank lines before the next section of text is inserted."
    TFileStream.WriteBlankLines(3)
    TFileStream.WriteLine "Okay, that's better--three more blank lines
    have just been inserted! I think you probably get the idea of how to
    use the WriteLine method, so let's move on to more interesting things."
    TFileStream.Close
    %>
    </body>
    </html>

  • 02-28-2009, 7:44 PM In reply to

    Re: Server.CreateObject http 500 internal error

    Sounds like a folder security issue, I would enable auditing and see what comes up in the security event log.

    http://weblogs.asp.net/steveschofield/archive/2008/03/07/detecting-permission-issues-using-auditing-and-process-monitor.aspx

    Steve Schofield
    Windows Server MVP - IIS
    http://weblogs.asp.net/steveschofield


    http://www.IISLogs.com
    Log archival solution
    Install, Configure, Forget
  • 03-02-2009, 9:42 PM In reply to

    Re: Server.CreateObject http 500 internal error

    Hi

    You should check the account run ASP code have write permission on the folder. If you did not disable the Anonymous Authentication(IIS Manager->Your web site->Authentication), the account run ASP code is IUSR(by default).  You need grant IUSR account write permission on C:Dfiles\docs .

    Also, you can do the following steps to show more detailed error message.  This is benefit for you to debug ASP page.

    -Disable the Show friendly HTTP error messages(IE->Tools->Internet Options->Advanced->uncheck the Show friendly HTTP error messages)

    -Enable Send Errors To Browser feature(IIS Manager->Click your web site->Click ASP icon on the right panel->Expand Debugging Properties->Set the Send Errors To Browser as True )

    Leo Tang
    Microsoft Online Community Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Page 1 of 1 (3 items)
Microsoft Communities