Today we had an incident that made me think. We have a project with a fairly standard configuration for web.config conversion for different configurations. There is a section that controls access to our DAO services, which looks like this:
<endpoint address="http://myserver/myservice1.svc/basicHttp" binding="basicHttpBinding" contract="MyAssembly.IItem" name="DataAccessEndPoint" kind="" endpointConfiguration="" /> <endpoint address="http://myserver/myservice2.svc/basicHttp" binding="basicHttpBinding" contract="MyAssembly.IItem2" name="LoggingEndPoint" kind="" endpointConfiguration="" />
And such a conversion:
<endpoint address="http://mytestserver/myservice1.svc" name="DaoEndPoint" xdt:Transform="SetAttributes" xdt:Locator="Match(name)" /> <endpoint address="http://mytestserver/myservice2.svc" name="LoggingEndPoint" xdt:Transform="SetAttributes" xdt:Locator="Match(name)" />
I hope you noticed an error here - the name for DaoEndPoint does not match. Unfortunately, the developer who created it did not perform local debugging regarding live services, which is why the test deployment, yup, pointed to live . Fortunately, we quickly picked it up, but I'm sure you can see the potential danger here!
I thought about your intentions when creating the transformation files, and it seems to me that if you introduce a transformation, you intend to convert something . Therefore, it would be nice if the conversion (and therefore the deployment) were unsuccessful if there was a DaoEndPoint transformation, but there was no corresponding DaoEndPoint element in the main .config file.
So, Iām sort of collecting the opinions of people, is that what would be useful? Is this too much? Have I completely missed the point?
Also, is there anything that does this? I am happy to fork out and develop a solution, but I would be happier if someone did the work for me;)
source share