Last post Mar 15, 2019 09:36 AM by Yuki Tao
Mar 14, 2019 10:23 PM|JORGEMAL|LINK
I have two MVC projects that must share a common folder for images, and I see that a solution can be to create a virtual directory for each project pointing to the same physical path. I would like to set up this environment in my development PC, such that
my two MVC projects can access the virtual folders while running them from Visual Studio 2017.
a) Is it possible to create virtual directories in a VS2017 MVC project? or,
b) Is there any other approach to solve my issue?
Mar 14, 2019 10:54 PM|KathyW|LINK
VS2017 uses IIS Express by default as its server. To create virtual directories in IIS Express, edit the configuration file as shown in the linked article:
https://josephwoodward.co.uk/2014/01/how-to-create-a-virtual-directory-in-iis-express The location of the config file will be different than in that article, since for VS2017 it will be under the .vs/config/ folder of your solution.
If you are using your local IIS as your development server use IIS Manager to create the virtual directories.
Mar 15, 2019 09:36 AM|Yuki Tao|LINK
a) Is it possible to create virtual directories in a VS2017 MVC project?
Yes,it's possible.You could refer to this link:
<site name="WebSiteWithVirtualDirectory" id="20">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="c:\temp\website1" />
<application path="/OffSiteStuff" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="d:\temp\SubFolderApp" />
<binding protocol="http" bindingInformation="*:1132:localhost" />
b) Is there any other approach to solve my issue
You could also use a blob storage in Azure.
open image file from another web server folder by WebClient.
Hope my reply will be helpful to you.