Solved

How to send info to a database over the internet?

Posted on 2007-11-26
11
250 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
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…

776 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