用idhttp上传时出现 'HTTP/1.1 501 Not Implemented' 这如何处理啊 谢谢

tongtianxiao 2011-03-14 12:26:11
用idhttp上传时出现 'HTTP/1.1 501 Not Implemented' 这如何处理啊 谢谢
delphi2007
procedure TForm1.btn1Click(Sender: TObject);
var fs:TFileStream;
Response:TStringStream;
fileName:string;
begin
fs:=TFileStream.Create('AbsIM客户端单元说明.xls',fmopenread);
response:=TStringStream.Create('');
try
try
idhtp1.Post('http://mail.*****.cn:9999/UploadFile.asp',fs,response);
except
showmessage(response.DataString);
end;

finally
fs.Free;
response.Free;
end;
{
---------------------------
Debugger Exception Notification
---------------------------
Project Project2.exe raised exception class EIdHTTPProtocolException with message 'HTTP/1.1 501 Not Implemented'.
---------------------------
Break Continue Help
---------------------------
}
end;

UploadFile.asp
<%@ Language=VBScript %>
<%
Dim strMsg 'As String

' On Error Resume Next
dim fuFile
set fuFile = server.CreateObject("aspFileupload.file")
'Set the destination folder.
fuFile.Target = "D:\UpFiles\"
fuFile.Upload

If Err.number = 0 Then
strMsg = fuFile.FileName & " was uploaded successfully."
Else
strMsg = "An error occurred when uploading your file: " & Err.Description
End If
for each o in fuFile.Form
Response.Write o & "<BR>"

next

Response.Write fuFile.Form.item("text1") & " : " & fuFile.Form.item("text2")
' Response.Write Request.Form("test")
set fufile = nothing
%>
<html>
<head></head>
<body>
<%=strMsg%>
</body>
</html>
...全文
393 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
tongtianxiao 2011-03-14
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 aawwmate 的回复:]
你的服务器是不是不支持http 1.1版本啊
[/Quote]
服务器是win2003 自带的iis...........那怎么办啊????????
aawwmate 2011-03-14
  • 打赏
  • 举报
回复
你的服务器是不是不支持http 1.1版本啊
tongtianxiao 2011-03-14
  • 打赏
  • 举报
回复
哪玩高人指点一下啊

1,593

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 网络通信/分布式开发
社区管理员
  • 网络通信/分布式开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧