ASP.NET - Error in Webconfig file

Asked By surya
06-Sep-10 05:23 AM

 
Hi everyone, 

I've just uploaded my ASP.NET application on a new web host. But now whenever I load any .aspx page, I get this error:

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>

 


my application is working perfectly on my local computer . this is my webconfig file any one can help me

<?xml version="1.0"?>
<!--
    Note: As an alternative to hand editing this file you can use the
    web admin tool to configure settings for your application. Use
    the Website->Asp.Net Configuration option in Visual Studio.
    A full list of settings and comments can be found in
    machine.config.comments usually located in
    \Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
 <configSections>
  <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
   <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
  <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
  <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
   <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
   <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
   <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
   <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
  </sectionGroup>
   </sectionGroup>
  </sectionGroup>
 </configSections>
 <appSettings>
       <add key="AccessConnString" value="User ID=xxx;pwd=xxx;Initial Catalog=xxx;MultipleActiveResultSets=True;Data Source=xxx"/>
       <add key="ChartImageHandler" value="storage=file;timeout=20;"/>
       <add key="AccessUrl" value="http://www.barikgroup.com/SJM%22/>
       <add key="MapPath" value="SJM"/>
       <add key="FolderPath" value="Files/"/>
     </appSettings>
 

     <connectionStrings>
       <add name="Excel03ConString" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};Extended Properties='Excel 8.0;HDR={1}'"/>
       <add name="Excel07ConString" connectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties='Excel 8.0;HDR={1}'"/>
       <add name="conString" connectionString="Data Source=xxx; database=xxx; User ID=xxx; Password=xxx"/>
       <add name="JMPConnectionString" connectionString="Data Source=xxx;Initial Catalog=xxx;User ID=xxx;Password=xxx"/>
     </connectionStrings>

 <system.web>
  <customErrors mode="RemoteOnly" defaultRedirect="Login.aspx"/>
  <!--
        Set compilation debug="true" to insert debugging
        symbols into the compiled page. Because this
        affects performance, set this value to true only
        during development.
      -->
  <compilation debug="true">
   <assemblies>
  <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
  <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
  <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
  <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                  <add assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
  <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
   </assemblies>
  </compilation>
  <!--
        The <authentication> section enables configuration
        of the security authentication mode used by
        ASP.NET to identify an incoming user.
      -->
  <authentication mode="Windows"/>
  <!--
        The <customErrors> section enables configuration
        of what to do if/when an unhandled error occurs
        during the execution of a request. Specifically,
        it enables developers to configure html error pages
        to be displayed in place of a error stack trace.

      <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
        <error statusCode="403" redirect="NoAccess.htm" />
        <error statusCode="404" redirect="FileNotFound.htm" />
      </customErrors>
      -->
  <pages>
   <controls>
  <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
  <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                 <add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting" assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
   </controls>
  </pages>
  <httpHandlers>
   <remove verb="*" path="*.asmx"/>
   <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
   <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
   <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
              <add path="ChartImg.axd" verb="GET,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
  </httpHandlers>
  <httpModules>
   <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
              <add name="Progress" type="WebSupergoo.ABCUpload6.ProgressModule, ABCUpload6, Version=6.0.0.0, Culture=neutral, PublicKeyToken=572826f585f78c3a"/>
  </httpModules>
 </system.web>
 <system.codedom>
  <compilers>
   <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
  <providerOption name="CompilerVersion" value="v3.5"/>
  <providerOption name="WarnAsError" value="false"/>
   </compiler>
   <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
  <providerOption name="CompilerVersion" value="v3.5"/>
  <providerOption name="OptionInfer" value="true"/>
  <providerOption name="WarnAsError" value="false"/>
   </compiler>
  </compilers>
 </system.codedom>
 <!--
      The system.webServer section is required for running ASP.NET AJAX under Internet
      Information Services 7.0.  It is not necessary for previous version of IIS.
    -->
 <system.webServer>
  <validation validateIntegratedModeConfiguration="false"/>
  <modules>
   <remove name="ScriptModule"/>
   <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
  </modules>
  <handlers>
   <remove name="WebServiceHandlerFactory-Integrated"/>
   <remove name="ScriptHandlerFactory"/>
   <remove name="ScriptHandlerFactoryAppServices"/>
   <remove name="ScriptResource"/>
             <remove name="ChartImageHandler"/>
   <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
   <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
   <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
              <add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD" path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
  </handlers>
 </system.webServer>
 <runtime>
  <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
   <dependentAssembly>
  <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
  <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
   </dependentAssembly>
   <dependentAssembly>
  <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856?d364e35"/>
  <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
   </dependentAssembly>
  </assemblyBinding>
 </runtime>
</configuration>


  harsh shah replied to surya
06-Sep-10 05:27 AM
Hi,

in a web config file set the

<customErrors mode="Off"/>


Regards,

Harsh Shah
  Anand Malli replied to surya
06-Sep-10 05:39 AM
Hi Surya,

with the help of what harsh has suggested you would be able to see what is the actual error right,but most likely error would be your virtual directory is not configured properly to allow access to anonymous users right,so in IIS just check weather you have that enable by doing following,and check some following details as well

1) open IIS by typing inetmgr at does promt
2) locate your directory of your site
3) right click it and open properties and see following

    a) Under Directory Security tab and in under that anonymous access and authentication control section click edit
        make sure "Anonymous Access" checkbox is checked

    b) check asp.net tab and see if you have selected right version of your dotnet version is selected

let me knw after doing these seting

thxs 
Create New Account
help
Net hi friends Any one send frequently asked Important questions in C# .Net, ADO .Net, Asp .Net and Sql Server. . . . . . . . tx in Advance. . . . . . Hi, Find this. . (B)What is an IL? (B A) What is scavenging? (B) What are different types of caching using cache object of ASP.NET? (B) How can you cache different version of same page using ASP.NET cache object? (A) How will implement Page Fragment Caching? (B) Can you compare ASP.NET sessions with classic ASP? (B) Which are the various modes of storing ASP.NET session
Interview Questions for .NET Framework This article is specially for the users those are in development or want to be Microsoft.Jet.OLEDB.4.0;”+ _ “Data Source = C: \ Documents and Settings \ User \ My Documents \ Visual Studio Projects \ 1209 \ db1.mdb”+ _ “User ID = Admin;”+ _ “Password = ;”); Dim cmd As New OleDbCommand in Sql server as var_name int How do you separate business logic while creating an ASP.NET application? There are two level of asp.net debugging 1. Page level debugging For this we have to edit the page level debugging the corresponding date and time written Steps are:- Creating a CalenderControl 1) To begin, open Visual Studio .NET and begin a new C# Windows Control Library. 2) You may name it
cannot display the webpage". plz help me! You can make use of inbuilt tool of visual studio publishing tool. The Publish Web Site tool precompiles the files in a Web site project you check the permission and authentication on your virtual directory ? yes! it showing exception Server Error in ' / Web' Application. Failed to access IIS metabase. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Web.Hosting.HostingEnvironmentException: Failed to access IIS metabase. The process account used to run ASP.NET must have read access to the IIS metabase (e.g. IIS: / / servername / W3SVC). For information
different features in all asp.net versions what are the diff features of asp.net all versions. in the below link you have upto 2.0 http: / / www.codeproject.com / KB / aspnet / ComparisonASP1xASP20.aspx Each version of the .NET Framework contains the common language runtime (CLR) as its core component, and includes additional components such class libraries and other managed libraries. This topic describes the key components of the .NET Framework versions, provides information about the underlying CLR versions and associated development environments, and identifies the the version history and which versions are installed by Windows. Components and Layers of .NET Framework versions See Installing the .NET Framework for information about installing the current version. For information about support for the .NET Framework
authentication modes and its implementation in projects hi, i am doing a project in asp.net. . i want to use a authentication mode in this project.it is a educational based do some authentication in this project. How To: Use Forms Authentication with SQL Server in ASP.NET 2.0 patterns & practices Developer Center J.D. Meier, Alex Mackman, Blaine Wastell, Prashant Bansode, Andy Wigley, Kishore Gopalan Microsoft Corporation August 2005 Applies To • ASP.NET version 2.0 • SQL Server 2000 Summary This How To shows you how you can authentication, create the user store database, grant database access to your Web application account, configure ASP.NET membership settings, and set password complexity rules. Contents Objectives Overview Summary of Steps Step 1