请在asp.net中发送probmel的短信需要帮助吗? [英] please need help in sms sending probmel in asp.net?

查看:54
本文介绍了请在asp.net中发送probmel的短信需要帮助吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的

请在ASP.net中我需要帮助

i尝试从AT Command发送短信并且我在VB.net中成功

但是当我在ASP.net中使用相同的代码时,它就会出现错误,如果我编写的代码如下,那么它就会被读入,你可能会看到这个

DEAR ALL
please i need help in ASP.net
i try to send sms from AT Command and i successful in VB.net
but when i wirte and use same code in ASP.net so it is getting error just it goes else not read in if as i wrote code bellow you may see this

Dim SerialPort1 As New SerialPort   ('i have to write this because in asp.net serial port not import)
        Try
            If SerialPort1.IsOpen Then
                With SerialPort1
                    .Write("AT" & vbCrLf)
                    .Write("AT+CMGF=1" & vbCrLf)
                    .Write("AT+CMGS=" & Chr(34) & TextBox1.Text & Chr(34) & vbCrLf)
                    .Write(TextBox2.Text & Chr(26))
                    MsgBox("sms Sent")

                End With
            Else
                MsgBox("ERROR MSG ON PORT")
            End If
        Catch ex As Exception
            MsgBox(ex.Message)

        End Try



我试过这段代码,这不起作用只是显示msg这个

MsgBox(ERROR MSG ON PORT)



我需要帮助


I tried this code and this is not works just it show msg this one
MsgBox("ERROR MSG ON PORT")

please i need help

推荐答案

通过更改,您是否尝试使用另一台计算机的串行端口?请参阅此页:读取串行端口COMM1 [ ^ ]。
By change, are you trying to use the serial port of another computer? See this page: Read serial port COMM1[^].


这篇关于请在asp.net中发送probmel的短信需要帮助吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆