Solved

How to send info to a database over the internet?

Posted on 2007-11-26
11
249 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
 
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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
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 Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
network + 7 73
Add Server Certificate in IIS from C# 6 73
WPF issue with Trigger 2 69
c# if statement weird reaction 3 30
Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video discusses moving either the default database or any database to a new volume.

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now