Friday, December 08, 2006

Unable to find script library '/aspnet_client/system-web/1-1-4322/webvalidation.js'

One of the common errors that may occur when publishing your application to live server is is:
"Unable to find script library '/aspnet_client/system-web/1-1-4322/webvalidation.js'"

This would occur particularly if you are using validation controls in your application. The aspnet_client folder contains the WebUIValidation.js which is required to handle the asp.net validation controls.
If the aspnet_client folder is missing in the IIS virtual directory listing, you may encounter the above error. To resolve this, you may need to run the following from command prompt:
%windir%\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis -c

This will install the aspnet_client folder to the default virtual directory website.
If you are using a sub-virtual directory you need to have this aspnet_client folder in your root directory as well. To do this, you can manually copy the folder to your root directory.