0

I have a web site (as distinct from application) where the customerrors properties are defined in the Web.Config file like so:

<system.web>
    <customErrors mode="On" />
    <compilation debug="false" targetFramework="4.5.1">
      <assemblies>
        <add assembly="System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
      </assemblies>
    </compilation>
</system.web>

When the web site is first called upon, the web.config CHANGES, and the customerrors properties now look like this:

    <system.web>
        <customErrors mode="Off" />
        <compilation debug="true" targetFramework="4.5.1">
          <assemblies>
            <add assembly="System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
            <add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
          </assemblies>
        </compilation>
    </system.web>

Can anyone explain to me what is happening and why?

Martin Milan
  • 6,346
  • 2
  • 32
  • 44
  • Possible duplicate of [CustomErrors mode="Off"](https://stackoverflow.com/questions/101693/customerrors-mode-off) –  Jul 11 '18 at 10:58
  • When you compile your website, did you do it as release or debug? Make sure it's in Release build. – Mark Fitzpatrick Jul 11 '18 at 11:41
  • Perhaps I should be clear - I meant that is specifically a web site, as opposed to a Web Application. It gets compiled on demand... And thanks for taking the time... – Martin Milan Jul 11 '18 at 12:04

0 Answers0