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:
When I try to change from IIS Express to the web
profile, or even close the Properties window, I get this 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?
Enable development-time IIS support in Visual StudioLaunch the Visual Studio installer. Select Modify for the Visual Studio installation that you plan to use for IIS development-time support. For the ASP.NET and web development workload, locate and install the Development time IIS support component.
Configure IIS express on visual studioSelect the web application project and open properties -> select the web tab -> under server's select IIS express-> Specify the project URL. Now open the project folder and . vs folder (Hidden) -> Config -> applicationhost.
Select the ASP.NET project in Visual Studio Solution Explorer and click the Properties icon, or press Alt+Enter, or right-click and choose Properties. Select the Web tab. In the Properties pane, under Servers, For IIS Express, select IIS Express from the dropdown.
Running and Debugging ASP.NET Core Apps in IIS Express only works on Windows. To host ASP.NET Core applications, IIS Express relies on the ASP.NET Core Module. If you have Visual Studio 2019 or later on your machine, this module is already installed.
[Fixed] Configuring IIS Express failed with the following error:Filename: redirection.config Error: Cannot read configuration file You might have had this similar error when trying to run a web application in Visual Studio.
Configuring Step 1: Install IIS and ASP.NET Modules. The first step in building an ASP.NET website on IIS 8 is to install IIS along with the ASP.NET modules. Then add your ASP.NET application files to IIS. When you are done, make sure that IIS and the ASP.NET modules are installed, and your ASP.NET application has been added to your website.
To add an ASP.NET application by using the UI 1 Open IIS Manager. ... 2 In the Connections pane, expan ... 3 Right-click the site for which ... 4 In the Alias text box, type a ... 5 Click Select if you want to se ... 6 In the Physical path text box, ... 7 Optionally, click Connect as t ... 8 Optionally, click Test Setting ... 9 Click OK.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With