Web.Release.Config authentication attribute

798 views Asked by At

I defined a WebApi which takes the credetianls from the browser, it works. After deploying it I have to edit the Authentication on the server from Anonymouns to Windows. I tried to add <authentication mode="Windows"/> to the Web.Config.Release but it doesn't change... Why? Suggestions?

1

There are 1 answers

0
Gary McGill On BEST ANSWER

The .Release.Config file is not a .Config file as such - it's a file that describes how to transform the default Web.Config file into a new Web.Config file for release.

So, you don't simply add nodes to it - you need to specify the modifications you want to make using the defined syntax for this - see https://msdn.microsoft.com/library/dd465318(v=vs.100).aspx

In your case, you probably want something like:

...
<system.web>
    <authentication mode="Windows" xdt:Transform="SetAttributes" />
</system.web>
...