Sub application and sharing

B

Bill

I have 2 applications in my web site. The root application and a sub
application. I want them to share certain items like my header and footer
user controls. How do I do this? When ever I try and reference a file in
the main appliaction I get the below error.

Parser Error Message: The virtual path '/mainproject/header.ascx' maps to
another application, which is not allowed.

I don't want to combine them to one application because the sub project is a
forum and I would like to have its own web.config, etc...
 
B

Bill

FYI, I found the solution.

If you create a sub project and make it an application and try to share a
user control from the root project then you will get the error "Virtual Path
maps to another application, which is not allowed."

So what you must do is create a virtual directory for the sub project under
the main project but do not make it an application. This is what I tried
first but I was getting an error saying that the namespace of the sub
project was not found. To resolve this you must add the sub project as a
reference to the main project. Once I did this it all worked well.

Just though I would share this incase anyone else had the same problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top