locked
Server Error in '/' Application. RRS feed

  • Question

  • User1421620300 posted

    Can someone explain to me where to place these few lines of code in the web.config file? I am trying to launch local website in AZURE hosting, my first time at this.Thank You. 

    Server Error in '/' Application.


    Runtime Error

    Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine. 

    Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

    <!-- Web.Config Configuration File -->
    
    <configuration>
        <system.web>
            <customErrors mode="Off"/>
        </system.web>
    </configuration>


    Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

    <!-- Web.Config Configuration File -->
    
    <configuration>
        <system.web>
            <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
        </system.web>
    </configuration>

    WEBC.ONFIG

    <?xml version="1.0" encoding="utf-8"?>
    <!--
    For more information on how to configure your ASP.NET application, please visit
    http://go.microsoft.com/fwlink/?LinkId=152368
    -->


    <configuration>
    <configSections>
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    </configSections>
    <appSettings>
    <add key="webpages:Version" value="1.0.0.0" />
    <add key="ClientValidationEnabled" value="true" />
    <add key="UnobtrusiveJavaScriptEnabled" value="true" />
    </appSettings>
    <system.web>
    <compilation debug="true" targetFramework="4.0" />
    <authentication mode="Forms">
    <forms loginUrl="~/Account/LogOn" timeout="2880" />
    </authentication>
    <pages>
    <namespaces>
    <add namespace="System.Web.Helpers" />
    <add namespace="System.Web.Mvc" />
    <add namespace="System.Web.Mvc.Ajax" />
    <add namespace="System.Web.Mvc.Html" />
    <add namespace="System.Web.Routing" />
    <add namespace="System.Web.WebPages" />
    </namespaces>
    </pages>
    <profile defaultProvider="DefaultProfileProvider">
    <providers>
    <add name="DefaultProfileProvider" type="System.Web.Providers.DefaultProfileProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" applicationName="/" />
    </providers>
    </profile>
    <membership>
    <providers>
    <add connectionStringName="DefaultConnection" enablePasswordRetrieval="false"
    enablePasswordReset="true" requiresQuestionAndAnswer="false"
    requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6"
    minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10"
    applicationName="/" name="DefaultMembershipProvider" type="System.Web.Providers.DefaultMembershipProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    </providers>
    </membership>
    <roleManager>
    <providers>
    <add connectionStringName="DefaultConnection" applicationName="/"
    name="DefaultRoleProvider" type="System.Web.Providers.DefaultRoleProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    </providers>
    </roleManager>
    <!--
    If you are deploying to a cloud environment that has multiple web server instances,
    you should change session state mode from "InProc" to "Custom". In addition,
    change the connection string named "DefaultConnection" to connect to an instance
    of SQL Server (including SQL Azure and SQL Compact) instead of to SQL Server Express.
    -->
    <sessionState mode="InProc" customProvider="DefaultSessionProvider">
    <providers>
    <add name="DefaultSessionProvider" type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" />
    </providers>
    </sessionState>
    </system.web>
    <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <modules runAllManagedModulesForAllRequests="true" />
    </system.webServer>
    <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <dependentAssembly>
    <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
    <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="3.0.0.0" />
    </dependentAssembly>
    </assemblyBinding>
    </runtime>
    <connectionStrings>
    <add name="MusicStoreEntities" connectionString="Data Source=|DataDirectory|MvcMusicStore.sdf"
    providerName="System.Data.SqlServerCe.4.0" />
    <add name="Models_" connectionString="Data Source=(localdb)\v11.0; Initial Catalog=Models_-20150206121022; Integrated Security=True; MultipleActiveResultSets=True; AttachDbFilename=|DataDirectory|Models_-20150206121022.mdf"
    providerName="System.Data.SqlClient" />
    </connectionStrings>
    <system.data>
    <DbProviderFactories>
    <remove invariant="System.Data.SqlServerCe.4.0"/>
    <add name="Microsoft SQL Server Compact Data Provider 4.0" invariant="System.Data.SqlServerCe.4.0" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/>
    </DbProviderFactories>
    </system.data>
    </configuration>

    Sunday, April 3, 2016 1:45 AM

Answers

All replies