Improve company productivity with a Business Account.Sign Up

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
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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