Click here to Skip to main content
15,867,568 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 ?
Posted

A web service would be the simplest approach. Google for "C# web service" and you'll get lots of hits.
 
Share this answer
 
Comments
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.
--SA
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:
http://msdn.microsoft.com/en-us/library/debx8sh9.aspx[^].

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

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