views:

277

answers:

1

I've just been asked to fix an ASP site and I know absolute no ASP. When I try to load the site, I get greeted with the following error:

MENU CACHE EXCEPTION:No menu xml file found for menu id 1. Make sure the xml file \menuxml\menu_1.xml exist.

I've tried editing Web.config to point to the correct folder using a variety of different paths. None seem to work. I keep getting the same error. Here's how it currently looks:

<add key="menuXMLFilesDir" value="/clientsdata/iis7_www/c/a/site/www/menuxml/" />

I figured the problem was it required an absolute path starting from root. I asked for that path and received that in return. To me, that looks very Linuxy. I was expecting to see drive letters (C:...).

How do I point to the correct path?

Btw, the Web.config file and the menuxml folder are both in the document root.

EDIT: I've tried numerous system paths to point to the menuxml folder and also web relative paths. None seem to work. From all the help Stephen M. Redd has given, I'd expect this issue to have been fixed. Since it's not, I can only assume the problem lies outside of Web.config. What else could be done to try and rectify this? :/

+1  A: 

In web.config, set the path to: "~\menuxml\menu_1.xml". The tilde tells the app to use the "virtual root". These paths are web relative, not physical file system paths.

Stephen M. Redd
I tried that earlier after checking document root paths on MSDN. It returns the same error with `Make sure the xml file ~\menuxml\menu_1.xml exist.`. Could the error lie elsewhere? I just assumed it was a problem with the Web.config path. Could there be some .ASP(X) page somewhere parsing this wrong?
servxr
If by 'web relative' you mean use the URL, I just tried that. Still errors.
servxr
If the path shown in the error message is updating to reflect changes in web.config, then no... it's probably reading the path from there. Can you resolve the path manually in a web browser? Take the web site's virtual root path, and manually append the "\menuxml\menu_1.xml" to the end of it. You should get back the raw XML from that file.
Stephen M. Redd
Yeah, the error is updating to show the changes I make in Web.config. But from my understanding, this config file is basically full of user variables that then get parsed elsewhere? `http://www.mysite.com/menuxml/menu_1.xml` that returns the XML file correctly.
servxr
the variables in web.config are scoped to the application, not the user. Typically the values supplied in the config are the ones that will be used at runtime. If other code overrides these values at runtime, the error would usually show the actual runtime value. Do you know what menu component is being used (this error doesn't look like it is from the built-in asp.net menu control)?
Stephen M. Redd
Nah, I have no idea what menu component is being used. As far as I can tell, this seems to be some custom coded CMS. I can't see any branding anywhere. How would I go about finding what component is being used? I'll keep searching around while I wait for a reply. If I find something, I'll report back.
servxr
Found 'CYBERAKT' in the code and Google reports it as an ASP Menu. I guess this is the component?
servxr
Yeah, I think CYBERAKT was bought out (or changed name to) ComponentArt, which is a fairly popular component vendor. Sadly that isn't much help. I did notice that the name of the key in web.config is: menuXMLFilesDir which indicates that the value should only be a folder. Try setting the value to "~/menuxml", "menuxml", or "/menuxml". Change the slashes you are using to forward slashes.
Stephen M. Redd
BTW, the path and file name it is looking for could also be case sensitive (I hope not, but it may be worth thinking about).
Stephen M. Redd
Case is correct and those folder paths each returned the same error. I'm beginning to think the problem lies elsewhere?
servxr
Yeah maybe. I'm out of ideas though. I'd need access to the entire application to be able to suggest anything else though. Maybe someone else will pop-in with some ideas though.
Stephen M. Redd