Currently my web.config file has this:
<system.web>
<httpCookies httpOnlyCookies="true" requireSSL="true" />
</system.web>
I want requireSSL to be "true" in release and "false" in debug. How do I do this?
Currently my web.config file has this:
<system.web>
<httpCookies httpOnlyCookies="true" requireSSL="true" />
</system.web>
I want requireSSL to be "true" in release and "false" in debug. How do I do this?
Web.config does not support conditional statements.
This is typically handled in deployment. You can use transformation files. https://msdn.microsoft.com/en-us/library/dd465318(v=vs.100).aspx
Put this in your Web.Release.config file:
<httpCookies requireSSL="true" xdt:Transform="SetAttributes(requireSSL)"/>
Here's a handy tool from AppHarbor for testing the results of your transformations: https://webconfigtransformationtester.apphb.com/
I think this is something you are looking for
Please check this one
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"