Solved

I switched to a new server and now my .asp page won't work!

Posted on 2004-09-13
9
289 Views
Last Modified: 2010-04-19
I thought I was careful when I switched my info and files over... but my .asp file doesn't work on the new server.  It still works fine on the old server!  On the new one when I upload a file and run it I get:

Page cannot be displayed

HTTP 500 - Internal server error
Internet Explorer

Does anyone have any ideas?  Thanks in advance-

A few more details:  We send/upload a file with our request from Access when we call the asp file.  

Also, i just installed windows script 5.6, as per the warnings in the .asp file below.

Here is the .asp file:

<%@ Language=VBScript %>
<%Option Explicit%>
<!-- #include file="upload.asp" -->
<%

'NOTE - YOU MUST HAVE VBSCRIPT v5.0 INSTALLED ON YOUR WEB SERVER
'         FOR THIS LIBRARY TO FUNCTION CORRECTLY. YOU CAN OBTAIN IT
'         FREE FROM MICROSOFT WHEN YOU INSTALL INTERNET EXPLORER 5.0
'         OR LATER.

'Kay for getting info to insert into the database
Dim strCompany, strProperty, strConsultant
Dim strVisitdate, strCalldate, strFilename, strReport
strCompany = Request.QueryString("company")
strProperty = Request.QueryString("property")
strConsultant = Request.QueryString("consultant")
strVisitdate = Request.QueryString("visitdate")
strCalldate = Request.QueryString("calldate")
strFilename = Request.QueryString("filename")
strReport = Request.QueryString("report")

' Create the FileUploader
Dim Uploader, File
Set Uploader = New FileUploader

' This starts the upload process
Uploader.Upload()

'******************************************
' Use [FileUploader object].Form to access
' additional form variables submitted with
' the file upload(s). (used below)
'******************************************
'Response.Write "<b>Thank you for your upload " & Uploader.Form("fullname") & "</b><br>"

' Check if any files were uploaded
If Uploader.Files.Count = 0 Then
      Response.Write "File(s) not uploaded."
Else
      'Kay for insert info into the database
      Dim OBJdbConnection
      set OBJdbConnection=Server.CreateObject("ADODB.Connection")
      OBJdbConnection.Open "DSN=Advisory;"
    Dim strSQL, strFields, strValues
    If (strCompany <> "") and (strFilename <> "") _
    and (strReport <> "") Then
            strFields = "Company, FileName, ReportName"
            strValues = "'" & strCompany & "', '" & _
            strFilename & "', '" & strReport & "'"
            
            If strProperty <> "" Then
                  strFields = strFields & ", Property"
                  strValues = strValues & ", '" & _
                  strProperty & "'"
            End If
            If strConsultant <> "" Then
                  strFields = strFields & ", Consultant"
                  strValues = strValues & ", '" & _
                  strConsultant & "'"
            End If
            If strVisitdate <> "" Then
                  strFields = strFields & ", Visitdate"
                  strValues = strValues & ", '" & _
                  strVisitdate & "'"
            End If
            If strCalldate <> "" Then
                  strFields = strFields & ", Calldate"
                  strValues = strValues & ", '" & _
                  strCalldate & "'"
            End If
            strSQL = "Insert Into Reports (" & strFields & _
            ") Values (" & strValues & ")"
            OBJdbConnection.Execute(strSQL)
            'Response.Write strSQL
      Else
            Response.Write "We didn't receive the information on Company, File Name, or Report. Please verify and try again."
      End If
      
      ' Loop through the uploaded files
      For Each File In Uploader.Files.Items
            ' Save the file
            File.SaveToDisk "C:\Inetpub\wwwroot\advisory\Reports\"
            
            ' Output the file details to the browser
            Response.Write "File Uploaded: " & File.FileName & "<br>"
            Response.Write "Success!"
            'Response.Write "Size: " & File.FileSize & " bytes<br>"
            'Response.Write "Type: " & File.ContentType & "<br><br>"
      Next
End If

%>
0
Comment
Question by:wilbur88
  • 4
  • 4
9 Comments
 
LVL 10

Expert Comment

by:jhautani
ID: 12051633
Have you installed or manually registered with regsvr32 the Uploader object?
0
 
LVL 1

Expert Comment

by:ChrisWillis
ID: 12052795
make sure you have installed asp page support from the windows componet add in, asp is not loaded by default.

Also check your web service extensions user the IIS mmc console, make sure asp is allowed.
0
 

Author Comment

by:wilbur88
ID: 12054139
ChrisWallis:
  ASP is allowed in the windows component section.
  It is also allowed under the IIS mmc console.

jhautani:
  How do I install or manually register with regsvr32 the uploader object?  Maybe this is what the previous programmer did...
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 10

Expert Comment

by:jhautani
ID: 12059194
I found details about the upload component you are using in http://www.asp101.com/articles/jacob/scriptupload.asp (well, at least I think this is the one) and found out that you do not need to register any dll's or such; the code is using only an included ASP file.

So, here are a couple points to verify based on the code in your script:

> <!-- #include file="upload.asp" -->
-do you have the upload.asp in the same directory as your code
> File.SaveToDisk "C:\Inetpub\wwwroot\advisory\Reports\"
-is the path same in your new server
-does it have write access both in IIS MAnager and in NTFS permissions

hope this helps
0
 

Author Comment

by:wilbur88
ID: 12059620
jhautani:
1) yes, i have the upload.asp in the same directory as the code

2) yes, the path is the same as on the new server

3) internet guest account:  on the old server it had full control over the /reports directory.  i added rights to this account to also give full control on the new server for this directory, but it didn't  help.
iis_wpg: same rights on both old and new servers.  (read and ex, list folder cont., and read)
ows_(a bunch of numbers): all but full control is given on both the old and new servers.  

any other ideas?

I guess you saw the dire warning in the link you sent me about having to install vbscript ver 5.0 on the server.  Do you think i satisfied this requirement by installing windows scripting ver 5.6?

Thanks again for your efforts-
0
 
LVL 10

Expert Comment

by:jhautani
ID: 12059854
Does the /reports virtual directory have write access in IIS Manager (meaning that IIS itself allows writing to a directory)?

About Scripting host version: I am pretty sure that 5.6 satisfies the requirements as thus far far MS has paid good attention to new versions being backward compatible.
0
 

Author Comment

by:wilbur88
ID: 12060130
No, it didn't.  However: The old server didn't have write access in iis manager either.  I just turned write access on and tried it and it still didn't work.  I am leaving write access checked b/c it seems a little weird to me that the old server didn't have it checked and it still worked...

How about this:  I stripped down the upload.asp file to the followin.  Basically i just want to allow the file to accept the parameters Access throws at it when calling it.  But even this simplistic version of the file doesn't work!!!  It gives me the same error.  What do you think?

<%@ Language=VBScript %>
<%Option Explicit%>
<!-- #include file="upload.asp" -->
<%

'NOTE - YOU MUST HAVE VBSCRIPT v5.0 INSTALLED ON YOUR WEB SERVER
'         FOR THIS LIBRARY TO FUNCTION CORRECTLY. YOU CAN OBTAIN IT
'         FREE FROM MICROSOFT WHEN YOU INSTALL INTERNET EXPLORER 5.0
'         OR LATER.

'Kay for getting info to insert into the database
Dim strCompany, strProperty, strConsultant
Dim strVisitdate, strCalldate, strFilename, strReport
strCompany = Request.QueryString("company")
strProperty = Request.QueryString("property")
strConsultant = Request.QueryString("consultant")
strVisitdate = Request.QueryString("visitdate")
strCalldate = Request.QueryString("calldate")
strFilename = Request.QueryString("filename")
strReport = Request.QueryString("report")

' Create the FileUploader
Dim Uploader, File
0
 
LVL 10

Accepted Solution

by:
jhautani earned 500 total points
ID: 12081533
I tested upload.asp to see whether it has problems in 2003, but it works nicely. I think your problem relates to parameters you are passing to your .asp.
Check the IIS error log to see if it can provide more details about the error. IIS 6 error log is in system32\logfiles\httperr
0
 

Author Comment

by:wilbur88
ID: 12082842
thanks for your help over the days.  

It turned out that the problem was the access database that the asp was writing to-  i had to set it's permissions to allow the internet user to write to it.
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Clone Windows 2003 SBS into VMware Virtual Machine 3 133
WSUS Feature Updates for WIndows 10 6 138
Event-ID 3001, 3011 - LoadPerf - Windows Server 2003 14 75
Auto Login Script 3 63
I've always wanted to allow a user to have a printer no matter where they login. The steps below will show you how to achieve just that. In this Article I'll show how to deploy printers automatically with group policy and then using security fil…
While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question