【发布时间】:2014-08-13 08:17:14
【问题描述】:
我在我的服务器上使用 IIS 7。测试时(本地)。
看起来好像 IIS 发送一次请求但响应两次。
我知道这一点是因为 Fiddler 记录了 1 个请求,但在请求之后我可以注意到以下内容:
数据库上的任一插入命令都是重复的(2 个条目但单击了一次按钮)。
或错误消息重复。错误输出示例:
服务器拒绝了一个或多个收件人地址。服务器响应为:554 5.7.1 _EmailVariable_>: Relay access denied 服务器拒绝了一个或多个收件人地址。服务器响应为:554 5.7.1 _EmailVariable_>: Relay access denied
如何检查问题所在,以及如何解决。
我的vb代码的catch(尝试后)如下:
Catch Ex As Exception
If Ex.Message.ToLower = "the server rejected one or more recipient addresses. the server response was: 554 5.7.1 <" + _EmailVariable_ + ">: relay access denied" Then
Response.Write("In this error block!")
Else
Response.Write(ex.Message)
'If Ex.Message.ToLower = "the transport lost its connection to the server." Then
' ClientScript.RegisterClientScriptBlock(Me.GetType(), "", "alert('PROBLEM: Please try again.')", True)
'Else
' Response.Write(Ex.Message)
'End If
End If
'ClientScript.RegisterClientScriptBlock(Me.GetType(), "", "alert('The following Error Occured. [" & Ex.Message.Replace(vbcrlf, "") & "]. If this is the first time you see this error please contact Clive or Jacques.')", True)
End Try
我只想说清楚,我理解接下来的错误,我的问题与错误无关。我想修复导致请求执行两次但只记录一个请求的 IIS 甚至 VB 插件。!
【问题讨论】: