?
Solved

Configuration Error in Web.Config

Posted on 2007-10-07
7
Medium Priority
?
920 Views
Last Modified: 2010-04-21
Line 43:             <configuration>
Line 44:                   <system.web>
Line 45:                         <customErrors mode="RemoteOnly">
 

Source File: C:\CDCWEB\NIOSHFY08\web.config

0
Comment
Question by:sageer123
7 Comments
 
LVL 7

Assisted Solution

by:skiltz
skiltz earned 100 total points
ID: 20030969
Maybe the site is being hosted on .net 1.1 where it needs to be 2.0???
0
 

Author Comment

by:sageer123
ID: 20031029
I am using 1.1 for development.  I am not sure about the production site,  I have had many problems with my config files.  My predesessor has put web.config everywhere in the app.  Please help me with 1.1
0
 
LVL 29

Accepted Solution

by:
QPR earned 200 total points
ID: 20031058
Go to IIS on the production server and go to the properties of the site, look at the "asp.net" tab there. This will tell you which version of the framework the site is running under. Was this site created using Visual Studio? If so then version 2003 defaults to v1.1 and 2005 defaults to 2.0
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 96

Assisted Solution

by:Bob Learned
Bob Learned earned 200 total points
ID: 20040642
The <configuration> element is usually much higher in the web.config file, and the error indicates the the <configuration> element is on line #43.  What does the complete web.config file look like?

Bob
0
 

Author Comment

by:sageer123
ID: 20042444
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
      <appSettings>
            <!-- <add key="ConnectionString"

            <add key="MgrRole" value="Division Manager" />      
            <add key="FinRole" value="Financial" />      
            <add key="LocalPath" value=" />
            <add key="FolderPath" value="" />
            <add key="WSSPath" value=" />
            <add key="IPsolutionVersion" value="1.0.0.117" />
            <add key="IPsolutionVersionUpdate" value="1.0.0.56" />            
            <add key="IPproductVersion" value="11.0.5531" />
            <add key="IPPIVersion" value="1.0.0.0" />
      </appSettings>
      <system.web>

            <!--  DYNAMIC DEBUG COMPILATION
                  Set compilation debug="true" to insert debugging symbols (.pdb information)
                  into the compiled page. Because this creates a larger file that executes
                  more slowly, you should set this value to true only when debugging and to
                  false at all other times. For more information, refer to the documentation about
                  debugging ASP.NET files.
            -->
            <compilation defaultLanguage="vb" debug="true" />

            <!--  CUSTOM ERROR MESSAGES
                  Set customErrors mode="On" or "RemoteOnly" to enable custom error messages, "Off" to disable.
                  Add <error> tags for each of the errors you want to handle.

                  "On" Always display custom (friendly) messages.
                  "Off" Always display detailed ASP.NET error information.
                  "RemoteOnly" Display custom (friendly) messages only to users not running
                  on the local Web server. This setting is recommended for security purposes, so
                  that you do not display application detail information to remote clients.
            -->
            <!-- enable custom errors for the application -->
            <!-- <customErrors mode="Off" defaultRedirect="ErrorPage.aspx" /> -->
           
                       
            <configuration>
                  <system.web>
                        <customErrors mode="RemoteOnly">
                  </system.web>
            </configuration>
           
            <!-- Sageer changed this line from Shawn to Sharieff -->
            <identity impersonate="true" />
             
            <!--  AUTHENTICATION
                  This section sets the authentication policies of the application. Possible modes are "Windows",
                  "Forms", "Passport" and "None"

                  "None" No authentication is performed.
                  "Windows" IIS performs authentication (Basic, Digest, or Integrated Windows) according to
                  its settings for the application. Anonymous access must be disabled in IIS.
                  "Forms" You provide a custom form (Web page) for users to enter their credentials, and then
                  you authenticate them in your application. A user credential token is stored in a cookie.
                  "Passport" Authentication is performed via a centralized authentication service provided
                  by Microsoft that offers a single logon and core profile services for member sites.
            -->
            <!--
            <authentication mode="Forms">
                  <forms name=" " loginUrl=" " protection="All" path="/" />
            </authentication>
           
            -->
   
            <!--  AUTHORIZATION
                  This section sets the authorization policies of the application. You can allow or deny access
                  to application resources by user or role. Wildcards: "*" mean everyone, "?" means anonymous
                  (unauthenticated) users.
            -->
             
            <authorization>
                  <allow users="*" /> <!-- Allow all users -->

                        <!--  <allow     users="[comma separated list of users]"
                                                roles="[comma separated list of roles]"/>
                              <deny      users="[comma separated list of users]"
                                                roles="[comma separated list of roles]"/>
                        -->
            </authorization>

            <!--  APPLICATION-LEVEL TRACE LOGGING
                  Application-level tracing enables trace log output for every page within an application.
                  Set trace enabled="true" to enable application trace logging.  If pageOutput="true", the
                  trace information will be displayed at the bottom of each page.  Otherwise, you can view the
                  application trace log by browsing the "trace.axd" page from your web application
                  root.
            -->
            <trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" />


            <!--  SESSION STATE SETTINGS
                  By default ASP.NET uses cookies to identify which requests belong to a particular session.
                  If cookies are not available, a session can be tracked by adding a session identifier to the URL.
                  To disable cookies, set sessionState cookieless="true".
            -->
            <sessionState
                        mode="InProc"
                        stateConnectionString="tcpip=127.0.0.1:42424"
                        sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
                        cookieless="false"
                        timeout="20"
            />

            <!--  GLOBALIZATION
                  This section sets the globalization settings of the application.
            -->
            <globalization requestEncoding="utf-8" responseEncoding="utf-8" />
             <pages enableSessionState="true"/>

      </system.web>
 
  <location path="default.aspx">
        <system.web>
            <authorization>
                <deny users="?" />
            </authorization>
        </system.web>
  </location>

</configuration>
0
 
LVL 96

Assisted Solution

by:Bob Learned
Bob Learned earned 200 total points
ID: 20043025
You can't have multiple <configuration> elements.  You need to fix this section:

<configuration>
    <system.web>
      <customErrors mode="RemoteOnly">
    </system.web>
 </configuration>

change to this:

      <customErrors mode="RemoteOnly">

Bob
0
 

Author Closing Comment

by:sageer123
ID: 31408066
Thanks guys.  My subsription to Experts-Exchange has already been paid off.

Sageer
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Screencast - Getting to Know the Pipeline
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month16 days, 20 hours left to enroll

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question