2

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.

2 Answers 2

1

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!

Sign up to request clarification or add additional context in comments.

2 Comments

do you mean to create one ?
@nabil Check my edited answer. Hope it will help you.
0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.