1

I am assigned in a new ASP.Net MVC 4.0 project. Traditionally, we used to add configuration values, when testing team raise new new issues (E.g. globalization, maxQueryStringLength, machineKey). For this project, I am planning to take a new route.. All the frequently used configuration values, I am planning to add upfront… I created the following config values.. What are the other most frequently used \ common config values that are needed in an ASP.Net project?

system.web

<system.web>

    <!--Culture-->
    <globalization culture="en-US" uiCulture="en" />

    <!--Remove Custom Errors Mode in Production-->
    <customErrors mode="Off"/>

    <!--Impersonate-->
    <identity impersonate="true"/>

    <!--Session Mode and Timeout-->
    <sessionState mode="InProc" timeout="60" />

    <!--maxQueryStringLength-->
    <httpRuntime maxQueryStringLength="6000" />

    <!--machineKey-->
    <machineKey/>

    <!--authentication-->
    <authentication mode="Windows">
    </authentication>

    <!--authorization-->
    <authorization>
      <allow users="?" />
    </authorization>

  </system.web>

system.webServer

 <system.webServer>

    <security>

      <requestFiltering>
        <!--maxQueryString-->
        <requestLimits maxQueryString="6000" />
      </requestFiltering>

      <!--IIS Setting for Authentication-->
      <authentication>
        <anonymousAuthentication enabled="false" />
        <windowsAuthentication>
          <providers>
            <clear />
            <add value="NTLM" />
          </providers>
        </windowsAuthentication>
      </authentication>

    </security>

  </system.webServer>

1 Answer 1

1

It is a good practice to add connection strings to web.config as well. Not sure whether you require accessing data in this project, but if you do then you need to add the following to the web.config file as well.

<connectionStrings>
<add name="myConnectionString" connectionString="server=localhost;Database=myDb;uid=myUser;password=myPass;" />
</connectionStrings>
Sign up to request clarification or add additional context in comments.

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.