i have developed a c#/.NET web app using VS 2005 on my local machine. it works fine, and i have copied the files over to the web server (running ASP.NET 2), and it works great with JIT compiling on the server. before moving to production, i would like to compile to help performance.

the literal path of the application on the web server is

d:/www/univmain/search_app/default.aspx

** univmain is a web folder (but not .NET application), search_app is a web sub-folder and .NET application

view from IIS manager is (websites)

/defaultweb

/www
        / univmain
               /includes 
                       topnav.htm
              /search_app (application folder)
                       default.master.aspx
                       default.aspx

The master file contains old asp style "includes". because of our cms system, these cannot be updated.

build command used:

aspnet_compiler -v /univmain/search_app -p d:\www\univmain\search_app d:\searchfiles

during the build I get the following error which causes failure:

"/univmain/search_app/default.master(11): error ASPPARSE: Failed to map the path '/univmain/includes."

The default.master file includes the htm pages in the following way:
<!--#include virtual="/univmain/includes/topnav.htm"-->
(I have also tried using #include file="", but get same error)


Based on another post, i have attempted to resolve this error by specifying the full IIS metabase path of the application in the aspnet_compiler command

This generates an error regarding the IIS application.

>aspnet_compiler -m /lm/w3svc/2/ROOT/univmain/search_app d:\searchfiles
Utility to precompile an ASP.NET application
Copyright (C) Microsoft Corporation. All rights reserved.

error ASPRUNTIME: '/lm/w3svc/2/ROOT/univmain/search_app' is not a valid IIS application.

QUESTION: can someone help me run the correct metabase command? i used /lm/w3svc/2 because i thought it represented the 2nd website under IIS. However, i also tried /lm/w3svc/1, which gave the same error.

or do you see another way to solve the original build error/ path problem?

thanks much

a little clarification on the problem:

i am trying to include a file that is is one level up (which means it is outside the application folder, which i'm sure is the issue with .NET). the folder structure is

/ univmain

            /includes 

                  topnav.htm

            /search_app (application folder)

                  default.master.aspx

                  /navigation

                        leftnav.htm

i have 2 includes in the master file, (both using classic asp #include). one points to /navigation/leftnav.htm (inside the application "search_app") and the other points to univmain/includes/topnav.htm (which falls outside the application folder "search_app").

if i just ftp the web files to the server (without compiling or "publishing" thru .net) and let JIT compiling take place it all works just fine. however, when i try to publish (on my local machine) or compile the app (on the server), i get invalid path for the topnav.htm file. i presume .NET just won't let you compile with a file that lives outside the application folder. i was hoping that maybe using the full metabase path option would help...but i don't know.

ok, think i've figured it out. would have to enable parent paths...which is not good. so i'll have to work on setting up some virtual directories.

thread closed

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.