I've create a ASP.NET Core Web Application in Visual Studio 2015 named "HelloASPNETCore", with the default template which has one controller "Home" and several actions "Index", "Contact".....etc; now I want to launch it on IIS Express with the root URL as
http://localhost:29492/HelloASPNETCore
but the default URL that Visual Studio set up to me is
http://localhost:29492
In the classic ASP.NET MVC Web Application Project I just specified the Project URL in the Project Properties and it works, but it's not work on the ASP.NET Core Web Application Project. I input the URL http://localhost:29492/Home/Index on browser and got the correct content respond, but http://localhost:29492/HelloASPNETCore/Home/Index gave me the empty content, without any error information.
From the project properties (the screen with the vertical tabs, right-click the project in Solution Explorer and select Properties) select the "Web" tab and under Servers you'll have Local IIS selected. Check the "Override application root URL" box and change the port there.
In the properties folder you have the file launchSettings.json, where you can set some settings of your application.
You will find something like this :
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:52023/",
"sslPort": 0
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "index",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"YOUR_PROJECT_NAMESPACE": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "http://localhost:52023/index",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
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