strong-daniel
asked on
web.config file error
I am getting "Section must only appear once per config file" error... I need an extra set of eyes for this. I have no idea what is appearing twice...
Can someone tell me? Thanks..
Here is the web.config.
<?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\Fra mework\v2. x\Config
-->
<configuration>
<appSettings>
<add key="ChartImageHandler" value="storage=file;timeou t=20;dir=c :\TempImag eFiles\;" />
</appSettings>
<httpHandlers>
<add path="ChartImg.axd" verb="GET,HEAD" type="System.Web.UI.DataVi sualizatio n.Charting .ChartHttp Handler, System.Web.DataVisualizati on, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad3 64e35" validate="false" />
</httpHandlers>
<handlers>
<add name="ChartImageHandler" preCondition="integratedMo de" verb="GET,HEAD" path="ChartImg.axd" type="System.Web.UI.DataVi sualizatio n.Charting .ChartHttp Handler, System.Web.DataVisualizati on, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad3 64e35" />
</handlers>
<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.
Visual Basic options:
Set strict="true" to disallow all data type conversions
where data loss can occur.
Set explicit="true" to force declaration of all variables.
-->
<compilation debug="true" strict="false" explicit="true">
<assemblies>
<add assembly="System.Web.Exten sions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD3 64E35"/>
<add assembly="System.Web.DataV isualizati on, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD3 64E35"/>
<add assembly="System.Windows.F orms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C56193 4E089"/></ assemblies ></compila tion>
<pages>
<namespaces>
<clear/>
<add namespace="System"/>
<add namespace="System.Collecti ons"/>
<add namespace="System.Collecti ons.Generi c"/>
<add namespace="System.Collecti ons.Specia lized"/>
<add namespace="System.Configur ation"/>
<add namespace="System.Text"/>
<add namespace="System.Text.Reg ularExpres sions"/>
<add namespace="System.Web"/>
<add namespace="System.Web.Cach ing"/>
<add namespace="System.Web.Sess ionState"/ >
<add namespace="System.Web.Secu rity"/>
<add namespace="System.Web.Prof ile"/>
<add namespace="System.Web.UI"/ >
<add namespace="System.Web.UI.W ebControls "/>
<add namespace="System.Web.UI.W ebControls .WebParts" />
<add namespace="System.Web.UI.H tmlControl s"/>
</namespaces>
</pages>
<!--
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="GenericEr rorPage.ht m">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm " />
</customErrors>
-->
</system.web>
</configuration>
Can someone tell me? Thanks..
Here is the web.config.
<?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\Fra
-->
<configuration>
<appSettings>
<add key="ChartImageHandler" value="storage=file;timeou
</appSettings>
<httpHandlers>
<add path="ChartImg.axd" verb="GET,HEAD" type="System.Web.UI.DataVi
</httpHandlers>
<handlers>
<add name="ChartImageHandler" preCondition="integratedMo
</handlers>
<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.
Visual Basic options:
Set strict="true" to disallow all data type conversions
where data loss can occur.
Set explicit="true" to force declaration of all variables.
-->
<compilation debug="true" strict="false" explicit="true">
<assemblies>
<add assembly="System.Web.Exten
<add assembly="System.Web.DataV
<add assembly="System.Windows.F
<pages>
<namespaces>
<clear/>
<add namespace="System"/>
<add namespace="System.Collecti
<add namespace="System.Collecti
<add namespace="System.Collecti
<add namespace="System.Configur
<add namespace="System.Text"/>
<add namespace="System.Text.Reg
<add namespace="System.Web"/>
<add namespace="System.Web.Cach
<add namespace="System.Web.Sess
<add namespace="System.Web.Secu
<add namespace="System.Web.Prof
<add namespace="System.Web.UI"/
<add namespace="System.Web.UI.W
<add namespace="System.Web.UI.W
<add namespace="System.Web.UI.H
</namespaces>
</pages>
<!--
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="GenericEr
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm
</customErrors>
-->
</system.web>
</configuration>
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I think there is something wrong with my web.config file...
I tried taking out several things and I still get the error...
I tried taking out several things and I still get the error...
Why do you need <handlers> section? Don't you need only <httphandlers> ??
ASKER
I am going off what the Microsoft guys said in their little bit of documentation about MSCharts....
I got this to work. For some reason Visual Studio 2008 was (I think) corrupting the web.config file when I would drag and drop a MSChart onto my webpage.
SO what I did was download the samples for MSCharts, I copy the sample web.config into my project, and everything started working.
I am still going to give out the points because you guys helped place the entries into the right area in the web.config file.
I got this to work. For some reason Visual Studio 2008 was (I think) corrupting the web.config file when I would drag and drop a MSChart onto my webpage.
SO what I did was download the samples for MSCharts, I copy the sample web.config into my project, and everything started working.
I am still going to give out the points because you guys helped place the entries into the right area in the web.config file.
ASKER
Thanks for all the help.
ASKER
Here is the new web.config... but the error still shows...
<?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\Fra
-->
<configuration>
<appSettings>
<add key="ChartImageHandler" value="storage=file;timeou
</appSettings>
<system.web>
<httpHandlers>
<add path="ChartImg.axd" verb="GET,HEAD" type="System.Web.UI.DataVi
</httpHandlers>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
Visual Basic options:
Set strict="true" to disallow all data type conversions
where data loss can occur.
Set explicit="true" to force declaration of all variables.
-->
<compilation debug="true" strict="false" explicit="true">
<assemblies>
<add assembly="System.Web.Exten
<add assembly="System.Web.DataV
<add assembly="System.Windows.F
<pages>
<namespaces>
<clear />
<add namespace="System" />
<add namespace="System.Collecti
<add namespace="System.Collecti
<add namespace="System.Collecti
<add namespace="System.Configur
<add namespace="System.Text" />
<add namespace="System.Text.Reg
<add namespace="System.Web" />
<add namespace="System.Web.Cach
<add namespace="System.Web.Sess
<add namespace="System.Web.Secu
<add namespace="System.Web.Prof
<add namespace="System.Web.UI" />
<add namespace="System.Web.UI.W
<add namespace="System.Web.UI.W
<add namespace="System.Web.UI.H
</namespaces>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI.D
assembly="System.Web.DataV
</controls>
</pages>
<!--
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="GenericEr
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm
</customErrors>
-->
</system.web>
<system.webServer>
<handlers>
<add name="ChartImageHandler" preCondition="integratedMo
</handlers>
</system.webServer>
</configuration>