How do I get a friendly error page to replace the asp.net error page for url "WEB-INF./web.xml"?

502

Adding relaxedUrlToFileSystemMapping="true" to the httpRuntime node in the web.config allowed this url to get processed by ASP.Net MVC as expected.

<system.web>
  <httpRuntime relaxedUrlToFileSystemMapping="true" />
</system.web>
Share:
502

Related videos on Youtube

Jia Hao
Author by

Jia Hao

Updated on September 18, 2022

Comments

  • Jia Hao
    Jia Hao over 1 year

    i understand that there are lots of solution for datetimepicker, but im using a textbox in asp.net which textmode is Date, so i want to make sure that it only shows dates that is today or after.How can i do it?

    <div class="col-lg-6 mb-4">
    <asp:TextBox ID="endDateTb" CssClass="form-control" placeholder="EndDate" runat="server" TextMode="Date"></asp:TextBox>
    </div>

    Also, if the textbox date is past today's date (example, endDate = 2th Jan 2019, and now is 3th jan 2019), i would like the database to automatically call the delete query from database. Any idea how can i do it

    • ProgrammingLlama
      ProgrammingLlama over 5 years
      Please only add relevant tags :)
  • quentin-starin
    quentin-starin over 10 years
    Pages are configured for 404 and 500 and they display correctly in other error situations but for this url IIS is trumping.
  • Nathan C
    Nathan C over 10 years
    Are you using Tomcat? It looks like there's an actual vulnerability. I updated my answer (or will in the next few moments :))
  • quentin-starin
    quentin-starin over 10 years
    no Tomcat installed on that server. It's IIS 8 on Win Server 2012
  • Nathan C
    Nathan C over 10 years
    Then...why do you even have this folder? It's for Java/Servlet stuff.
  • quentin-starin
    quentin-starin over 10 years
    I don't have this folder. This site is failing a pci compliance scan because it doesn't like the default IIS error message that it gets back when checking this url for that vulnerability. The dot in the url seems to make it very difficult to catch the request with any sane method I've thought of in IIS/ASP.Net. If I go to any other made-up url in this app it does display our custom 404 page, this one does not however.
  • Nathan C
    Nathan C over 10 years
    Just to try, create that folder and see if it tosses an appropriate error then. Maybe even strip it of permissions so it tosses a 403.
  • quentin-starin
    quentin-starin over 10 years
  • Jia Hao
    Jia Hao over 5 years
    as for the question regarding delete query, can i know if it checks from database? because i need to do it on page_load and if enddate is up, it will not show any data from that column.
  • Tetsuya Yamamoto
    Tetsuya Yamamoto over 5 years
    The second problem depends on what kind of data with certain keys you want to delete, but you're not specified about that here so I just gave the condition to check both dates. You can use SELECT query to find out matched data and delete them afterwards.