Solved

Cant find repetition in config file! - error: sections must only appear once per config file

Posted on 2008-10-23
3
496 Views
Last Modified: 2008-10-27
I'm either blind or something else is going on. It was working fine until I upgraded to .Net framework 3.5 and now I get this error:

"sections must only appear once per config file"

But I can't seem to find the repetition. Help!


<?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>
	<system.web>
		<customErrors mode="Off"/>
		<compilation>
			<assemblies>
				<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
      </assemblies>
    </compilation>
  </system.web>
 
	<system.net>
		<mailSettings>
			<smtp from="denisaherne@rocs.co.uk">
				<network host="localhost"/>
			</smtp>
		</mailSettings>
	</system.net>
  
  <location path="Accounts/AddUsers.aspx">
		<system.web>
			<authorization>
				<allow roles="superuser"/>
				<deny users="*"/>
			</authorization>
		</system.web>
	</location>
	
  <location path="Accounts/EditUsers.aspx">
		<system.web>
			<authorization>
				<allow roles="superuser"/>
				<deny users="*"/>
			</authorization>
		</system.web>
	</location>
	
  <location path="Accounts/DeleteUsers.aspx">
		<system.web>
			<authorization>
				<allow roles="superuser"/>
				<deny users="*"/>
			</authorization>
		</system.web>
	</location>
	
  <location path="Accounts/Pods.aspx">
		<system.web>
			<authorization>
				<allow roles="superclient,clientuser,clientbooker"/>
				<deny users="*"/>
			</authorization>
		</system.web>
	</location>
	
  <location path="Accounts/Docket_popup.aspx">
		<system.web>
			<authorization>
				<allow roles="superclient,clientuser,clientbooker"/>
				<deny users="*"/>
			</authorization>
		</system.web>
	</location>
	
  <location path="Accounts/Dockets.aspx">
		<system.web>
			<authorization>
				<allow roles="superclient,clientuser,clientbooker"/>
				<deny users="*"/>
			</authorization>
		</system.web>
	</location>
	
  <location path="Accounts/ClientAddUsers.aspx">
		<system.web>
			<authorization>
				<allow roles="superclient"/>
				<deny users="*"/>
			</authorization>
		</system.web>
	</location>
	
  <location path="Accounts/ClientEditUsers.aspx">
		<system.web>
			<authorization>
				<allow roles="superclient"/>
				<deny users="*"/>
			</authorization>
		</system.web>
	</location>
	
  <location path="Accounts/ClientDeleteUsers.aspx">
		<system.web>
			<authorization>
				<allow roles="superclient"/>
				<deny users="*"/>
			</authorization>
		</system.web>
	</location>
	
  <location path="Accounts/NewJob.aspx">
		<system.web>
			<authorization>
				<allow roles="superclient, clientbooker"/>
				<deny users="*"/>
			</authorization>
		</system.web>
	</location>
	
  <location path="Accounts/Maintanence">
		<system.web>
			<authorization>
				<allow roles="admin"/>
				<deny users="*"/>
			</authorization>
		</system.web>
	</location>
	
 
	
  <connectionStrings>
		<add name="pgRocsConnectionString" connectionString="Dsn=pgRocs;database=pgRocs;server=localhost;port=5432;uid=postgres;sslmode=disable;readonly=0;protocol=7.4;fakeoidindex=0;showoidcolumn=0;rowversioning=0;showsystemtables=0;fetch=100;socket=4096;unknownsizes=0;maxvarcharsize=255;maxlongvarcharsize=8190;debug=0;commlog=0;optimizer=1;ksqo=1;usedeclarefetch=0;textaslongvarchar=1;unknownsaslongvarchar=0;boolsaschar=1;parse=0;cancelasfreestmt=0;extrasystableprefixes=dd_;lfconversion=1;updatablecursors=1;disallowpremature=0;trueisminus1=0;bi=0;byteaaslongvarbinary=0;useserversideprepare=0;lowercaseidentifier=0;xaopt=1" providerName="System.Data.Odbc"/>
	</connectionStrings>
 
  <system.web>
    <!-- 
            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"/>
  
    <!--
            The <authentication> section enables configuration 
            of the security authentication mode used by 
            ASP.NET to identify an incoming user. 
        -->
    <authentication mode="Forms">
      <forms name="MyCookie" loginUrl="Login.aspx" protection="All" timeout="30" path="/" />
    </authentication>
    <!--
            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>
        -->
  </system.web>
  
</configuration>

Open in new window

0
Comment
Question by:robaherne
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 7

Accepted Solution

by:
dctuck earned 500 total points
ID: 22787021
<system.web> appears once at the beginning, and then again at the end of the file....
0
 

Author Comment

by:robaherne
ID: 22787154
But they have their associated closing tags - <\system.web>... no?
0
 
LVL 13

Expert Comment

by:crazyman
ID: 22787597
Yes.
But you cant have them twice, just merge them into one.
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

Suggested Solutions

Title # Comments Views Activity
TimeZone, day light savings, Sql server, asp.net 6 38
edit .asp files 5 47
ASP.NET Content Page 3 51
Please explain purpose of GZIP 4 56
In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

740 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