因此,我们将此ASP Classic应用程序移至运行Windows 2008的新共享主机服务器
现在,每次调用响应方法或对其进行任何访问都会生成"对象不支持此属性或方法" 错误。唯一有效的是 response.write 让我更加困惑。
技术支持说这台服务器没有任何问题,而且你的许多其他asp经典应用程序都能正常运行"
发生了什么事?
编辑:这里是我用来执行测试的代码
<%
on error resume next
'clear method -----------------------------------------------------------------
response.Clear
if err<>0 then
response.write "Clear: <U>ASPCheck-ErroR " & err.description & "</U>"
err.clear
end if
'properties -------------------------------------------------------------------
response.write "<br />Cookies: "
response.Cookies("test") = "testing" 'does not produce any output
if err<>0 then
response.write "<U>ASPCheck-ErroR " & err.description & "</U>"
err.clear
end if
response.write "<br />Buffer: "
response.write response.Buffer
if err<>0 then
response.write "<U>ASPCheck-ErroR " & err.description & "</U>"
err.clear
end if
response.write "<br />CacheControl: "
response.write response.CacheControl
if err<>0 then
response.write "<U>ASPCheck-ErroR " & err.description & "</U>"
err.clear
end if
response.write "<br />Charset: "
response.write response.Charset
if err<>0 then
response.write "<U>ASPCheck-ErroR " & err.description & "</U>"
err.clear
end if
response.write "<br />ContentType: "
response.write response.ContentType
if err<>0 then
response.write "<U>ASPCheck-ErroR " & err.description & "</U>"
err.clear
end if
response.write "<br />Expires: "
response.write response.Expires
if err<>0 then
response.write "<U>ASPCheck-ErroR " & err.description & "</U>"
err.clear
end if
response.write "<br />ExpiresAbsolute: "
response.write response.ExpiresAbsolute
if err<>0 then
response.write "<U>ASPCheck-ErroR " & err.description & "</U>"
err.clear
end if
response.write "<br />IsClientConnected: "
response.write response.IsClientConnected
if err<>0 then
response.write "<U>ASPCheck-ErroR " & err.description & "</U>"
err.clear
end if
response.write "<br />Pics: "
response.Pics = ""
if err<>0 then
response.write "<U>ASPCheck-ErroR " & err.description & "</U>"
err.clear
end if
response.write "<br />Status: "
response.write response.Status
if err<>0 then
response.write "<U>ASPCheck-ErroR " & err.description & "</U>"
err.clear
end if
' methods ---------------------------------------------------------------------
response.write "<br />AddHeader: "
response.AddHeader "testheader","testheadervalue"
if err<>0 then
response.write "<U>ASPCheck-ErroR " & err.description & "</U>"
err.clear
end if
response.write "<br />AppendToLog: "
response.AppendToLog ""
if err<>0 then
response.write "<U>ASPCheck-ErroR " & err.description & "</U>"
err.clear
end if
response.write "<br />BinaryWrite: "
response.BinaryWrite "B"
if err<>0 then
response.write "<U>ASPCheck-ErroR " & err.description & "</U>"
err.clear
end if
response.write "<br />Flush: "
response.Flush
if err<>0 then
response.write "<U>ASPCheck-ErroR " & err.description & "</U>"
err.clear
end if
response.write "<br />Write: "
response.Write "W"
if err<>0 then
response.write "<U>ASPCheck-ErroR " & err.description & "</U>"
err.clear
end if
%>
以下是结果:
Clear: ASPCheck-ErroR Object doesn't support this property or method
Cookies: ASPCheck-ErroR Object doesn't support this property or method
Buffer: ASPCheck-ErroR Object doesn't support this property or method
CacheControl: ASPCheck-ErroR Object doesn't support this property or method
Charset: ASPCheck-ErroR Object doesn't support this property or method
ContentType: ASPCheck-ErroR Object doesn't support this property or method
Expires: ASPCheck-ErroR Object doesn't support this property or method
ExpiresAbsolute: ASPCheck-ErroR Object doesn't support this property or method
IsClientConnected: ASPCheck-ErroR Object doesn't support this property or method
Pics: ASPCheck-ErroR Object doesn't support this property or method
Status: ASPCheck-ErroR Object doesn't support this property or method
AddHeader: ASPCheck-ErroR Object doesn't support this property or method
AppendToLog: ASPCheck-ErroR Object doesn't support this property or method
BinaryWrite: ASPCheck-ErroR Object doesn't support this property or method
Flush: ASPCheck-ErroR Object doesn't support this property or method
Write: W
答案 0 :(得分:0)
在IIS上,enable buffering
未选中。
您可以在Application Development&gt;下找到此设置。 ASP&gt;启用缓冲。