Click here to Skip to main content
15,042,397 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
i have a program that connect through serial to GSM Modem i need to get data by SMS

and then send these data to my website SQL database

how can i do these configurations i can get data serially but i don't know how to connect with website ?

A web service would be the simplest approach. Google for "C# web service" and you'll get lots of hits.
Sergey Alexandrovich Kryukov 26-Apr-11 18:14pm
More or less agree (my 5), but the question is about a Web site. Maybe it is required (if not Web site, why not something even more flexible like a custom service with fully-fledged inversion of control, publisher-subscriber and so on, right?).

Assuming OP just got to deal with a Web site, please see my answer.
Nish Nishant 26-Apr-11 18:20pm
Thank you, SA!
If you're bound to use the Web site (and not the Web Service as Nishant correctly proposed), you can use the class System.Net.HttpWebRequest to request the Web server and get response using System.Net.HttpWebResponse.

Here is one trick to know: you really need to use System.Net.HttpWebRequest via a compile-time type System.Net.WebRequest. Run-time type is defined by the URL. For example, see how to do POST:[^].

Nish Nishant 26-Apr-11 18:21pm
Good answer, SA. Voted 5.
Sergey Alexandrovich Kryukov 26-Apr-11 18:23pm
Thank you, Nishant.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900