Solved

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

Posted on 2004-09-13
9
286 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Preface Having the need * to contact many different companies with different infrastructures * do remote maintenance in their network required us to implement a more flexible routing solution. As RAS, PPTP, L2TP and VPN Client connections are no…
So you have two Windows Servers and you have a directory/folder/files on one that you'd like to mirror to the other?  You don't really want to deal with DFS or a 3rd party solution like Doubletake. You can use Robocopy from the Windows Server 200…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

773 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