0

A year ago I uploaded a website to an IIS platform and it worked fine, but recently there have been malfunctions. The site manages the students of a school, and if I open a certain page with the data of a certain student, every event I trigger I get the error:

Failed to load resource: the server responded with a status of 500

I thought it was a code error, but if I log in locally via IP address the error does not occur. No errors are reported in the IIS log files. I developed the site with VB.NET using the .Net 4.0 Framework.

If we open the student page Marck with the website example.com\student.aspx ERROR

If we open the student page Maria with the website example.com\student.aspx OK

If we open the student page Marck with the website 192.168.1.1\student.aspx OK

I have no idea where the mistake might be. The only suspicion I have is that it is a communication error within IIS that leaves the communication hanging, but I don't know.

The real problem is that I don't know what to look for anymore. A new clue would be enough for me. Tell me what you need and I'll write it to you.

update: in the student data there is also a field with a slash inside (/) , when the slash was removed, the page started working again. could it be a localization problem? as Miguel said.

Check the browser language (Globalization) and the Url parameters, for example: example.com\student.aspx?st=Mark&value=11.12 and for some reason the value is pass as 11,12 that could generate an error dealing with values. Just a guess. – Miguel

this does not completely solve the problem for me. because another student with the slash in the data does not give me the problem.

update 2: When I insert the value "16/2" it doesn't work, instead if I insert in the inputbox "16/2." or "16/2g" works.

<input name="ctl00$ContentPlaceHolder1$txt_n_civ_residenza_alunno" type="text" value="14/6." id="ContentPlaceHolder1_txt_n_civ_residenza_alunno" style="width: 18%; vertical-align: middle; float: left;">

If I enter in the inputbox, numbers + slash + numbers does not work. In other cases it works.

For me it doesn't interpret the slash correctly. Is there any way to correct the formatting?

update 3: I went to the w3schools site to remove every possible variable. here too the error is repeated.

using this code:

<!DOCTYPE html>
<html>

<body>

  <h2>Text field</h2>
  <p>The <strong>input type="text"</strong> defines a one-line text input field:</p>

  <form action="/action_page.php">
    <label for="fname">First name:</label><br>
    <input type="text" id="fname" name="fname"><br>
    <label for="lname">Last name:</label><br>
    <input type="text" id="lname" name="lname"><br><br>
    <input type="submit" value="Submit">
  </form>

  <p>Note that the form itself is not visible.</p>
  <p>Also note that the default width of a text field is 20 characters.</p>

</body>

</html>

the result it returns to me if I insert in box 1/2 is "Illegal input".

why?

how do i handle the error?

CKK5L
  • 1
  • 2
  • 1
    Are there any unusual hidden characters in the value of the name with the problem? – Andrew Morton Oct 20 '21 at 17:07
  • Please provide enough code so others can better understand or reproduce the problem. – Community Oct 20 '21 at 20:42
  • It is difficult to reproduce your problem based on this messages, I suggest you use failed request tracking to view detailed error information. – samwu Oct 21 '21 at 09:46
  • You will probably need to change the aspx page to add your own logging within the page, so you can a better idea where the failure happens. – Joel Coehoorn Oct 21 '21 at 14:22
  • Check the browser language (Globalization) and the Url parameters, for example: example.com\student.aspx?st=Mark&value=11.12 and for some reason the value is pass as 11,12 that could generate an error dealing with values. Just a guess. – Miguel Oct 21 '21 at 22:32
  • 1) You need to encode the values in the query string, as some characters are not allowed: [asp .net query string encoding and decoding](https://stackoverflow.com/questions/13445121/asp-net-query-string-encoding-and-decoding). 2) Make sure that anything passed to a database in the code is using SQL parameters, as otherwise it is vulnerable to SQL injection attacks, which could get you into trouble; see [Little Bobby Tables](https://www.explainxkcd.com/wiki/index.php/Little_Bobby_Tables) for an introduction to the problem. – Andrew Morton Oct 25 '21 at 15:34

0 Answers0