471,066 Members | 1,191 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,066 software developers and data experts.

validation controls not working on production server

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
4 4338
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
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
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
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.

Similar topics

reply views Thread by Juma | last post: by
reply views Thread by Juma | last post: by
2 posts views Thread by Martyn Fewtrell | last post: by
4 posts views Thread by Craig HB | last post: by
6 posts views Thread by charliewest | last post: by
2 posts views Thread by AnandaSim | last post: by
5 posts views Thread by Kyle | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.