p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/)
-   BOOK: ASP.NET Website Programming Problem-Design-Solution (http://p2p.wrox.com/book-asp-net-website-programming-problem-design-solution-23/)
-   -   WebUIValidation.js (http://p2p.wrox.com/book-asp-net-website-programming-problem-design-solution/12903-webuivalidation-javascript.html)

FrancesValdes May 12th, 2004 09:24 AM

WebUIValidation.js
 
I am writing the EditFile.aspx. I click on new file and I get the javascript prompt asking for a file name. I enter a name and press "OK" and I get the following error "Unable to find script library 'asp.client/system_web/1_1_4322WebUIValidation.js' Try placing this file manually or reinstall by running 'aspnet_regiss -c'"

BEFORE anyone posts to tell me to do what the error message says -I have spent the last week trawling the forums, and have seen several solutions offered, all of which I have tried. I am using Visual Studio.net 2003 on Windows 2000 professional.I can see the WebUIValidation.js file in wwwroot\aspnet_client\system_web\1_1_4322. I have tried the following:-
1. Copying the aspnet folder containing the WebUIValidation into my project and each of the sub-directories.
2. aspnet_regiss -c
3. the above with -s to my web project.
4.Viewing the source code of the page. This clearly shows a reference to WebUIValidaiton.js at "/asp_client/system_web/1_1_4322/" .
5. Uninstalling asp.net and then re-installing it.
6. Changing the machine.config file in WINNT\Microsoft.NET\Framework\1.1.4322\config to "<webControls clientSriptsLocation="C:\\inetpub\\aspnet_client\\ system_web\\1_1_4322\\" (something someone, on some newsgroup, said worked as a 'makedo' for him.

Please Please can someone help me and offer something to fix this problem.



Imar May 12th, 2004 09:56 AM

Hi there,

Are you sure that C:\Inetpub\wwwroot is mapped to / ??

Usually, this folder is the root of your web site. However, if you remap the default web site to, say, c:\WebSites, then the validation file is search for in C:\WebSites/aspnet_client... (although actually as /aspnet_client/... of course)

If that is the case, simply copy the system_web folder to the root of your site.

I think that the webControls section of machine.config requires a virtual location, not a physical location. The C:\ path for the other guy may have helped, but, I assume, only on his local system. It would create a src that points to c:\.... so I can't imagine it would work on any other system than the local server.

I also noticed a lot of typos in your post. (e.g. asp.client Vs asp_client, aspnet_regiss vs aspnet_regiis, clientSriptsLocation vs clientSrriptsLocation etc etc. I don't want to be a smart ass, but are you sure you're not overlooking something really simple somewhere??


Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.

FrancesValdes May 14th, 2004 06:11 AM

Thanks for your help.

I appreciate my message had lots of typo's but I was using a different machine post this on from the one I'm developing my web site on. I'm quite confident that I haven't got typo's because it was easy to see if something worked. ie aspnet_regiis either works or doesn't, and it told me it worked even though I didn't notice a difference.

I've tried copying the system_web folder to my root and it makes no difference.

I've looked in IIS and can see that my default web site is mapped to c:\inetpub\wwwroot. However I have noticed that my actual web site (which is under the default web site) doesn't appear to have a mapping, even though I've clicked on properties and application settings and the application name shows as my web site. Could this be making a difference, and if it is do how do I solve it?

I'm really grateful for any help. I fairly new to all this and this is all beyond me.
Frances


Imar May 14th, 2004 06:18 AM

Re: Typos. I see. It was just a guess ;)

About the mapping: yeah, that does matter. Do you have multiple Web sites, or do you have Virtual Directories / Application under the Default Web Site?

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Agoraphobia by Incubus (Track 3 from the album: A Crow Left To The Murder) What's This?

FrancesValdes May 14th, 2004 10:46 AM

Thank you for your help.

In IIS I have a default web site. Under the default web I have previous web sites, which are not connected to this current web site. As far as the current web site is concerned, I have been designing this with Visual Studio and the book. The current web site is shown with an open box symbol in the default directory. I took this mean that it was a virtual directory, but I seem to have been making wrong assumptions recently.

The current directory with the open box symbol does not have a reference to C:\inetput\wwwroot like my previous web site attempts.

I'm sorry if this is rather simplistic but there is so much I have yet to understand.
Frances


Imar May 14th, 2004 12:25 PM

Well, in that case, I assume your Web app folder is a subfolder of the wwwroot folder.

By default, the default web site points to C:\Inetpub\wwwroot. So, that's the root folder when you go to http://localhost for example.
Any folder inside wwwroot is "just another folder" unless you mark it as a virtual directory using the Create button on the Properties dialog for the folder. Then the "normal folder" changes to a VD. In your case, that seems to be the situation.

You can also map a VD from a different location. Using the VD wizard, you can map C:\MyWebSite to /MyApplication, so when you request http://localhost/MyApplication, the files are actually coming from C:\MyWebSite, and not from C:\Inetpub\wwwroot\MyApplication.

But this still doesn't clarify the problems with the validation files, and honestly, I am as stumped as you are.
When you reinstalled the .NET framework, did you also delete all the config folders and other .NET related stuff? Maybe you broke a config file somewhere, although I find that hard to believe....

Strange, very strange.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Crimes by A Perfect Circle (Track 8 from the album: Thirteenth Step) What's This?

FrancesValdes May 21st, 2004 06:31 AM

I have solved this although I'm not sure how. I found a posting on another forum which suggested a way to solve this, if all else failed was as below. It worked for him and it worked for me, so I've detailed it in case it helps someone else.

1. Go to Administrative Tools
2. Open up Personal Web Manager
3. Click on the advanced icon
4. Select "/aspnet_client" under the Virtual Directories area
5. Click the Edit Properties button
6. Change the directory path to "c:\inetpub\wwwroot\aspnet_client" assuming that's the location of your aspnet_client. In my case the path showed just "c:\inetpub\wwwroot\" when I added the "aspnet_client" to the path it solved my problem.

Thank you for your help and interest.


LoriLevy April 21st, 2006 11:40 AM

If you try to try to browse to http://localhost/aspnet_client/syste...IValidation.js
 you will get either a HTTP 401.1 - Unauthorized: Logon Failed error or the The page cannot be displayed.

If you get the HTTP 401.1 - Unauthorized: Logon Failed error, then the problem is permissions in IIS.

Here is how I fixed this problem.
1. Opened the IIS Manager, stopped the Web Server.

2. Right-clicked aspnet_client folder in the IIS root.

3. Selected Properties from shortcut menu.

4. Clicked the Directory Security Tab -> Edit

5. Checked Integrated Windows Authentication (only Anonymous was checked).

6. Clicked OK and got out of there.

7. Restarted my Web server.

8. Reloaded the .js page, which then gave me "The page cannot be displayed." (Permission problem fixed!)

9. Reloaded form page giving me the error to verify error is gone.

Hope someone finds this helpful!
Lori

das August 14th, 2006 09:18 PM

Quote:

quote:Originally posted by FrancesValdes
<br>
2. Open up Personal Web Manager
I use windows XP and can not see personal web manager!

I have a similar issue when working through a sun proxy.
I put the following code in web.config to resolve it:

<system.web>
<webControls clientScriptsLocation="aspnet_client/system_web/1_1_4322/"/>
</system.web>


englere August 21st, 2006 11:56 AM

They were talking about the IIS administration applet in the control panel - see #1 of Lori's instructions. Her problem was security related ("Unauthorized") and not really related to the location of the folder.

The folder you specified should be the default, so I'm not sure how it helped, but then I haven't used proxies so maybe there's something that I don't know about them.



All times are GMT -4. The time now is 06:17 PM.

Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
2013 John Wiley & Sons, Inc.