Solved

How to send info to a database over the internet?

Posted on 2007-11-26
11
251 Views
Last Modified: 2010-04-15
I have a desktop program written in C# and .NET v2.0.  I want to send some data from within my program (MAC address) to a database on my web hosting site (it's a MySQL database) for license validation.

Any ideas on how to accomplish this?
0
Comment
Question by:rmmarsh
  • 5
  • 5
11 Comments
 
LVL 5

Assisted Solution

by:KPMT-Technician
KPMT-Technician earned 200 total points
ID: 20351490
Create a web service to act as you Database Layer.  
Then reference the new project in your windows program.
0
 

Author Comment

by:rmmarsh
ID: 20351512
Is there any way to access the database directly, without having to go through a web service?  I have written them before, and find them hard to debug, so would rather find another way...
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20351541
you can query a mysql database directly from you C# .net 2.0 application.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20351555
0
 

Author Comment

by:rmmarsh
ID: 20351560
jaime:  the database is stored on my web site; can you elaborate?
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20351565
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20351612
there is nothing special, just determine your connection string correctly, are you currently using some mysql client on your local pc? this will help to determine the connection string
0
 

Author Comment

by:rmmarsh
ID: 20351689
Jaime:  no, just thinking of how to track the licenses so they are not used on more than one machine.  If I take either the MAC address or harddrive serial number and send it to the server with the license key, I should be able to keep control of things.
0
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 300 total points
ID: 20351789
since your server is far away to detect your MAC automatically, you have to send your MAC by yourself.
You have 2 basic choices:
- query the mac directly in to the mysql database
- send the mac to a web service or webpage and expect a response
Also you can do this:
create users into your database with the same of your MAC hex address. So if you can login from your local app with this name, then it is licensed.
0
 

Author Comment

by:rmmarsh
ID: 20351896
Yes, that's what KPMT said... I guess there is no other way...

Thanks to both of you... I appreciate the feedback...

R
0
 

Author Comment

by:rmmarsh
ID: 20354225
Had to open another question regarding the connection string... I haven't a clue what it would look like when the database is on a remote server.

New question number is 22983881.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question