By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,846 Members | 1,554 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,846 IT Pros & Developers. It's quick & easy.

validation controls not working on production server

P: n/a
I recently deployed a web application which contains a user registration
form with the usual fields: name, address, email, password, etc. Each of the
TextBoxes uses a validation control to verify the input. On my development
server, this form works precisely as expected.

When I deploy the app to the production server (a hosting service), the
client-side validation quits working altogether. Now, I KNOW that scripts
are enabled and working in my browser (I use the same browser to access the
app on both development and production servers), and I've changed NOTHING
whatsoever before uploading the application. All other functionality works
the same on both servers.

Any help with this issue would be greatly appreciated.

---e[ch]
Nov 17 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
It is most likely your WPP does not have the JavaScript scripts installed in
your application space. This is done with aspnet_regiis. If I remember
correctly, the correct flag for scripts is /c. Without the scripts
installed, you will either have to subclass the validation controls to point
at your own copies of the script, or ditch client side validation
altogether.

Now I will add a note about how to properly use validation. Despite having
Client Side validation, you should always check Page.IsValid prior to
submitting any code. This stops hackers from working around your form
validation to get errors to figure out your code, et al.

The Client side script is still useful, albeit when working, as it reduces
load on the server from multiple trips for validation. NOTE that validation
does not work, client side, in all browsers. This alone is a good reason for
server side checking.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************** ********************
Think Outside the Box!
************************************************** ********************
"earwicker" <ea*******@sbcglobal.net> wrote in message
news:xW*************@newssvr22.news.prodigy.com...
I recently deployed a web application which contains a user registration
form with the usual fields: name, address, email, password, etc. Each of the TextBoxes uses a validation control to verify the input. On my development
server, this form works precisely as expected.

When I deploy the app to the production server (a hosting service), the
client-side validation quits working altogether. Now, I KNOW that scripts
are enabled and working in my browser (I use the same browser to access the app on both development and production servers), and I've changed NOTHING
whatsoever before uploading the application. All other functionality works
the same on both servers.

Any help with this issue would be greatly appreciated.

---e[ch]

Nov 17 '05 #2

P: n/a
greg---

Thanks for your reply, but in the interim I have learned that you are not
entirely correct. You say:

"you will either have to subclass the validation controls to point

at your own copies of the script, or ditch client side validation

altogether."

This is false. You needn't go through the pain of subclassing the controls
at all. All you need to do is upload your own copy of WebUIValidation.js
(and the SmartNav script files, too, if you need them) to some directory
within your web application, and add the following line to your web.config
file:

<webControls
clientScriptsLocation="YourApp/YourScriptsDirectory/" />

And voila! It all works fine. Quick, easy, and painless.

Don't configuration files rock???

Thanks for your help,

---earwicker[ch]



"Cowboy (Gregory A. Beamer)" <No************@comcast.netNoSpamM> wrote in
message news:<OP**************@TK2MSFTNGP10.phx.gbl>...
It is most likely your WPP does not have the JavaScript scripts installed in your application space. This is done with aspnet_regiis. If I remember correctly, the correct flag for scripts is /c. Without the scripts installed, you will either have to subclass the validation controls to point at your own copies of the script, or ditch client side validation altogether. Now I will add a note about how to properly use validation. Despite having Client Side validation, you should always check Page.IsValid prior to submitting any code. This stops hackers from working around your form validation to get errors to figure out your code, et al. The Client side script is still useful, albeit when working, as it reduces load on the server from multiple trips for validation. NOTE that validation does not work, client side, in all browsers. This alone is a good reason for server side checking. -- Gregory A. Beamer MVP; MCP: +I, SE, SD, DBA


Nov 17 '05 #3

P: n/a
It is most likely your WPP does not have the JavaScript scripts installed in
your application space. This is done with aspnet_regiis. If I remember
correctly, the correct flag for scripts is /c. Without the scripts
installed, you will either have to subclass the validation controls to point
at your own copies of the script, or ditch client side validation
altogether.

Now I will add a note about how to properly use validation. Despite having
Client Side validation, you should always check Page.IsValid prior to
submitting any code. This stops hackers from working around your form
validation to get errors to figure out your code, et al.

The Client side script is still useful, albeit when working, as it reduces
load on the server from multiple trips for validation. NOTE that validation
does not work, client side, in all browsers. This alone is a good reason for
server side checking.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************** ********************
Think Outside the Box!
************************************************** ********************
"earwicker" <ea*******@sbcglobal.net> wrote in message
news:xW*************@newssvr22.news.prodigy.com...
I recently deployed a web application which contains a user registration
form with the usual fields: name, address, email, password, etc. Each of the TextBoxes uses a validation control to verify the input. On my development
server, this form works precisely as expected.

When I deploy the app to the production server (a hosting service), the
client-side validation quits working altogether. Now, I KNOW that scripts
are enabled and working in my browser (I use the same browser to access the app on both development and production servers), and I've changed NOTHING
whatsoever before uploading the application. All other functionality works
the same on both servers.

Any help with this issue would be greatly appreciated.

---e[ch]

Nov 17 '05 #4

P: n/a
greg---

Thanks for your reply, but in the interim I have learned that you are not
entirely correct. You say:

"you will either have to subclass the validation controls to point

at your own copies of the script, or ditch client side validation

altogether."

This is false. You needn't go through the pain of subclassing the controls
at all. All you need to do is upload your own copy of WebUIValidation.js
(and the SmartNav script files, too, if you need them) to some directory
within your web application, and add the following line to your web.config
file:

<webControls
clientScriptsLocation="YourApp/YourScriptsDirectory/" />

And voila! It all works fine. Quick, easy, and painless.

Don't configuration files rock???

Thanks for your help,

---earwicker[ch]



"Cowboy (Gregory A. Beamer)" <No************@comcast.netNoSpamM> wrote in
message news:<OP**************@TK2MSFTNGP10.phx.gbl>...
It is most likely your WPP does not have the JavaScript scripts installed in your application space. This is done with aspnet_regiis. If I remember correctly, the correct flag for scripts is /c. Without the scripts installed, you will either have to subclass the validation controls to point at your own copies of the script, or ditch client side validation altogether. Now I will add a note about how to properly use validation. Despite having Client Side validation, you should always check Page.IsValid prior to submitting any code. This stops hackers from working around your form validation to get errors to figure out your code, et al. The Client side script is still useful, albeit when working, as it reduces load on the server from multiple trips for validation. NOTE that validation does not work, client side, in all browsers. This alone is a good reason for server side checking. -- Gregory A. Beamer MVP; MCP: +I, SE, SD, DBA


Nov 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.