Questions tagged [virtual-directory]

A directory that is not stored on-disk but is only conceptualized in a specific program (e.g. an IDE). May also refer to virtual directories in webserver configurations.

A directory that is not stored on-disk but is only conceptualized in a specific program (e.g. an IDE). The IDE might for example show the directory as folder in the project hierarchy.

May also refer to virtual directories in webserver configurations, for example in IIS, Apache or Nginx.

Please use the virtual-host tag if you are not specifically asking about virtual directories in a webserver context.

528 questions
40
votes
6 answers

Virtual directory inside of ASP.NET Core app in IIS

We have an application using ASP.NET Core 1.0 RC1 and hosted on IIS. It works fine. Now we have static content, that is available on a file share and should be accessible from the application. Before ASP.NET 5, we added a virtual directory in IIS…
Matthias
  • 3,403
  • 8
  • 37
  • 50
25
votes
2 answers

How to configure IIS Express to debug an application in a subdirectory?

My web application is typically located in a subdirectory of the root in IIS. Suppose the subdirectory is "app" When I try to debug it in Visual Studio, the path is always rooted at localhost, with no subdirectory. This messes up my paths in the…
Triynko
  • 18,766
  • 21
  • 107
  • 173
24
votes
1 answer

What does Override application root URL really do?

The only place on the entire internet I could find an explanation is on MSDN: Specifies an alternative path for the application root URL. Use this option if the Web application root is not the root of your project. From here I understood that…
BornToCode
  • 9,495
  • 9
  • 66
  • 83
21
votes
8 answers

Javascript in Virtual Directory unaware of Virtual Directory

Say I have the site http://localhost/virtual where virtual is the virtual directory I have an Ajax request that is defined in a javascript file using JQuery $.getJSON("/Controller/Action") When this is called, the client tries to find the url…
Dan
  • 12,808
  • 7
  • 45
  • 54
20
votes
4 answers

Is there a way to add a virtual directory to Visual Studio Development Server?

I'm using the Visual Studio Development Server, with a specific port. Is there a way to add a virtual directory to it? EDIT: Sorry, I wasn't very clear. I'd like to be able to add one or more virtual directories to arbitrary physical directories. …
17
votes
3 answers

Get name of virtual directory?

I'm using Request.ApplicationPath to learn the name of the Virtual Directory in which I'm running. Is there a more reliable way?
lance
  • 16,092
  • 19
  • 77
  • 136
14
votes
1 answer

Deploying IIS Settings with Web Deploy

If I look at the Package/Publish Settings of a web application in Visual Studio 2010, there is an option to "Include all IIS settings as configured in IIS Manager (used only for IIS Web projects)" I am using IIS instead of the VS Dev Server to run…
kenwarner
  • 28,650
  • 28
  • 130
  • 173
14
votes
2 answers

nginx rewrite virtual directory to file

This should be really easy to do but I'm hitting my head on the wall. If I get a request for www.mysite.com/mypath I want to serve the content of www.mysite.com/myotherpath/thisfile.html. How can I do this with an nginx config.
Michael Gorham
  • 1,234
  • 2
  • 16
  • 24
14
votes
4 answers

What is virtual directory? What's the use of it?

Please someone explain to me by example what is a virtual directory and why do we need it?
Embedd_0913
  • 16,125
  • 37
  • 97
  • 135
13
votes
1 answer

Azure web site as virtual application/directory of other Azure web site

I am looking to migrate an MVC website to Azure web sites. My current set up in IIS is as follows: Main MVC site -> www.thesite.com (physical path = wwwroot/thesite) WordPress blog for the site -> www.thesite.com/blog (physical path =…
Gadget27
  • 544
  • 5
  • 14
12
votes
3 answers

Accessing virtual directory(mapped drive) via c#/asp.net webpage with IIS7

So i have a server A and server B. Server A: Windows Server 2008R2 Server B: Windows Server 2003 Web page is using framework 4.0, created with VS2013 Pro RC on server A my asp.net/c# webpage is running on IIS7 on server B i have a shared folder. Now…
Mana
  • 1,925
  • 6
  • 39
  • 55
10
votes
0 answers

Can I create a virtual directory in web.config?

I have read that the applicationhost.config file sets the defaults and all directories below root inherit those settings. I know its possible to change the defaultdirectory in a web.config, but I can't seem to do the same with a virtualdirectory. …
brian1
  • 165
  • 1
  • 10
10
votes
6 answers

Using IIS virtual directories in Visual Studio Web Application projects

I have an ASP.NET project that has the following directories \ads \photos both these folders have thousands of files in them that get updated frequently. I currently have my IIS set up…
kenwarner
  • 28,650
  • 28
  • 130
  • 173
9
votes
2 answers

IIS Virtual Directory map to network drive (with drive letter) but fail to create file

I am using C#/ASP.NET, IIS6 on Windows Server 2003. Map the data server shared folder to the WebServer with driver letter V:\ On the WebServer, IIS created a virtual directory and pointed to 'local location' with V:\ . Since there is no 'Connect…
Gavin
  • 91
  • 1
  • 1
  • 3
9
votes
4 answers

Visual Studio 2015 - Adding virtual directory not possible

we are running some of our sites as Web Site projects in Visual Studio. We recently upgraded to VS2015. Now we can't add virtual directories to new websites. We already tried right-click "Add new virtual direcory" where we get an error message as…
Dominik G
  • 1,459
  • 3
  • 17
  • 37
1
2 3
35 36