Object Expected Error Menu Control

Rate It (1)

Last post 05-19-2008 9:13 AM by ChickiePooh. 12 replies.

Sort Posts:

  • Object Expected Error Menu Control

    07-17-2006, 9:32 PM
    • Loading...
    • strik
    • Joined on 07-18-2006, 1:22 AM
    • Posts 1

    I am currently experiencing a javascript "Object Expected" error when rolling over the main menu on the top of the site. I am not experiencing this in my dev environment, and only in my hosted one.

    I have simply taken the Personal Web Site starter kit set it up on my dev machine and then also set it up in a hosted online environment.

    The main menu (ASP:Menu control), when doing a mouse over is attempting to call Menu_HoverRoot(this). Debugging the issue comes up with the issue being the Menu_HoverRoot call. Being a .Net 2.0 control, I'm not sure where to look for the fix.

    Has anyone seen this, figured it out and are able to shed light on the fix for me?

    Any help would be appreicated.

  • Re: Object Expected Error Menu Control

    09-11-2006, 11:35 AM
    • Loading...
    • jeremyf
    • Joined on 07-16-2004, 5:43 PM
    • Champaign, IL
    • Posts 4

    I am having the exact same problem.  It appears to be a server side issue.  The nav menu is working on the development workstation (local), but when I move the site/app to the live server, I simply get the "Object Expected" JavaScript error.

    I have removed and re-registered .NET 2.0 on the site.  I repaired the .NET Framework 2.0 and rebooted the server, no change.

    Anyone else seen this and/or have some suggestions as to what the problem might be?

     Thanks - Jeremy

    - Jeremy
  • Re: Object Expected Error Menu Control

    09-14-2006, 3:44 PM
    Answer
    • Loading...
    • jeremyf
    • Joined on 07-16-2004, 5:43 PM
    • Champaign, IL
    • Posts 4

    Fixed! It turned out to be something I had run in to previously in a very different situation (PHP).  It just took a while to correlate the underlying symptoms to the actual cause.  The details were pretty simple in retrospect, but not obvious due to a number of factors (Shrek says, "Browsers are like onions... they have layers.")
     
    In a nutshell, the embedded resources (like the linked JavaScript files) get delivered to the browser via an ASP.NET 2.0 feature that uses WebResource.axd (the actual blah.js files get embedded in to the compiled application).  The problem was that WebResource.axd doesn't actual exist in the site (your web-application), the 2.0 DLL that is script mapped to .AXD files knows what it is and handles it... but NOT when the script mapping (IIS/Website/Properties, Home Directory, Configuration, Application Extensions, .axd) has "Verify that file exists" checked.  On our server, this is off by default in the IIS master properties, so I cannot explain why it was checked for that website.  We'll have to watch for this in the future.
     
    I hope this saves someone else quite a bit of time debugging and fixing an issue with very few clues that lead back to the cause.  Cheers - Jeremy

    - Jeremy
  • Re: Object Expected Error Menu Control

    09-19-2006, 6:31 PM
    • Loading...
    • eappell
    • Joined on 07-13-2005, 11:19 AM
    • Sacramento, CA
    • Posts 203

    Well, I wish I hadn't spent the past few days trying to figure this one out, but I'm SO glad I found your post!  I have THREE different webapps I'm working on right now that all were getting these weird javascript errors and turning off the "Verify that file exists" for axd files fixed all three of them.  THANK YOU!

    eddie

  • Re: Object Expected Error Menu Control

    12-07-2006, 5:53 AM
    • Loading...
    • knoxido
    • Joined on 12-05-2006, 11:19 AM
    • Posts 3
    This has saved me from a whole lot of headaches,thank you dude!
  • Re: Object Expected Error Menu Control

    01-10-2007, 4:06 PM
    • Loading...
    • Radhikap
    • Joined on 09-05-2006, 7:48 PM
    • Posts 16

    Hello

     

    I am running in to the same error in asp.net 2.0 application using asp:menu control. I checked the IIS as pointed but the verify file exists is not checked but it still shows me a java script erorr.

    Can any one point out the cause.

     

    Thanks!!

    Radhika

     

     

  • Re: Object Expected Error Menu Control

    01-17-2007, 3:28 AM
    • Loading...
    • ezeoif0507
    • Joined on 01-17-2007, 8:19 AM
    • Posts 4

    Thanks jeremyf !

    That save alot of time debugging.

    For others.  This is how I solved the problem:

    1. Went to my remote server and opened the IIS manager.
    2. Right mouse click on the website and selected Properties.
    3. Selected the Home Directory Tab.
    4. Clicked on Configuration button.
    5. Selected the .axd line in the Application extensions list box and click on the Edit button.
    6. Changed the Executable Path to point to the v2.0 aspnet_isapi.dll.
    7. Stopped then Started the website and all is well.

    EZ

     

     

     

  • Re: Object Expected Error Menu Control

    01-17-2007, 6:56 PM
    • Loading...
    • mah8473
    • Joined on 01-17-2007, 11:35 PM
    • Posts 2

    I'm experiencing the same problem on my site, everything is perfect on my Dev box but since hosting it on a Remote Server (which is a clunky old windows2000 box used for testing) I'm getting the 'Object Expected error' however it's not happening on the mouseover of the menu but appearing as a an 'Error on Page' on page load. Also the menu control expand icons (arrows) are displayed as a red X (image placeholder) and the dropdown/expand functionality fails to work.

    I've check everything on IIS asper Jeremyf's post ----- .asd extension is pointing to v2.0 aspnet_isapi.dll and 'verify file exists' is not checked.

    I've just installed the .NET 2.0 Framework SP1 with my fingers crossed that there'd be a fix for this issue in there....but still experiencing the same issue

    Any other ideas or suggestions would be much appreciated

     

     

     

     

  • Re: Object Expected Error Menu Control

    01-18-2007, 5:10 PM
    • Loading...
    • mah8473
    • Joined on 01-17-2007, 11:35 PM
    • Posts 2
    oops.....the error is ONLY occuring on the mouseover...my mistake.
  • Re: Object Expected Error Menu Control

    05-24-2007, 9:14 PM

    Thanks.  Unchecking file exists fixed my problem as well.  We have exchange running on the same machine.  I had a problem with OWA which I reinstalled (it recreates OWA forders in IIS) and it might also reset some metafile settings.  I am pretty sure this problem started after that.  

     Thanks again.  I also spent a good day stying to figure out this problem.

  • Re: Object Expected Error Menu Control

    11-21-2007, 10:47 AM

    Hi EveryBody


    Finally I have overcome this issue !!!? As the other Person , i did every thing on my HOST settings, even unchecking the [Verify that file exists] option
    But i couldn't solve the problem and still i was faced with the [Object Expected] error when OnHover event was fired for my ASP:Menu control.
    Also i experienced the same problem with TreeView Control on my .ASPX page

    Following is what i did by chance and above problem resolved successfully
    I assume you have a page with ASP:MENU or TreeView Control placed on it so try:

    1) First of all allow your page Rendered from the Server Completely
    2) From your Browser toolbar (in my case IE) save your Page with a name as you wish in [HTML] format BUT not .mht or single .html file
    3) now as you can see IE has created a file and a folder in which you can find all your page stuff there
    4) if you look at carefully you will find a file named [webResource.axd] in this folder ....that's it !!!
    5) Now put this file beside your page on the FTP on your HOST and then you will never get that JavaScript Error !!!!

    Thanks God

     

    Nothing Is Quite Impossible !!!
  • Re: Object Expected Error Menu Control

    05-09-2008, 3:40 PM
    • Loading...
    • al_m
    • Joined on 05-09-2008, 7:31 PM
    • Seattle area
    • Posts 1

    My problem was as described (dev worked fine, prod errored on hover). My fix was slightly different. The axd extension wasn't listed on my production server in the Application Extension Mapping, and once it was added my menu worked fine. What a hassle that is finally resolved.

    Thanks...

    ...al
  • Re: Object Expected Error Menu Control

    05-19-2008, 9:13 AM
    • Loading...
    • ChickiePooh
    • Joined on 10-23-2007, 5:57 PM
    • Wisconsin, USA
    • Posts 2

    I am having a similar problem, except production works fine.  In development, I get the Object Expected error when I hover over a menu item, or when the page loads.  (Sometimes is nagging about a missing ')'.)  If I hit Refresh a few times, then it goes away.  It doesn't happen every single time, but maybe 50% or more.  Extremely annoying, and makes testing a giant pain in the neck.

    This didn't happen when I originally did the development, which was probably before I started using Ajax.  But now it does it on the 2 sites I have developed that use the asp menu control.

     Anyone know how to fix this for development?

Page 1 of 1 (13 items)
Microsoft Communities