Search code examples
asp.net-mvciisvirtual-directory

Access 'parent' application from sub virtual directory


Assume I have two MVC applications, Public and Admin:

Public is a virtual directory mapped to www.mydomain.com

Admin is a virtual directory mapped to admin.mydomain.com.

Under the hood the files are organised as follows:

/ (all my public site files are here)
/Assets (a bunch of public assets like images .. for example)
/Admin (all my files for admin.mydomain.com are here).

The question is, can I access /Assets from within the admin.mydomain.com application.

Thanks.


Solution

  • You can create /Assets as virtual directory and that can be accessed using URI