Creating a Project with Visual Studio:

* Modified port for hosting
* Succeeded in running through IIS Express
vs2019/2_Getting_Started
jason.zhu 2021-04-21 20:23:12 +10:00
parent 41cb763b93
commit 00abd93e13
2 changed files with 7 additions and 11 deletions

View File

@ -1,9 +1,9 @@
{ {
"iisSettings": { "iisSettings": {
"windowsAuthentication": false, "windowsAuthentication": false,
"anonymousAuthentication": true, "anonymousAuthentication": true,
"iisExpress": { "iisExpress": {
"applicationUrl": "http://localhost:54895", "applicationUrl": "http://localhost:47263",
"sslPort": 0 "sslPort": 0
} }
}, },
@ -18,10 +18,10 @@
"DutchTreat": { "DutchTreat": {
"commandName": "Project", "commandName": "Project",
"launchBrowser": true, "launchBrowser": true,
"applicationUrl": "http://localhost:5000",
"environmentVariables": { "environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development" "ASPNETCORE_ENVIRONMENT": "Development"
} },
"applicationUrl": "http://localhost:5000"
} }
} }
} }

View File

@ -21,10 +21,6 @@ namespace DutchTreat
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env) public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{ {
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseRouting(); app.UseRouting();