skip to Main Content

Currently I’m storing my C# mysql connection informations inside the class file itself, which doesn’t seem that smart, since end users could simply use a reflector like NET Reflector to debug the source code in case it’s not obfruscated.

Now a user on stackoverflow recommendet to create a web service which will manipulate the database.The software that the end-user would use then simply authenticates itself with the web service using the user’s credentials and then uses that to access resources.

Now I have the following problem, My server is running on linux ubuntu and already stores a website which was created using plesk.

I know that I could use http://www.mono-project.com/ to host a webservice on linux. But I’ve never done that since I’ve always used PHP to do such things and I’ve got kinda confused on how to upload a c# web-service to the installed mono version on the ssh server.


Could I use a PHP to create a web service which communicates with the C# desktop application?

2

Answers


  1. You can just run a PHP page doing the query and a C# WebRequest to access that page right? If you return JSON or XML you can even use existing libraries to parse the response.

    I don’t know how to use credentials on the PHP server, but i would think this should no big deal.

    Login or Signup to reply.
  2. You can write a web-service in any language that you want/need to use. A web-service, at its most basic, simply accepts a request and does something on the hosting machine. There are standards to follow for developing a web-service, but the language you use can be just about anything you want.

    Here is some further information on requirements of a web service.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search