Looking for some feedback on this one:
I have an application that gathers some stats about usage and things of that sort. And since I have a domain just sitting there I thought it'd be interesting to have the application push those stats to the website to be put into the database.
I've done some similar things before (mostly web requests to some php files I made). This time I'm trying to go about it in a more secure manner. Obviously I don't want to have a page that just executes a SQL query that is passed in. I'm also skeptical of simply passing in the variables and an action flag. I have entertained the thought of a security token that needed to be present.
I'm just unsure if this a very good way of designing this...
Posting data to database via webpage
Page 1 of 18 Replies - 340 Views - Last Post: 22 January 2011 - 02:51 PM
Replies To: Posting data to database via webpage
#2
Re: Posting data to database via webpage
Posted 21 January 2011 - 08:13 AM
Web Services are exactly what you need.
Look into WCF web services. Alternatively, you can use ASP.NET's web service (ASMX).
Look into WCF web services. Alternatively, you can use ASP.NET's web service (ASMX).
#3
Re: Posting data to database via webpage
Posted 21 January 2011 - 05:42 PM
Suppose I should have mentioned that the host for my site is linux/apache.
#4
Re: Posting data to database via webpage
Posted 21 January 2011 - 06:17 PM
Can you tell us why you posted this in the C# subforum?
#5
Re: Posting data to database via webpage
Posted 21 January 2011 - 07:01 PM
#6
Re: Posting data to database via webpage
Posted 21 January 2011 - 07:22 PM
Well then, you won't be able to use C# for the server piece. You could write a REST web service using PHP, Python, Ruby, etc... but I don't know how skilled you are with those. You also should be able to set up your DB to allow remote connections, though that's risky to the point of foolishness.
#7
Re: Posting data to database via webpage
Posted 22 January 2011 - 04:54 AM
I'm confused about which side the OP is looking for help with. Is it client AND server? There's no reason you can't do a simple PHP server page which saves the data to the DB and post to it from a C# client.
#8
Re: Posting data to database via webpage
Posted 22 January 2011 - 02:39 PM
It was posted in the C# forum because the application was written in C#. Figured that would be implied but I suppose not...
Either way, I was trying to find out if I should continue using a PHP form that handles transactions to the DB and then just posting to it (as Jack said). I'm not having trouble with the system, just wanting to make sure there wasn't some other, potentially better, way of designing it.
It may not be ideal but I'm kind of limited in my ability to use web services and write my own server since the site is hosted and I'd rather not enable remote connections.
Thanks everyone
Either way, I was trying to find out if I should continue using a PHP form that handles transactions to the DB and then just posting to it (as Jack said). I'm not having trouble with the system, just wanting to make sure there wasn't some other, potentially better, way of designing it.
It may not be ideal but I'm kind of limited in my ability to use web services and write my own server since the site is hosted and I'd rather not enable remote connections.
Thanks everyone
#9
Re: Posting data to database via webpage
Posted 22 January 2011 - 02:51 PM
OK, my personal recommendation would be to set up certificate authentication and use HTTP with certificates as your authentication mechanism.
It's also quite possible to use PHP's SOAP library to create a SOAP, i.e. Web Services, front-end with which you could use WCF as noted above. Again, you can use whatever auth mechanism you'd like.
Don't forget to use SSL as well.
It's also quite possible to use PHP's SOAP library to create a SOAP, i.e. Web Services, front-end with which you could use WCF as noted above. Again, you can use whatever auth mechanism you'd like.
Don't forget to use SSL as well.
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote





|