Click here to Skip to main content
15,892,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Here am getting 500 internal server error from web.config file.. Please let me know where am getting problem..

Here am pasting my web.config file


XML
<?xml version="1.0"?>
<configuration>
    <system.webServer>
        <validation validateIntegratedModeConfiguration="false"/>
    </system.webServer>

    <system.web>
        <httpRuntime maxRequestLength="2097151"/>
        <sessionState timeout="540"/>
        <pages enableEventValidation="false" controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/>
        <!--
        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" targetFramework="4.0">
            <assemblies>
                <add assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
                <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
                <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            </assemblies>
        </compilation>
        <httpHandlers>
            <add verb="POST,GET" path="ajax/*.ashx" type="Ajax.PageHandlerFactory, Ajax"/>
        </httpHandlers>
        <customErrors mode="Off" >
        </customErrors>
    </system.web>

    <system.webServer>
        <httpErrors errorMode="Detailed"/>
        <asp scriptErrorSentToBrowser="true"/>
        <validation validateIntegratedModeConfiguration="false"/>
        <validation validateIntegratedModeConfiguration="false"/>
        <modules>
            <add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        </modules>
        <handlers>
            <remove name="WebServiceHandlerFactory-Integrated"/>
            <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
            <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.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=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        </handlers>
    </system.webServer>
</configuration>
Posted
Updated 2-Feb-14 22:40pm
v2
Comments
Maarten Kools 3-Feb-14 4:42am    
Usually there's a message in the event viewer regarding to the error. Possibly it's because you have the validation element in there twice. As well as the system.webserver element.
CoderPanda 3-Feb-14 4:55am    
What is the error?

You are getting errors because you have elements defined multiple times in your configuration. You need to remove the top system.webServer section, and you only need <validation validateIntegratedModeConfiguration="false"/> once.
 
Share this answer
 
Check all the Web.Config element tags are closed properly. Probably you should remove the multiple entries of elements like
XML
<system.webserver>
and
XML
<validation> 
too.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900