2

In ASP.NET Webforms, is there a possiblity to check at runtime if website as been precompiled or not ? (eg : a property that return a boolean)

To deploy a ASP.NET webforms website, there is two possibilities : to run website by just copy paste all code, or use compiler (eg :aspnet_compiler.exe ) to precompile code.

tigrou
  • 4,236
  • 5
  • 33
  • 59

1 Answers1

1

Yes, there's a built-in property for that: BuildManager.IsPrecompiledApp.

See https://msdn.microsoft.com/en-us/library/system.web.compilation.buildmanager.isprecompiledapp%28v=vs.110%29.aspx for the full reference (it doesn't say much).

Sean Werkema
  • 5,810
  • 2
  • 38
  • 42