Wednesday, June 30, 2010

To send sms through http port

We can send sms through a dedicatd http port to mobile no. To implement that, we need a very small code in c#.net. And we can use that code on the basis of the requirement of the server.
----------------------
String httpAddress = "http://192.164.4.224:8237/cpSubscriptionService/Default.aspx?key=ppl_450w98";
String mobileNo = txtMobile.Text;
String sentMessage = txtMessage.Text;
String out_Msg_Id = txtOutMsg_id.Text;
String sendRequest = httpAddress+ "&mobileNo="+mobileNo+"&body="+sentMessage+"&msg_type=4&send_port=003225&in_Msg_Id=1&out_Msg_Id="+out_Msg_Id;

HttpWebRequest loHttp = (HttpWebRequest)WebRequest.Create(sendRequest);

//loHttp.Timeout = 10000;
loHttp.Method = "GET";

HttpWebResponse loWebResponse = (HttpWebResponse)loHttp.GetResponse();

Encoding enc = Encoding.GetEncoding(1252); // Windows default Code Page
StreamReader loResponseStream = new StreamReader(loWebResponse.GetResponseStream(), enc);

string lcHtml = loResponseStream.ReadToEnd();
txtResponse.Text = lcHtml;

loWebResponse.Close();
loResponseStream.Close();
---------------------------------

For that purpose, we have just used the http port for the example purpose. Here three text box has been used just to take the no., text and the feedback field. Here in the program these fields have been used.

Sunday, June 27, 2010

unable to connect to asp.net development server

Recently, I have started to make deal with ASP.net to learn that. And I firstly installed the Visual Studio 2008 and wrote the code. But when I start to debugging, I was helpless, as I am not a man with a lot of concentration. And most of the cases at past, I stopped programming when a error arouse me. But at this time I have started to face the problem, as its my target.
But this session isn't different from the before. When I start to debug my first program, I find the message "unable to connect to asp.net development server". As its my challenge, I use the internet and solve he problem. You can solve it following the steps

first download the file from following link
http://www.esnips.com/doc/9ef73cba-6d6a-4e76-a42d-83b58024300e/WebDev.WebServer
extract the file ..
u will get an exe named WebDev.WebServer.exe
simply right click and copy it..
now..
goto your drive containing windows...
by deault this is c drive..
so open
the following path...
C:\Program Files\Common Files\microsoft shared\DevServer\9.0
you will find already a file named WebDev.WebServer.exe..
so what you have to do is simply replace this file...
by right click and paste...
and click yes on the message that you want to replace the file..
yes its done ...

N.B: