Click here to Skip to main content
15,907,910 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Hi, I want to adding logo to image. I found some sample code on internet. But I can't working. I get this error.


HTTP Error 500.23 - Internal Server Error

An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode.



Most likely causes:
•This application defines configuration in the system.web/httpHandlers section.


I tried pipeline mode 'Classic'.

My web.config code

XML
<configuration>
  <system.web>
    <compilation debug="true" targetFramework="4.0" />
    <httpRuntime targetFramework="4.0" />
    <httpHandlers>
      <add verb="*" path="*.jpg" type="JpegHandler" validate="true" />
    </httpHandlers>
  </system.web>
  <system.webServer>
    <handlers>
      <add verb="*" path="*.jpg" name="JpegHandler" type="JpegHandler"/>
    </handlers>
    <!--<validation validateIntegratedModeConfiguration="false"/>-->
  </system.webServer>
</configuration>



if uncomment this tag i'dont this exception but httphandler not work.
<validation validateIntegratedModeConfiguration="false"/>

what should I do?
Posted
Updated 5-Sep-13 20:31pm
v2

1 solution

try adding this to your handler entry: preCondition="integratedMode"

HTML
<system.webserver>
    <handlers> 
          <add verb="*" path="*.jpg" name="JpegHandler" type="JpegHandler" precondition="integratedMode" />
    </handlers>
</system.webserver>
 
Share this answer
 

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