IIS httpErrors ExecuteURL appends weird query string like 500;http://mysite.com/failed-page to the target URL Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Come Celebrate our 10 Year Anniversary!Why won't IIS execute my custom 404 page? It tries to serve up the raw source code insteadCan't get PHP Errors in IIS7.5Disabling IIS 7.5 server error response for 5xx and 4xx HTTP status codesIIS URL Rewrite Module Query String ParametersCan I include the path and query string in an IIS “Error Pages” redirect?Make Apache or IIS add a header if a certain query string is presentTrailing dots in url result in empty 404 page on IISHow do I get a friendly error page to replace the asp.net error page for url “WEB-INF./web.xml”?Why does iis produce 500 response on all requests?IIS 7.5 - application foldername redirecting to match case and dropping query string

Table formatting with tabularx?

How to make triangles with rounded sides and corners? (squircle with 3 sides)

Did John Wesley plagiarize Matthew Henry...?

NIntegrate on a solution of a matrix ODE

The bible of geometry: Is there a modern treatment of geometries from the most primitive to the most advanced?

Marquee sign letters

Can two people see the same photon?

Did any compiler fully use 80-bit floating point?

Why can't fire hurt Daenerys but it did to Jon Snow in season 1?

newbie Q : How to read an output file in one command line

Statistical analysis applied to methods coming out of Machine Learning

In musical terms, what properties are varied by the human voice to produce different words / syllables?

As a dual citizen, my US passport will expire one day after traveling to the US. Will this work?

How to ask rejected full-time candidates to apply to teach individual courses?

Twin's vs. Twins'

Should man-made satellites feature an intelligent inverted "cow catcher"?

How to achieve cat-like agility?

Putting class ranking in CV, but against dept guidelines

Why did Bronn offer to be Tyrion Lannister's champion in trial by combat?

Is there a spell that can create a permanent fire?

How to make an animal which can only breed for a certain number of generations?

latest version of QGIS fails to edit attribute table of GeoJSON file

First paper to introduce the "principal-agent problem"

Where and when has Thucydides been studied?



IIS httpErrors ExecuteURL appends weird query string like 500;http://mysite.com/failed-page to the target URL



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)
Come Celebrate our 10 Year Anniversary!Why won't IIS execute my custom 404 page? It tries to serve up the raw source code insteadCan't get PHP Errors in IIS7.5Disabling IIS 7.5 server error response for 5xx and 4xx HTTP status codesIIS URL Rewrite Module Query String ParametersCan I include the path and query string in an IIS “Error Pages” redirect?Make Apache or IIS add a header if a certain query string is presentTrailing dots in url result in empty 404 page on IISHow do I get a friendly error page to replace the asp.net error page for url “WEB-INF./web.xml”?Why does iis produce 500 response on all requests?IIS 7.5 - application foldername redirecting to match case and dropping query string



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








7















I've noticed weird behavior in IIS error pages. I've got this setup:



<httpErrors errorMode="Custom" existingResponse="Replace">
<remove statusCode="500" />
<error statusCode="500" responseMode="ExecuteURL" path="/error-page" />
</httpErrors>


Sometimes when an ASP.NET error occurs due to the query string being too long, then immediately the second error occurs while trying to execute the error page URL. I've tracked the problem to the fact that IIS appends the original url to the error page url like:



Original: http://example.com/someurl?id=some_very_long_query_string_causing_security_exception
Error: /error-page?500;http://example.com/someurl?id=some_very_long_query_string_causing_security_exception


This is a huge problem. If the original url fails for having a query string too long then the error page with the the appended stuff fails as well because it has a query string that is even longer!



I believe this is the dumbest bug in IIS. Does anyone know if there was some patch of service pack for that? Worst case scenario if nothing is fixed by now, is there a way to disable this behavior or any tricks to stop IIS appending unsolicited stuff to the error page? Because it breaks the whole custom error page mechanism.










share|improve this question
























  • Sir, I faced same problem. Did you solve it?

    – Denis
    Nov 24 '15 at 21:55






  • 1





    +1 I've asked the same question on StackOverflow here. Would love an answer.

    – Muhammad Rehan Saeed
    Apr 10 '16 at 7:22

















7















I've noticed weird behavior in IIS error pages. I've got this setup:



<httpErrors errorMode="Custom" existingResponse="Replace">
<remove statusCode="500" />
<error statusCode="500" responseMode="ExecuteURL" path="/error-page" />
</httpErrors>


Sometimes when an ASP.NET error occurs due to the query string being too long, then immediately the second error occurs while trying to execute the error page URL. I've tracked the problem to the fact that IIS appends the original url to the error page url like:



Original: http://example.com/someurl?id=some_very_long_query_string_causing_security_exception
Error: /error-page?500;http://example.com/someurl?id=some_very_long_query_string_causing_security_exception


This is a huge problem. If the original url fails for having a query string too long then the error page with the the appended stuff fails as well because it has a query string that is even longer!



I believe this is the dumbest bug in IIS. Does anyone know if there was some patch of service pack for that? Worst case scenario if nothing is fixed by now, is there a way to disable this behavior or any tricks to stop IIS appending unsolicited stuff to the error page? Because it breaks the whole custom error page mechanism.










share|improve this question
























  • Sir, I faced same problem. Did you solve it?

    – Denis
    Nov 24 '15 at 21:55






  • 1





    +1 I've asked the same question on StackOverflow here. Would love an answer.

    – Muhammad Rehan Saeed
    Apr 10 '16 at 7:22













7












7








7








I've noticed weird behavior in IIS error pages. I've got this setup:



<httpErrors errorMode="Custom" existingResponse="Replace">
<remove statusCode="500" />
<error statusCode="500" responseMode="ExecuteURL" path="/error-page" />
</httpErrors>


Sometimes when an ASP.NET error occurs due to the query string being too long, then immediately the second error occurs while trying to execute the error page URL. I've tracked the problem to the fact that IIS appends the original url to the error page url like:



Original: http://example.com/someurl?id=some_very_long_query_string_causing_security_exception
Error: /error-page?500;http://example.com/someurl?id=some_very_long_query_string_causing_security_exception


This is a huge problem. If the original url fails for having a query string too long then the error page with the the appended stuff fails as well because it has a query string that is even longer!



I believe this is the dumbest bug in IIS. Does anyone know if there was some patch of service pack for that? Worst case scenario if nothing is fixed by now, is there a way to disable this behavior or any tricks to stop IIS appending unsolicited stuff to the error page? Because it breaks the whole custom error page mechanism.










share|improve this question
















I've noticed weird behavior in IIS error pages. I've got this setup:



<httpErrors errorMode="Custom" existingResponse="Replace">
<remove statusCode="500" />
<error statusCode="500" responseMode="ExecuteURL" path="/error-page" />
</httpErrors>


Sometimes when an ASP.NET error occurs due to the query string being too long, then immediately the second error occurs while trying to execute the error page URL. I've tracked the problem to the fact that IIS appends the original url to the error page url like:



Original: http://example.com/someurl?id=some_very_long_query_string_causing_security_exception
Error: /error-page?500;http://example.com/someurl?id=some_very_long_query_string_causing_security_exception


This is a huge problem. If the original url fails for having a query string too long then the error page with the the appended stuff fails as well because it has a query string that is even longer!



I believe this is the dumbest bug in IIS. Does anyone know if there was some patch of service pack for that? Worst case scenario if nothing is fixed by now, is there a way to disable this behavior or any tricks to stop IIS appending unsolicited stuff to the error page? Because it breaks the whole custom error page mechanism.







iis iis-7.5






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 5 '14 at 18:58









Andrew Schulman

6,437102241




6,437102241










asked Apr 5 '14 at 10:08









bunnybunny

363




363












  • Sir, I faced same problem. Did you solve it?

    – Denis
    Nov 24 '15 at 21:55






  • 1





    +1 I've asked the same question on StackOverflow here. Would love an answer.

    – Muhammad Rehan Saeed
    Apr 10 '16 at 7:22

















  • Sir, I faced same problem. Did you solve it?

    – Denis
    Nov 24 '15 at 21:55






  • 1





    +1 I've asked the same question on StackOverflow here. Would love an answer.

    – Muhammad Rehan Saeed
    Apr 10 '16 at 7:22
















Sir, I faced same problem. Did you solve it?

– Denis
Nov 24 '15 at 21:55





Sir, I faced same problem. Did you solve it?

– Denis
Nov 24 '15 at 21:55




1




1





+1 I've asked the same question on StackOverflow here. Would love an answer.

– Muhammad Rehan Saeed
Apr 10 '16 at 7:22





+1 I've asked the same question on StackOverflow here. Would love an answer.

– Muhammad Rehan Saeed
Apr 10 '16 at 7:22










2 Answers
2






active

oldest

votes


















0














I similar issue a long time ago, the system in question uses static error pages because of it.



You can set that in the defaultResponseMode to file which will serves back a single static page.



httpErrors Element IIS Settings Schema



There is also a similar issue here






share|improve this answer






























    0














    Adding a trailing slash to the path (e.g. path="/error-page/") will stop the error code and URL being appended, note that it will keep the original failing URL, e.g.



    • If there is no trailing slash, then the contents of error-page will be shown with the URL:
      http://example.com/error-page?500;http://example.com/failingpage

    • If there is a trailing slash, then the contents of error-page will be shown with the URL:
      http://example.com/failingpage





    share|improve this answer








    New contributor




    mitchjhill is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.




















      Your Answer








      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "2"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f586875%2fiis-httperrors-executeurl-appends-weird-query-string-like-500http-mysite-com%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0














      I similar issue a long time ago, the system in question uses static error pages because of it.



      You can set that in the defaultResponseMode to file which will serves back a single static page.



      httpErrors Element IIS Settings Schema



      There is also a similar issue here






      share|improve this answer



























        0














        I similar issue a long time ago, the system in question uses static error pages because of it.



        You can set that in the defaultResponseMode to file which will serves back a single static page.



        httpErrors Element IIS Settings Schema



        There is also a similar issue here






        share|improve this answer

























          0












          0








          0







          I similar issue a long time ago, the system in question uses static error pages because of it.



          You can set that in the defaultResponseMode to file which will serves back a single static page.



          httpErrors Element IIS Settings Schema



          There is also a similar issue here






          share|improve this answer













          I similar issue a long time ago, the system in question uses static error pages because of it.



          You can set that in the defaultResponseMode to file which will serves back a single static page.



          httpErrors Element IIS Settings Schema



          There is also a similar issue here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 29 '18 at 9:40









          RickWebRickWeb

          11312




          11312























              0














              Adding a trailing slash to the path (e.g. path="/error-page/") will stop the error code and URL being appended, note that it will keep the original failing URL, e.g.



              • If there is no trailing slash, then the contents of error-page will be shown with the URL:
                http://example.com/error-page?500;http://example.com/failingpage

              • If there is a trailing slash, then the contents of error-page will be shown with the URL:
                http://example.com/failingpage





              share|improve this answer








              New contributor




              mitchjhill is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.
























                0














                Adding a trailing slash to the path (e.g. path="/error-page/") will stop the error code and URL being appended, note that it will keep the original failing URL, e.g.



                • If there is no trailing slash, then the contents of error-page will be shown with the URL:
                  http://example.com/error-page?500;http://example.com/failingpage

                • If there is a trailing slash, then the contents of error-page will be shown with the URL:
                  http://example.com/failingpage





                share|improve this answer








                New contributor




                mitchjhill is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






















                  0












                  0








                  0







                  Adding a trailing slash to the path (e.g. path="/error-page/") will stop the error code and URL being appended, note that it will keep the original failing URL, e.g.



                  • If there is no trailing slash, then the contents of error-page will be shown with the URL:
                    http://example.com/error-page?500;http://example.com/failingpage

                  • If there is a trailing slash, then the contents of error-page will be shown with the URL:
                    http://example.com/failingpage





                  share|improve this answer








                  New contributor




                  mitchjhill is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.










                  Adding a trailing slash to the path (e.g. path="/error-page/") will stop the error code and URL being appended, note that it will keep the original failing URL, e.g.



                  • If there is no trailing slash, then the contents of error-page will be shown with the URL:
                    http://example.com/error-page?500;http://example.com/failingpage

                  • If there is a trailing slash, then the contents of error-page will be shown with the URL:
                    http://example.com/failingpage






                  share|improve this answer








                  New contributor




                  mitchjhill is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.









                  share|improve this answer



                  share|improve this answer






                  New contributor




                  mitchjhill is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.









                  answered Apr 15 at 18:10









                  mitchjhillmitchjhill

                  1




                  1




                  New contributor




                  mitchjhill is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.





                  New contributor





                  mitchjhill is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.






                  mitchjhill is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.



























                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Server Fault!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f586875%2fiis-httperrors-executeurl-appends-weird-query-string-like-500http-mysite-com%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      How to write a 12-bar blues melodyI-IV-V blues progressionHow to play the bridges in a standard blues progressionHow does Gdim7 fit in C# minor?question on a certain chord progressionMusicology of Melody12 bar blues, spread rhythm: alternative to 6th chord to avoid finger stretchChord progressions/ Root key/ MelodiesHow to put chords (POP-EDM) under a given lead vocal melody (starting from a good knowledge in music theory)Are there “rules” for improvising with the minor pentatonic scale over 12-bar shuffle?Confusion about blues scale and chords

                      What if the end-user didn't have the required library?What is setup.py?What is a clean, pythonic way to have multiple constructors in Python?What does Ruby have that Python doesn't, and vice versa?What is the reason for having '//' in Python?How do I create a namespace package in Python?How to package shared objects that python modules depend on?setuptools vs. distutils: why is distutils still a thing?Navigation in Windows 10 vs code not going to virtualenv library when the same library is installed at user levelPython create package for local usePackaging a project that uses multiple python versionsWhy is permission denied on pip install except for when “--user” is included at end of command?

                      Esgonzo ibérico Índice Descrición Distribución Hábitat Ameazas Notas Véxase tamén "Acerca dos nomes dos anfibios e réptiles galegos""Chalcides bedriagai"Chalcides bedriagai en Carrascal, L. M. Salvador, A. (Eds). Enciclopedia virtual de los vertebrados españoles. Museo Nacional de Ciencias Naturales, Madrid. España.Fotos