RSS 2.0 | Atom 1.0 | CDF

Search

Categories

Archive

Blogroll

Sign In

# Friday, December 17, 2004
Friday, December 17, 2004 12:46:46 PM (GMT Standard Time, UTC+00:00) ( Asp.Net )

when i deployed my web app to the production server, i found that none of the client-side validation was working. 

the first problem was that there was no mime-type set up on the server for .js files, so i added "application/x-javascript" for the .js extension.

the next problem was that the script references in my aspx pages did not match the script location on the server.   the html source of one of my pages had the webuivalidation.js path set to /aspnet_client/system_web/1_1_4322/WebUIValidation.js

but the server directory was "/aspnet_client/system_web/1_1_4322_0/WebUIValidation.js"

so i tried duplicating the directory so that i would have both paths on the server, but that caused strange problems on the aspx page, such as buttons not clicking (when the event handlers are definitely registered). 

so what i did was run aspnet_regiis -i on the server to make sure all the script maps are registered properly, and it worked. 

if you don't have control over the web server, you can add the following to your web.config

<system.web>
  <webControls clientScriptsLocation="/aspnet_client/system_web/1_1_4322_0/" />
  ...
Comments [1] | | # 
Friday, September 08, 2006 5:48:53 PM (GMT Daylight Time, UTC+01:00)
Tim,
Thanks for the web.config workaround tip, I was just experiencing such problem with a web server that I don't have control
Juan
Juan Barrios
Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):

Live Comment Preview