.NET Framework 版本:4.0.30319.42000
Foxtable 版本:2021.5.29.1
错误所在事件:
详细错误信息:
如果设置 ContentLength>0 或 SendChunked==true,则必须提供请求正文。 在 [Begin]GetResponse 之前通过调用 [Begin]GetRequestStream,可执行此操作。
登录代码如下:
Dim user As String="test"
Dim password As String="pasword"
Dim salt As String="123"
Dim tempall As String=salt & password
Dim auth = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(tempall,"MD5")
Dim hc As New HttpClient("http://sms.yy.hn.cegn.cn:9527/session")
hc.FormData.Add("user",user)
hc.FormData.Add("salt",salt)
hc.FormData.Add("auth",auth)
Dim ret As String = hc.getData()
msgbox(ret)
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Dim desttermid As String="15312345678"
Dim content As String="测试!"
Dim mode As String="0"
'Dim tempall As String=salt & password
'Dim auth = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(tempall,"MD5")
Dim hc1 As New HttpClient("http://sms.yy.hn.cegn.cn:9527/message")
hc1.FormData.Add("desttermid",desttermid)
hc1.FormData.Add("content",content)
hc1.FormData.Add("mode",mode)
Dim ret1 As String = hc1.getData()
msgbox(ret1)
[此贴子已经被作者于2022/2/7 10:08:39编辑过]