I Have a custom section in Web.Config file and referring another .config file through configSource. I have generated .cs file using the XSD for my schema. How to use my generated classes to deserialize the config. When I try to load the configsection using .GetSection() method, it gives me error that the class should implement from ConfigurationSection. Since I have generated the classes using xsd, they were not inherited from ConfigurationSection or ConfigurationElement. Thanks in advance!!
I Have a custom section in Web.Config file and referring another .config file through
Share
I have implemented the class from ConfigurationSection to get the file name and using XMLSerializer to Deserialize using the classes generated by XSD tool. Here is sample:
I cannot use the configSource attribute as my property while specifying the custom config, because it is reserved by ConfigurationManager.