Hai friends....the below code is working well for sending sms from VS2008 C# windows Application.... .......but i want the same to work in ASP.NET(vb).... ........can anyone help me....I converted the code and tried but it didnt work........... ............... ............... .....
In the String uri....under send_to put ur mobile Number......... ...... CODING:-(c# windows Application) -
-
using System;
-
using System.Collections.Generic;
-
using System.Linq;
-
using System.Text;
-
using System.Net;
-
using System.IO;
-
namespace internet
-
{
-
class Program
-
{
-
static void Main(string[] args)
-
{
-
String uri = "http://mysmsaddress.net:80/smsc/general/sendsms.jsp
-
?
-
userid=nlarsen&password=sam143wi&submit_name=sam&send_to=919894857426&message_type=0&message_text=Hello";
-
WebRequest req = WebRequest.Create(uri);
-
req.Method = "POST";
-
byte[] bytes = System.Text.Encoding.ASCII.GetBytes(uri);
-
req.ContentLength = bytes.Length;
-
Stream os = req.GetRequestStream();
-
os.Write(bytes, 0, bytes.Length);
-
os.Close();
-
WebResponse res = req.GetResponse();
-
if (res == null)
-
Console.WriteLine("Response Null");
-
StreamReader sr = new StreamReader(res.GetResponseStream());
-
Console.WriteLine("Response :" + sr.ReadLine().ToString());
-
Console.ReadLine();
-
}
-
-
}
-
}
-
-
Converted Code:-(vb)
'The Below Code Should Work For Me.........its not working Now............ -
-
Imports System
-
-
Imports System.Collections.Generic
-
-
Imports System.Linq
-
-
Imports System.Text
-
-
Imports System.Net
-
-
Imports System.IO
-
Shared Sub Main(ByVal args As String())
-
-
Dim uri As String = http://mysmsaddress.net:80
-
/smsc/general/sendsms.jsp?
-
userid=nlarsen&password
-
=sam143wi&submit_name=sam&send_to=919894857426&message
-
_type=0&message_text=Hello Dim req As WebRequest = WebRequest.Create(uri)
-
req.Method = "POST"
-
-
Dim bytes As Byte() = System.Text.Encoding.ASCII.GetBytes(uri)
-
req.ContentLength = bytes.Length
-
-
Dim os As Stream = req.GetRequestStream()
-
os.Write(bytes, 0, bytes.Length)
-
-
os.Close()
-
-
Dim res As WebResponse = req.GetResponse()
-
If res = Nothing Then
-
-
Console.WriteLine("Response Null")
-
-
End If
-
-
Dim sr As New StreamReader(res.GetResponseStream())
-
Console.WriteLine("Response :" + sr.ReadLine().ToString())
-
-
Console.ReadLine()
-
-
End Sub
-
-
pl refer Below. for some clarification/............... ...... http://www.mysmsaddress.net/SMPP%20AND%20HTTP%20API.pdf
Please Help Me...I need for My Project........ ........
Davidson
2 1127
What is the current output now and what should the output be?
Thank r03..
this program should send sms from computer to Mobile........t he windows application was working i.e c#(windows) but the web applcation(Asp. net) is not working,,,,,,,, ,,,,,,,,Help me i need the web application should also work.........
ie) Second code I have Send,,,,,,,,,,, ,
Davidson....... .......
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Sean Berry |
last post by:
I was writing a little script to test different functions of the time
module. Like an idiot, I named the test script time.py.
Then when I tried to do a "import time" call, I got an error.
So, my time.py has overwritten the time.py builtin mod.
I have python 2.3 installed on a few different servers, so I was going to
copy over the .py file in /usr/local/lib/python2.3, but I could not find
one... not even on the servers where I didn't...
|
by: serge calderara |
last post by:
Dear all,
I have a function that I need to run in a thread due to the fact that it can
takes long time to execute according to the amount of data to collect.
This function is also populating a treeview control whne collected data gets
finished.
In order to achieve this I have used the following code :
System.Threading.ThreadPool.QueueUserWorkItem(New
System.Threading.WaitCallback(AddressOf GetListOfReelsFromRemoteDB))
|
by: Christian Christmann |
last post by:
Hi,
in the past I always appreciated your help and hope that you also can help
me this time. I've spent many many hours but still can't solve the
problem by myself and you are my last hope.
I've a program which is using self-written double-linked lists as a data
structure. The template list consists of list elements and the list itself
linking the list elements.
|
by: stu_gots |
last post by:
I have been losing sleep over this puzzle, and I'm convinced my train
of thought is heading in the wrong direction. It is difficult to
explain my circumstances, so I will present an identical make-believe
challenge in order to avoid confusing the issue further.
Suppose I was hosting a dinner and I wanted to invite exactly 12 guests
from my neighborhood. I'm really picky about that... I have 12 chairs
besides my own, and I want them all...
|
by: Erik Thorsen |
last post by:
Hello!
I am in the process of creating a database listing tours, something
similar to what you can find on www.infohub.com.
This means that I need to create a database which can be searchable
with destination, category, price and so forth. Unfortunately I can
not seem to be able to create the relationships, neither can I make my
head learn how to do this. I would be extremely happy if anyone could
help me solve this problem for me or...
| |
by: npc |
last post by:
Hello!
- I have a problem, I need to write a
little program a la Mastermind in C (for school). Can anybody help me?
please, contact me by e-mail.
greets
|
by: Dave |
last post by:
I'm struggling with something that should be fairly simple. I just don't
know the regext syntax very well, unfortunately.
I'd like to parse words out of what is basically a boolean search string.
It's actually the input string into a Microsoft Index Server search.
The string will consist of words, perhaps enclosed in quotes or parentheses.
I'd like to use Regex to pull out the words, or the phrases if the words are
enclosed in quotes....
|
by: Jintty |
last post by:
Hi,
I'm trying to write a program that will read a txt file, copy it into
another text file and display the number of words, lines and
paragraphs.
I was able to get the copying portion done, but i'm struggling with the
counters.
processBlank is supposed to increment the number of words whenever it
hits a nonblank, so i figured using if its not equal to blank then
update word count but no luck
please help me, i'd appreciate any help
|
by: yuanlinjiang |
last post by:
I am working on converting a win32 console application from VC6 to VC7.
My version is Microsoft Development Environment 2003 version 7.1.3088.
The code works fine on VC6. it is a console program for scientific
computation, so it has nothing to do with MFC. But it needs some
other libraries such as MKL, sparselib, etc.
VC7 can build the executable successfully. However, when i run it,
there is only one line on the command window:
|
by: davy.zou |
last post by:
I have started learning c++ and I need help. I need to write a
program, the question is as follows.
At a post office, there are a certain number of 2, 7, and 9cents
stamps, now, given a total number of cents required, find the correct
and most effective combination of stamps.
meaning that if you were to need 14cents, the correct output should be
2 seven cents not 7 two cents.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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 captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
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: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |