Search code examples
c#directoryvirtualcreate-directory

Create a folder in a virtual folder with c#


I created a virtual folder in IIS. In my website, I want to create folders IN that virtual folder. I tried multiple options, none worked. This was one of them:

Directory.CreateDirectory(~/[virtual folder]/[map that doesn't exist]);

I guess it's taking the project folder and not referencing to the real folder. Does anyone has an idea how to do this?

Thanks in advance!


Solution

  • Physical path is the answer thanks to Paul Zahra.