Search code examples
.netapp-configservice-reference

Refreshing service references updates the app.config


Every time I make changes to my WS and update the reference in Visual Studio, VS overwrites my app.config with additional unnecessary information. So when I start my client afterwards, I get this error:

An error was discovered processing the header

The changes that the code generator made was to remove this line from every binding (note I'm using customBinding/httpsTransport):

<security authenticationMode="UserNameOverTransport" includeTimestamp="false">
    <secureConversationBootstrap/>
</security>

Then I have to close the client, revert the app.config changes and restart the client which is a hassle.

I would prefer if the app.config would be left alone.

Are you experiencing the same problem and do you have a workaround?


Solution

  • Ended up doing this programmatically which solved the problem.