By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,118 Members | 1,133 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,118 IT Pros & Developers. It's quick & easy.

Sub application and sharing

P: n/a
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...

--
Bill
Nov 18 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hi,

You can share custom server controls between appliccations.
http://www.15seconds.com/issue/040421.htm

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #2

P: n/a
Thanks but I need a user control since 90% of the functionality is just
plain HTML. I don't want to write code just to print out all the tags. It
would also be hard to modify the HTML and format it later.

I found this article on how to do it but that is what I was doing and it
yields the same error:
http://support.microsoft.com/default...b;en-us;324785

Bill

"Natty Gur" <na***@dao2com.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hi,

You can share custom server controls between appliccations.
http://www.15seconds.com/issue/040421.htm

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #3

P: n/a
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.
Thanks but I need a user control since 90% of the functionality is just
plain HTML. I don't want to write code just to print out all the tags. It would also be hard to modify the HTML and format it later.

I found this article on how to do it but that is what I was doing and it
yields the same error:
http://support.microsoft.com/default...b;en-us;324785

Bill

"Natty Gur" <na***@dao2com.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hi,

You can share custom server controls between appliccations.
http://www.15seconds.com/issue/040421.htm

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Nov 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.