I have a WCF 3.0 service which has been configured in the web.config
of my web application where it's hosted via an .svc
file:
<endpoint address="https://domain.co.uk/services/accountservice"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IAccountService"
contract="AccountServiceReference.IAccountService"
name="BasicHttpBinding_IAccountService" />
The address value shouldn't be in plain text in the web.config, as we'd like to encrypt it with an encryption algorithm that we have and only store the encrypted value there. How would that be possible?
I was thinking perhaps I should be programmatically hosting the WCF service in our IIS so that the address can be set at runtime by reading the EncryptedAddress
value from an AppSetting
then decrypting it at runtime. How would that be possible?
There are already several answers to your question in stack overflow, for example:
How to programatically set a single endpoint for a WCF service
How can I register a WCF service programmatically within an IIS environment
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.