Creating a virtual directory failed with the error

后端 未结 16 2045
情歌与酒
情歌与酒 2020-12-24 04:23

I can\'t solve this problem

\"enter

I suggest I have to change c:\\Windo

相关标签:
16条回答
  • 2020-12-24 04:43

    The problem would be your project setup to be executed in the local IIS and the URL specified not exist.

    There are options you can do to fix the problem.

    Option 1 : (Use IIS Express)

    1.) Open you web project .csproj file as XAML or in notepad.

    2.) Find these properties and set according to your preferences.

    UseIIS = false

    UseIISExpress = true

    and that's it.

    Option 2 : (Use local IIS)

    Follow the option 1 steps but change the following properties.

    UseIIS = true

    IISUrl = https://localhost

    UseIISExpress = false

    0 讨论(0)
  • 2020-12-24 04:47

    I wanted open an exiting project of Visual Studio 2017 in VS 2019 and encountered with the same issue. I find its a version related problem. The solution is: Create a new project in the newer VS and copy the codes from the older VS.

    0 讨论(0)
  • 2020-12-24 04:48

    My issue was with Windows 10 Defender. I had given IIS permission in the past, but seems like it is now ignoring it. Will look into it later, but for now I disabled controlled folder access and it worked.

    0 讨论(0)
  • 2020-12-24 04:49

    The issue can be fixed by deleting the folder named .vs in the project directory.

    This solves the problem because while opening the project after deleting the .vs file, it creates the same folder with subfolder config and folder with project name.

    The config folder applicationhost contains the necessary settings required to run the project successfully.

    0 讨论(0)
  • 2020-12-24 04:53

    More often than not, at least in my case, this happens is when a *.csproj.user file is in the project directory and has <UseIISExpress>true</UseIISExpress> in it.

    Alternatively, as mentioned by Zachary Cutler you can also simply: close Visual Studio, delete the *.csproj.user file and reopen Visual Studio. This will force VS to rebuild the file.

    0 讨论(0)
  • 2020-12-24 04:53

    Try decrypting the applicationhost.config file. That worked for me.

    0 讨论(0)
提交回复
热议问题