I'd like to get some data from my SQL database and use it in my visual studio project. But the problem is I can't use the port number in a connection string like I have to do it normally due to a firewall. Currently, my SQL server is like a black box that only my sharepoint Server can query. due to IT security, only sharepoint servers are allowed to submit queries to my DB.(Like Stored procedure) and use these data in my visual studio application.

I'm totally lost, after some searches, two things look like possible: WCF or BCS? For you, what would it be the easiest and the fastest way to deploy this solution? and how?

Many thanks in advance for your help

1 Answer 1


BCS would most likely be the way to go for you. But that will abstract away the real source of the data and it will feel more like a sharepoint list that a SQL datasource. But it will be the SP Server who will talk to SQL

  • Thank for your reply but with this solution I could pass some Parameters from my app to SQL passing by sharepoint?
    – freedumz
    Commented Mar 30, 2018 at 11:04
  • If this is an OnPrem SharePoint, the best solution would most likely be a dedicated hole in the firewall. Another option could be a webservice. Or if you are in the cloud Flow might be an option with a data gateway. But it sounds like you are on prem. BCS CAN be used with parameters, but it will behave like a list, not like a SQL datasource. You need to do simple CRUD on one list or more complex stuff? More complex -> webservice. Also get the network guys to open a port for you so you can test and debug locally. Commented Mar 30, 2018 at 12:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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