不允许使用用于访问路径''的HTTP谓词POST

时间:2013-06-14 20:45:53

标签: html asp-classic

这是使用IIS 7.5,HTML和经典ASP。

我无法弄清楚错误“不允许使用用于访问路径的HTTP动词POST'/httpdocs/sendmail_feedback.asp'”

我有一个HTML页面,其中包含表单和提交按钮。

 <input name="submit" type="submit" id="submit" accesskey="s" tabindex="9" value="Submit" />

单击提交按钮时,应使用SMTP以电子邮件的形式发送所有表单字段。但我不断收到此错误“500 - 内部服务器错误”。所以我试图在本地运行并找出错误,它恰好是“用于访问路径的HTTP动词POST'/httpdocs/sendmail_feedback.asp'是不允许的”

这是经典asp页面中的代码,应该发送电子邮件。

    <%

Dim MyBody
MyBody = "The following is customer feedback from the Corporate Website Form." & vbCrLf
MyBody = MyBody & "==============================================================" & vbCrLf
MyBody = MyBody & vbCrLf
MyBody = MyBody & "Company: " & Request.Form("Company Name") & vbCrLf
MyBody = MyBody & "Name: " & Request.Form("name") & vbCrLf
MyBody = MyBody & "Phone: " & Request.Form("phone") & vbCrLf
MyBody = MyBody & "Email: " & Request.Form("email") & vbCrLf
MyBody = MyBody & "==============================================================" & vbCrLf
MyBody = MyBody & "The following comment is: "& Request.Form("comment").item & vbCrLf &vbCrLf
MyBody = MyBody & "Comments: " & Request.Form("message") & vbCrLf
MyBody = MyBody & "==============================================================" & vbCrLf




Set Mailer=CreateObject("CDO.Message")

Mailer.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtpname.com"

Mailer.Subject= request.Form("feedback_type")
Mailer.From="support@logonation.com"   
Mailer.To = "myemail@email.com"    
Mailer.TextBody= MyBody
Mailer.Send
Response.Redirect "../thankyou.html"

set Mailer=nothing

我希望我对自己的问题很清楚。我只是想知道我在哪里做错了什么?!

0 个答案:

没有答案