Click here to Skip to main content
13,252,206 members (56,095 online)
Rate this:
Please Sign up or sign in to 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 26-Apr-11 12:52pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

A web service would be the simplest approach. Google for "C# web service" and you'll get lots of hits.
SAKryukov 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.
Nishant Sivakumar 26-Apr-11 18:20pm
Thank you, SA!
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

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:[^].

Nishant Sivakumar 26-Apr-11 18:21pm
Good answer, SA. Voted 5.
SAKryukov 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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.171114.1 | Last Updated 26 Apr 2011
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100