none
How to Encrypt section of web.config for WCF Router Service without aspNetCompatiblityEnabled="true", with BasicHttpBinding RRS feed

  • Question

  • Have a WCF Routing Service and one of the allowed bindings for the service is BasicHttpBinding (for use with some integration partners). Was going thru steps to start encrypting a section of the web.config, lets say connectionstrings. Many good references pointed out how to do this with aspnet_regiis  and by setting aspNetCompatiblityEnabled="true".  However, it appears that the combination of these three (WCF Router, BasicHttpBinding, aspNetCompatabilityEnabled true) creates a mess.

    An unexpected failure occurred. Applications should not attempt to handle this error. For diagnostic purposes, this English message is associated with the failure: 'Shouldn't allocate SessionChannels if session-less and impersonating'.

    Any insight in to why this combination would fail in such an exotic fashion? Almost as if it thought I was encrypting the message body.   I did find this old article where the same situation was observed:

    https://seroter.wordpress.com/2010/09/19/lesson-learned-wcf-routing-service-and-the-basichttpbinding/

    It seems that if  I eliminate BasicHttpBinding option in favor of say wsHttpBinding then the situation goes away, but then I'ld have to get various integration partners to start using Soap 1.2 instead of Soap 1.1.

    If I want to encrypt a section of the web.config for my WCF Router and use BasicHttpBinding on service endpoint, is this possible, and if so, how might I do it without aspnet_regiis? 

    Thanks!


    WilliamL 10 PRINT $Signature 20 END

    Thursday, June 23, 2016 4:12 PM

Answers

  • In the end, created own custom data encryption provider, referenced it within the web.config, and applied it to subsections as desired.  Did use aspnet_regiis  but did not need aspNetCompatiblityEnabled="true"  so plenty happy in the end.

    WilliamL 10 PRINT $Signature 20 END


    • Edited by WilliamML Thursday, July 7, 2016 12:21 PM
    • Marked as answer by WilliamML Thursday, July 7, 2016 12:21 PM
    Thursday, July 7, 2016 12:17 PM

All replies

  • If I want to encrypt a section of the web.config for my WCF Router and use BasicHttpBinding on service endpoint, is this possible, and if so, how might I do it without aspnet_regiis? 

    It is possible, but you need to use the aspnet_regiis.


    Saturday, June 25, 2016 5:46 AM
  • In the end, created own custom data encryption provider, referenced it within the web.config, and applied it to subsections as desired.  Did use aspnet_regiis  but did not need aspNetCompatiblityEnabled="true"  so plenty happy in the end.

    WilliamL 10 PRINT $Signature 20 END


    • Edited by WilliamML Thursday, July 7, 2016 12:21 PM
    • Marked as answer by WilliamML Thursday, July 7, 2016 12:21 PM
    Thursday, July 7, 2016 12:17 PM