Question

If I want to add this lines for configuring an asp.net MVC4 app,

<configuration>  
<startup useLegacyV2RuntimeActivationPolicy="true"><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup>  
</configuration>  

in which file should I put them? Should I create an app.config file or put them in the web.config file? I used to add them for a console app or class library app.config and I got what I need, but now I have an asp.net mvc4 project.

Was it helpful?

Solution

You can put it in app.config file.

But here is what you should know.

Web.config is for ASP.NET and ASP.NET MVC; app.config is for desktop applications and DLLs.

If you need to store any kind of parameter for your application that you can change without having to recompile, Web.config is the place to go.

Cheer!

OTHER TIPS

Add it in web.config file which resides in root directory.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top