これは私の開発マシンで起こり、同じコードベースが本番環境で動作しています。だから私はこれがIIS/Frameworkの問題であると信じています。それはすべてのページに影響します。両方のサーバー上でASP.NETクライアント検証Javascript部分的レンダリング
、Page_Validatorsが正しく設定されている:
<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>
しかし、私の開発マシン上で、それが検証プロパティを設定するスクリプトブロックレンダリングされません。
<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>
を私が試してみましたaspnet_regiis -cを実行して検証スクリプトを再インストールします。私が-e(削除)と-i(インストール)のあとでそれを試してみて失敗しました。
アイデア?
お礼ありがとうございます。残念ながら、これらの設定は、あなたが述べたように既に設定されています。 Webアプリケーションのターゲットフレームワークは.NET Framework 2.0で、ビルドパスはIIS 6の仮想ディレクトリにマップされたフォルダです。ただし、デバッガ内で実行すると機能します。 – Mufaka
IISマネージャーにアクセスしてアプリケーションプールを表示すると、prodとdevの両方が同じアプリケーションプール設定に設定されていますか?私は、アプリケーションプールのモードが統合されているのではなくクラシックに設定されているときにも、同様のクライアントサイドフレームワークの失敗を経験したと思います。 – Brian
アプリケーションプールはデフォルトで、プロダクションとデベロッパーの両方が統合されています。私は回避策を持っているので、今は私にとっては「ホットな」問題ではなく、より待望の好奇心です。助けてくれてありがとう。 – Mufaka