Documentation > CMS Template API Library > FedAuthHosting > ValidateWebConfig(String,FedPublishingPackage,Boolean)
ValidateWebConfig
This is the same logic used on web.config files at publish time when publishing to packages where Fed Auth is enabled. You can use it to test your web.config's validity before publishing.
public System.String ValidateWebConfig(String,FedPublishingPackage,Boolean)
Parameters
Name | Description | Type |
---|---|---|
xml | The text of the web.config | System.String |
fedPackage | The current FedPublishingPackage. Use FedAuthHosting.GetFedPackage(PublishingPackage) to load | CrownPeak.CMSAPI.FedPublishingPackage |
needsFedAuthModule | true if the web.config is the root web.config. If it is a subapp, then the modules are not needed, but we will look for illegal entries and strip them. For example, you may not remove the authmodule in a sub app. | System.Boolean |