26

I have webpage which has gridview, one of the columns will have a image. When clicked on image it will open the PDF saved on the web server. It was working fine but I am getting below error

"HTTP Error 55.24 - Internal Server Error An Asp.NET setting has been detected that does not apply in Integrated managed pipeline mode."

I googled and did as suggested in HTTP Error 500.22 - Internal Server Error (An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode.) made sure application pool is classic and webconfig is correct but still I am getting that error when clicked on image which has to open the saved PDF... please help....

enter image description here

Community
  • 1
  • 1
msbyuva
  • 3,467
  • 13
  • 63
  • 87

5 Answers5

66

Your error is specifically to do with 'client impersonation'. I had the same error on one machine but not on another. By comparing settings I worked out the difference.

Start IIS Manager. Select the server in the left pane and double click 'Authentication' under the IIS group in the central pane. Select ASP.NET Impersonation and select 'Disable' at the top of the right pane.

Shane
  • 1,207
  • 13
  • 16
  • Shane.. thanks for the response..you are right..and there are other reasons for error too... in my case.. IIS was not installed/configured properly which is specific to ISAPI filter... – msbyuva May 02 '13 at 15:05
  • Thanks for your valuable answer, was struggling from past 2 days. You saved me. – A.T. Nov 09 '18 at 06:11
  • Thank you Shane, this was really helpful! – Yogi Apr 04 '19 at 17:17
  • Thank you very much @Shane. Just got what I was looking for. – Mohan Rajput Sep 05 '19 at 14:00
  • 2
    ASP.NET Imporsonation is disabled and validateIntegratedModeConfiguration="false" in Web config. But it is still not working. I am using the Default Website in IIS – Abdul Dec 09 '19 at 09:16
  • Somehow this got changed for me, i went and change the site level configuration and it fixed all the application under it, thanks! – Jacob Mar 25 '20 at 18:00
  • Thanks for your answer – Abraham Aug 20 '20 at 18:57
9

please add web.config

 <configuration>
 <system.webServer>
 <validation validateIntegratedModeConfiguration="false"/> 
</system.webServer> 
</configuration>
M.Ganji
  • 818
  • 8
  • 13
  • This is added in my web config but it is still not working. My website in on Default Website in IIS – Abdul Dec 09 '19 at 09:14
1

I changed in my application pool running the site. "Managed Pipline Mode" from integrated to classic.

right click on your application pool -> basic settings.

Learning Always
  • 1,563
  • 4
  • 29
  • 49
AJ AJ
  • 187
  • 2
  • 12
0

One may get this error when accessing a wrong path (e.g., on the url parameter of an Ajax call), even though all of the other answers suggestions were handled.

For the correct usage of (relative) paths, see this answer.

OfirD
  • 9,442
  • 5
  • 47
  • 90
-2

Your error is specifically to do with 'client impersonation'. I had the same error on one machine but not on another. By comparing settings I worked out the difference.

Start IIS Manager. Select the server in the left pane and double click 'Authentication' under the IIS group in the central pane. Select ASP.NET Impersonation and select 'Disable' at the top of the right pane.

Then, select the virtual directory and select the 'Authentication'. Anonymous Auth gonna be 'Enabled'

Bernabé Tavarez
  • 197
  • 1
  • 1
  • 6