Pregunta

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.

¿Fue útil?

Solución

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!

Otros consejos

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

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top