Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

ASP Net - Sub application and sharing

 
Thread Tools Search this Thread
Old 05-03-2004, 04:00 PM   #1
Default Sub application and sharing


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




Bill
  Reply With Quote
Old 05-04-2004, 08:37 AM   #2
Natty Gur
 
Posts: n/a
Default Re: Sub application and sharing
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!


Natty Gur
  Reply With Quote
Old 05-04-2004, 02:21 PM   #3
Bill
 
Posts: n/a
Default Re: Sub application and sharing
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" <> wrote in message
news:%23aJ$...
> 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!





Bill
  Reply With Quote
Old 05-04-2004, 03:51 PM   #4
Bill
 
Posts: n/a
Default Re: Sub application and sharing
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" <> wrote in message
> news:%23aJ$...
> > 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!

>
>





Bill
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sharing Files on a Network Help!!! bnw General Help Related Topics 1 08-29-2006 09:10 PM
networking (permissoins file share problem ) Scotech A+ Certification 4 05-18-2006 08:53 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46