1

This is happening on my development machine and the same codebase is working in production. So I believe this to be an IIS/Framework issue. It affects all pages.

On both servers, the Page_Validators are setup correctly:

<script type="text/javascript">
<!--
var Page_Validators =  new Array(document.getElementById("ValidatorInsurancePayerRequired"),
document.getElementById("ValidatorCheckPostDateRequired"),
document.getElementById("ValidatorCheckPostDateFormat"),
document.getElementById("ValidatorCheckNumberRequired"),
document.getElementById("ValidatorCheckTotalRequired"),
document.getElementById("ValidatorCheckTotalFormat"));
// -->
</script>

However, on my development machine it does not render the script block that sets the validation properties:

<script type="text/javascript">
<!--
var ValidatorInsurancePayerRequired = document.all ? document.all["ValidatorInsurancePayerRequired"] : document.getElementById("ValidatorInsurancePayerRequired");
ValidatorInsurancePayerRequired.controltovalidate = "txtPayer";
ValidatorInsurancePayerRequired.errormessage = "<br>Insurance Payer Is Required";
ValidatorInsurancePayerRequired.display = "Dynamic";
ValidatorInsurancePayerRequired.evaluationfunction = "RequiredFieldValidatorEvaluateIsValid";
ValidatorInsurancePayerRequired.initialvalue = "";
.
. all other Page Validators
.
// -->
</script>

I have tried running aspnet_regiis -c to reinstall the validation scripts. Failing that I tried that with a -e (remove) followed by -i (install).

Any ideas?

1 Answer 1

2
+100

What versions of .NET/IIS are you running? If this is a 2.0 implementation, try putting this in your web.config in the system.web section and see what happens:

<xhtmlConformance mode="Legacy"/>

Does this happen if you run using the ASP.Net Development Server?

Also, if tracing is enabled in development, try disabling it.

Short of these few suggestions, I'd really need a lot more info on your environments in order to assist further.

Sign up to request clarification or add additional context in comments.

4 Comments

Thanks for the suggestions. Unfortunately, these settings were already configured as you stated. The Target Framework for the web app is .NET Framework 2.0 and my build path is to a folder mapped to a virtual directory in IIS 6. It does work if I run within the debugger though.
If you go to the IIS Manager and view your App Pools are both prod and dev set to the same app pool configuration? I think I've also seen a similar client side framework failure when the application pool's mode is set to classic instead of integrated...
App Pool is default and both production and dev are integrated. I have a workaround so it's not a 'hot' issue for me now, more a curiosity that can wait. Thanks for the help.
What's your workaround? I'm pretty attached to you solving this by now :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.