"The IIS Express settings are missing the App Url property" when trying to configure ASP.NET 5 project
Asked Answered
E

4

9

I downloaded a sample ASP.NET 5 (vNext) application and tried to configure it to run on my local machine.

When I opened the Project Properties window and switched to the Debug tab, the App URL field is empty and cannot be edited:

Empty App URL field

When I try to change from IIS Express to the web profile, or even close the Properties window, I get this error:

IIS Express error

The IIS Express settings are missing the App URL property. This is required to configure IIS express to run the site.

At this point, Visual Studio is totally stuck, and won't even quit. I had to kill the process via the Task Manager to get out.

How can this property be set if the field is locked?

Excavator answered 18/12, 2015 at 20:4 Comment(0)
E
10

The project was missing the iisSettings section in Properties\launchSettings.json.

The original launchSettings.json:

{
  "profiles": {
    "IIS Express": {
      "commandName": "IISExpress",
      "launchBrowser": true,
      "environmentVariables": {
        "ASPNET_ENV": "Development"
      }
    },
    "web": {
      "commandName": "web",
      "environmentVariables": {
        "ASPNET_ENV": "Development"
      },
      "sdkVersion": "dnx-clr-win-x86.1.0.0-rc1-final"
    }
  }
}

I had to add this section above profiles:

"iisSettings": {
  "windowsAuthentication": false,
  "anonymousAuthentication": true,
  "iisExpress": {
      "applicationUrl": "http://localhost:49901/",
      "sslPort": 0
  }
}

After adding this, I was able to modify the settings normally via the Properties window.

Excavator answered 18/12, 2015 at 20:13 Comment(0)
P
1

I can't explain why you can't make required changes of the App URL in Visual Studio, but I would suggest you to change the setting using some text editor.

Look at the subdirectory Properties of your project directory and examine the file launchSettings.json. You will find iisSettings.iisExpress.applicationUrl with the App URL. You need just to edit or to include the property in the file launchSettings.json. See the documentation for details.

Procephalic answered 18/12, 2015 at 20:14 Comment(0)
M
0

For the same error in my case "IIS Express" section was somehow corrupted. I've restored launchSettings.json from Source Control

Manchukuo answered 15/3, 2018 at 7:1 Comment(0)
S
0

I also ran into this issue but manually updating the launchsettings.json file with the application url did not work, but adding it via the Project > Properties > Debug > General > Open Debug Launch Profiles UI did the trick for some reason.

Summersummerhouse answered 15/8, 2023 at 8:57 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.