1

I want to crypt a string and then store the result in a MySQL or SQL database with Sharepoint (so I can later take that value and use it inside a PHP application).

Can I connect to a database and write data in it without using Visual Studio? (for example using JSOM?)

Even if I must use Visual Studio, can you give me a hint on how to do this?

2

You can do it without Visual Studio, but it's not as secure. As for the non-VS methods, a few notes:

  • JavaScript is client-side code, which means potentially exposing your encryption method to the end user.
  • If you go with the method of having the database encrypt it (passing the string to a stored procedure which then encrypts it and puts it wherever you want it to go), you could still be passing an unencrypted (except possibly by SSL) string to your database.

Going with Visual Studio isn't too hard and the important work happens server-side. You can find a more detailed MSDN intro here if you're unfamiliar with it.

  1. Create a new empty SharePoint solution
  2. In the code-behind (whatever your .NET language of choice is) add a reference to your encryption method (either in your own code or in a referenced library)
  3. Add a visual web part (presuming you're doing some sort of input), take the string from the web part, pass it to the referenced encryption method
  4. Pass the data to your database (via straight code or through a service reference).
| improve this answer | |
  • Thank you for your answer! In case I use a trial version of Visual Studio, when the trial period will expire, will my web part still work? Excuse my stupid question but I'm new to Visual Studio and Sharepoint – bloomingsmilez May 5 '15 at 6:24
  • Once you've packaged up your code, it doesn't matter what your version of VS does. There is no link between the two.. You can still look at the features of VS Express/VS Community Edition as they will still allow you some SP coding ability for free. – Graham May 5 '15 at 19:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.