Hi,
I use BulkSMSGateway - ATSMS.dll for sending SMS from ASP.NET.
When I click Connect button, I am able to connect to the mobile using bluetooth successfully from my WebPage.
But when i click Send button, the oGsmModem returns error e.errorcode=400 6 in the oGsmModem_Outbo xSMSSent event. But i can send SMS successfully using VB.NET Windows Appication. Why it returns error in web form alone?
Please help me to send SMS from my Web Page.
Thanks in advance...
3 4043 CroCrew 564
Recognized Expert Contributor
Hello Ananthu,
A few years back I created an example in Classic ASP for a member to send SMS text to phones via a website. [ See here]
I took that code and changed it up to work in the dot.net environment. I have not tested it out but I think it should work for you. This way you don’t have to use 3rd party addons.
Happy Coding,
CroCrew~
Default1.aspx -
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default1.aspx.vb" Inherits="Default1" %>
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
<html xmlns="http://www.w3.org/1999/xhtml">
-
<head runat="server">
-
<title></title>
-
</head>
-
<body>
-
<form id="form1" runat="server">
-
<div>
-
<table border="0">
-
<tr>
-
<td>Phone Number:</td>
-
<td><asp:TextBox ID="PhoneNumber" runat="server" /><font size="1">(only enter the numbers) example 6045555555</font></td>
-
</tr>
-
<tr>
-
<td>Select Your Carrier</td>
-
<td>
-
<asp:DropDownList ID="Carrier" runat="server">
-
<asp:ListItem Value="@tmomail.net" Text="T-Mobile (USA)" />
-
<asp:ListItem Value="@message.alltel.com" Text="Alltel Wireless" />
-
<asp:ListItem Value="@mms.att.net" Text="AT&T Mobility (formerly Cingular)" />
-
<asp:ListItem Value="@cingularme.com" Text="Cingular (Postpaid)" />
-
<asp:ListItem Value="@cwemail.com" Text="Centennial Wireless" />
-
<asp:ListItem Value="@cingularme.com" Text="Cingular (GoPhone prepaid)" />
-
<asp:ListItem Value="@fido.ca" Text="Fido (Canada)" />
-
<asp:ListItem Value="@pcs.rogers.com" Text="Rogers (Canada)" />
-
<asp:ListItem Value="@messaging.sprintpcs.com" Text="Sprint (PCS)" />
-
<asp:ListItem Value="@page.nextel.com" Text="Sprint (Nextel)" />
-
<asp:ListItem Value="@vtext.com" Text="Verizon" />
-
<asp:ListItem Value="@vmobl.com" Text="Virgin Mobile (USA)" />
-
<asp:ListItem Value="@vmobile.ca" Text="Virgin Mobile (Canada)" />
-
<asp:ListItem Value="@mmst5.tracfone.com" Text="Tracfone (prepaid)" />
-
</asp:DropDownList>
-
</td>
-
</tr>
-
<tr>
-
<td colspan="2">
-
<textarea id="YourMessage" runat="server" cols="142" rows="5" style="width:500px">Only 142 characters can be sent!</textarea>
-
</td>
-
</tr>
-
<tr><td colspan="2"><asp:Button ID="Send" runat="server" Text="Send Message to Phone" /></td></tr>
-
</table>
-
<p>*Standard text messaging rates apply.</p>
-
</div>
-
</form>
-
</body>
-
</html>
-
Default1.aspx.v b -
Imports System.Net.Mail
-
-
Partial Class Default1
-
Inherits System.Web.UI.Page
-
-
Protected Sub Send_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Send.Click
-
Try
-
Dim oMail As New MailMessage
-
With oMail
-
.From = New MailAddress("YourMail@MyEmail.com")
-
.To.Add(PhoneNumber.Text & Carrier.SelectedValue)
-
.Subject = ""
-
.Body = YourMessage.Value
-
.IsBodyHtml = True
-
End With
-
-
Dim oSMTP As New SmtpClient
-
With oSMTP
-
.Host = "mail.yourServer.org"
-
.Credentials = New System.Net.NetworkCredential("YourMail@MyEmail.com", "Password")
-
.Send(oMail)
-
End With
-
Catch ex As Exception
-
Response.Write(ex)
-
Response.End()
-
End Try
-
End Sub
-
End Class
-
Here is a link to more Email to SMS Gateways: http://en.wikipedia.org/wiki/List_of...ng_SMS_transit
Hi,
This is my code for sending SMS using BulkSMSGateway - ATSMS.dll.
I am able to connect to phone successfully. btnSend_click code is working properly. But I get e.errorcode=400 6 in oGsmModem_Outbo xSMSSent event after btnSend_click event.
The same sms codings work successfully using windows application. But in web application only, it returns e.errorcode=400 6. I am unable to send SMS.
Please help me...
Thanks in advance.
CroCrew 564
Recognized Expert Contributor TIP: When you are writing your question, there is a button on the tool bar that wraps the [code] tags around your copy/pasted code. It helps a bunch. Its the button with a '#' on it. More on tags. They're cool. Check'em out.
Thanks,
CroCrew~
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Mountain Bikn' Guy |
last post by:
Take some standard code such as shown below. It simply loops to add up a
series of terms and it produces the correct result.
// sum numbers with a loop
public int DoSumLooping(int iterations)
{
int result = 0;
for(int i = 1;i <=iterations;i++)
{
result += i;
|
by: aladdinm1 |
last post by:
Hi All,
I have an annoying trouble with binary serialization. I have a windows
forms application which works like a server and keeps sending data to its
clients. The data is serialized before being sent using BinaryFormatter and a
serializable object. When using a windows forms application as a client,
everything works just fine and...
|
by: Robert A. van Ginkel |
last post by:
In news:OZ0W9RsdDHA.2432@TK2MSFTNGP10.phx.gbl... I ask the question how I
can see if all the data is on the other side of the connection.
I got as answer that I should use the blocking property.
I tried this I don't see any diffents, I am sending 10Mb and the
Send/BeginSend command doesn't wait till the data is on the remotepoint.
Can...
|
by: Mark Waser |
last post by:
Hi all,
I'm trying to post multipart/form-data to a web page but seem to have
run into a wall. I'm familiar with RFC 1867 and have done this before (with
AOLServer and Tcl) but just can't seem to get it to work in Visual Basic. I
tried coding it once myself from scratch and then modified a class that I
found on a newsgroup (referenced...
|
by: ransoma22 |
last post by:
I developing an application that receive SMS from a connected GSM
handphone, e.g Siemens M55, Nokia 6230,etc through the data cable.
The application(VB.NET) will receive the SMS automatically, process and
output to the screen in my application when a message arrived. But the
problem is how do I read the SMS message immediately when it arrived...
| |
by: Lucvdv |
last post by:
I have to connect to a server set up by the government, where they used
Apache Axis to create a webservice.
The code I use to interface to the webservice is generated by wsdl.exe,
based on a .wsdl file they sent me.
Now a problem turns up with a date field they implemented as xsd:dateTime,
even though it only contains a date.
|
by: craig.overton |
last post by:
All,
I am currently developing an FTP class in VB.NET. It's kid tested,
mother approved when trying to access an FTP Server on a Windows box
meaning I can connect, run commands, upload and download a file no
problem. My issues come when I try to use the same class with the same
commands to access an FTP server on a UNIX box. I can connect...
|
by: shamirza |
last post by:
4 9 6
18.ATLAS-AJAX
Note: - As an IT professional it's useful to know what the difference
is between Hype and
usefulness. For instance if there is a new technology coming in many
programmers just want
to implement it because they want to learn it?. But any new technology
becomes useful if it is
useful to the user. And Ajax is one of the...
|
by: WaluigiCubed |
last post by:
Hello everyone:
I've been working on making some changes to the website for the company that I am currently an intern for. There is a function that they have in one of their files that uses CDOSYS to allow visitors to our site to email us with a support request. I've been testing this functionality out, but the emails aren't actually being...
|
by: =?Utf-8?B?R3JlZ0lJ?= |
last post by:
Hi All,
I have some problems with sending UDP packets using Winsock. I tried to send
some to a closed port, and according to the documentation on Microsoft MSDN
site (http://msdn.microsoft.com/en-us/library/ms740148(VS.85).aspx)
subsequent calls of sendto function should result in returning WSAECONNRESET
error code caused by returning ICMP...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |