c# - Populate routetable of wcf from database -
i want add end points dynamically routing table of wcf.
code:
[aspnetcompatibilityrequirements(requirementsmode = aspnetcompatibilityrequirementsmode.allowed)] public class personservice : ipersonservice { [webinvoke(uritemplate = "", method = "get")] public void getperson() { string k = "a"; } } [servicecontract] public interface ipersonservice { [operationcontract] void getperson(); } public class global : system.web.httpapplication { protected void application_start(object sender, eventargs e) { routetable.routes.add(new serviceroute("api", new webservicehostfactory(), typeof(personservice))); } }
i have end points saved in database table below :
/customer/{customer}/address /customer/{customer}/address/{address}
now want populate routetable of wcf service hosted in iis environment , running.
i have search alot on internet couldnt find such in can dyncamically add end points routetable of wcf.
i appreciate if have done such , if can post code/link me.
thank :)
Comments
Post a Comment