Saturday, March 31, 2012

Strange ASP.NET problem

i've 2 platform which i developed asp.net. 1 is a windows xp with iis5.1 and another 1 is a windows 2000 server.

Both have exactly the same .net framework.. regional settings.. and both are using the same codes and have compile with no problem in both platforms.

Then i've a webform which does a regular expression check on a date. It works perfectly fine in the windows xp machine, upon an invalid date (e.g. aaa, aa/aa/aaaa, 30/30/2222, etc), the message will come out. But when i run the exact same code in the win2k server, upon clicking an invalid date like in the winxp machine, it gives me this error:

The string was not recognized as a valid DateTime. There is a unknown word starting at index 0.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.FormatException: The string was not recognized as a valid DateTime. There is a unknown word starting at index 0.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Funny problem is that it worked on the winxp machine and not the win2k machine? What settings could i be missing in the OS itself? or iis?? Coz the source codes everything is the same.i found out its because the aspnet_client folder is missing thus the validation didn't work and got through the form.

Doesnt the asp.net validation work on the server side? It seems it just work in the client side through javascript. All the while i have the impression that the form validation works both on the client and have some check in the server side as well. But after this, when the javascript isnt available, it passes through.

0 comments:

Post a Comment