Windows 2003 IIS 6 won't run my Win 2000 IIS 5 code!!


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 13 of 13

Thread: Windows 2003 IIS 6 won't run my Win 2000 IIS 5 code!!

Threaded View

  1. #1
    Join Date
    Jun 2005
    Posts
    13

    Windows 2003 IIS 6 won't run my Win 2000 IIS 5 code!!

    I have some web pages that were hand coded in basic ASP and developed on a IIS 5 Server under Windows 2000. I need to migrate to a new server running Windows 2003 Server with IIS 6.

    Now, part of my code refuses to work. I have sat with the Network Admin + DB guy for a couple of hours trying to get this to resolved.
    Most of the code still works fine and talks to the SQL Server database and pulls table data, no problem. But if I try to download or upload anything (other than simple text from tables), I get a HTTP 500 - Internal server error
    Even with detailed error reporting turned on in IIS, that is all I see, so this complicates debugging the problem.
    When sitting with the Net Admin+DB guy, he loaded the code into Dreamweaver to debug and we saw a write to file failed error generate. So that is what the problem is. The code I use is standard code I see in all of the examples on doing this sort of thing, but it just refuses to work. We have given the IUSR and IWAN accounts full access to all folders that they might need to access, still to no avail. One guy I spoke with mentioned something about it being a COM read/create permission issue, but I do not know where I would grant that specific access if that is the case. All NTFS permissions I know of are set to grant access and all IIS settings on the new server are identical to those on the older (working) server.
    Basically, I am totally lost and my project is starting to fall behind because of this issue (the old server cannot transfer 50+ MB files due to RAM issues). I need to get his resolved as soon as possible. The only solution I have come up with so far is to tell the company to buy a new server and install Windows 2000 + IIS 5 on it to run my app. Obviously, I would rather just get this to work on the 2003 machines as it is bound to be a simple fix I am simply unaware of.
    Any ideas?

    Here is the code: (Code grabs the document from the DB -digitalLocation from the Location Table - based on the composite key of docid and versionNumber - both of which are supplied in the URL Address string)
    Example address string:
    http://xxx.xxx.xxx.xxx/xxxx/doc.asp?id=1&version=1

    <!-- #include File="connection.asp" -->
    <!-- METADATA TYPE="typelib" FILE="c:\program files\common files\system\ado\msado15.dll"-->

    <%
    Dim id
    id = Request.QueryString("id")
    version = Request.QueryString("version")
    Dim rs
    Set rs = CreateObject("ADODB.Recordset")
    rs.Open "SELECT * FROM Location WHERE docid = " & id & " AND versionNumber = " & version, cn
    If Not rs.EOF Then
    Dim stm
    Set stm = CreateObject("ADODB.Stream")
    stm.Type = adTypeBinary
    stm.Open
    stm.Write rs("digitalLocation")
    Dim filename
    filename = Server.MapPath("/images") & "\" & rs("docname")
    stm.SaveToFile filename, adSaveCreateOverWrite
    Response.Write "<script language=javascript>location.replace('/images/" & rs("docname") & "');</script>"
    End If
    set id = NOTHING
    set version = NOTHING
    set rs = NOTHING
    set stm = NOTHING
    set filename = NOTHING
    set cn = NOTHING
    %>

    BTW - this is all normal non-.NET ASP code. (I'm sure the new server can handle .NET stuff, but I don't know what the differences are with .NET as I have not played with .NET)
    Last edited by Razarr69; 06-24-2005 at 01:12 PM. Reason: left out the code in question

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center