[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 260
  • Last Modified:

How to send info to a database over the internet?

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
rmmarsh
Asked:
rmmarsh
  • 5
  • 5
2 Solutions
 
KPMT-TechnicianCommented:
Create a web service to act as you Database Layer.  
Then reference the new project in your windows program.
0
 
rmmarshAuthor Commented:
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
 
Jaime OlivaresSoftware ArchitectCommented:
you can query a mysql database directly from you C# .net 2.0 application.
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
Jaime OlivaresSoftware ArchitectCommented:
0
 
rmmarshAuthor Commented:
jaime:  the database is stored on my web site; can you elaborate?
0
 
Jaime OlivaresSoftware ArchitectCommented:
0
 
Jaime OlivaresSoftware ArchitectCommented:
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
 
rmmarshAuthor Commented:
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
 
Jaime OlivaresSoftware ArchitectCommented:
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
 
rmmarshAuthor Commented:
Yes, that's what KPMT said... I guess there is no other way...

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

R
0
 
rmmarshAuthor Commented:
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

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 5
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now