I have web project that includes few sits that must share some pictures. The
project has following structure
Root - just a folder with solution files - this is on IIS regular folder
Site 1 - web application 1 (has asp.net project here) - site saves and
views the pictures
Site 2 - web application 2 (has asp.net project here) - just views the
pictures
SharedPicture - folder with shared pictures
It will be deployed in the same manner just root will be the root of the web
site.
The problem I have is to get this Shared Pictures folder that is outside of
the applications.
Server.MapPath("~") - returns root of the application (this could be done
with few other ways). I can get physical path by using Directory.GetParent.
It should be good enough for saving pictures but in order to read them I
need to get virtual path and that I have issue with - can't map system
directory to virtual path.
I could create entry in config file and type the directory name but I would
prefer to have it defined as "folder on the same level as application roots"
and find it dynamically.
I hope it is clear.
Thanks,
Shimon