?
Solved

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

Posted on 2004-09-13
9
Medium Priority
?
304 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Does Your Cloud Backup Use Blockchain Technology?

Blockchain technology has already revolutionized finance thanks to Bitcoin. Now it's disrupting other areas, including the realm of data protection. Learn how blockchain is now being used to authenticate backup files and keep them safe from hackers.

 
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 2000 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

by Batuhan Cetin In this article I will be guiding through the process of removing a failed DC metadata from Active Directory (hereafter, AD) using the ntdsutil tool in a Windows Server 2003 environment. These steps are not necessary in a Win…
Setting up a Microsoft WSUS update system is free relatively speaking if you have hard disk space and processor capacity.   However, WSUS can be a blessing and a curse. For example, there is nothing worse than approving updates and they just have…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

719 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