Domanda

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?

È stato utile?

Soluzione

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).
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange
scroll top