How to load different endpoints for WCF in SQL CLR?

We are deploying several new WCF calls to our SQL 2005 database using the CLR. During testing, I hard-coded the endpoint in the code to connect to it and deployed it to our test server. When we go to deploy this to production, we will deploy it to many different SQL databases and use different endpoints to connect to the same service on different servers. How can I do that? Is there a configuration file that can be referenced to deploy the dll in SQL?

+3
source share
2 answers

The solutions above will work, but we found that the best practice approach would be to create a new table that stores all the different endpoints in the database. Then we updated the CLR to call this table to get the endpoints (points) that were needed. Thus, each server will have the corresponding metadata loaded for it, and all of them will be extracted from the database. No hardcoding this way, and no need to worry about external text files on the SQL server. All this is contained in the database.

+2
source

Source: https://habr.com/ru/post/1697403/


All Articles