views:

224

answers:

2

Hi,

I have a virtual directory inside of my main virtual directory in IIS.

can i reference the parent application and reference its master page? If yes, how?

A: 

No, I don't think it's possible due to security concerns.

Gordon Bell
+2  A: 

For all intents and purposes, no it's not possible. ASP.NET will not execute an ASPX/ASCX/MASTER outside of it's AppDomain. I recommend you go down a different route with your solution (compiled into a common dll, for example)

Edit: One potential question to ask is whether you need a virtual directory or not. What is it that made you chose to separate them in the first place?

Beyond that, you could possibly fake it by writing your own virtual path provider, but that would lead to a world of hurt (with the base classes not being compiled, etc).

I recommend you go for the simplest solution possible.

Richard Szalay