Hi,
We have recently downloaded the ASP.NET Zero source (ASP.NET CORE & Angular) as separate solutions.
We can run the Api (Web.Host) without issue via our IDE (Visual Studio) but when we follow the steps to publish to IIS (https://docs.aspnetzero.com/en/aspnet-core-angular/latest/Deployment-Angular-Publish-IIS) we are getting a HTTP Error 404 when we browse to the Api URL (e.g. http://localhost:[port]).
We can manually amend the Api URL (e.g. http://localhost:[port]/swagger/index.html) and see the Api endpoints but we are not prompted to login/authenticate.
Do you have any suggestions on what we are missing/doing wrong? Let us know if you need any screenshots, etc.
Thanks in advance.
Laurie
12 Answer(s)
-
0
hi
Is there any information in the application logs?
but we are not prompted to login/authenticate.
.Web.Host
project contains a basic login page. If you login on this page, you can execute actions on Swagger UI which requires authentication. -
0
hi,
There is not log in the application log, that is why i can't figure it out what is going on. When i open http://localhost:8080, i got a 404 error. Not sure what login page you are refering to? Laurie
-
0
if I changed the redirect in the HomeController, then i can get the login page
public IActionResult Index() { if (_webHostEnvironment.IsDevelopment()) { return RedirectToAction("Index", "Ui"); }
//return Redirect("/index.html"); // this line has issue return RedirectToAction("Index", "Ui"); }
-
0
hi
Maybe related to https://github.com/aspnetzero/aspnet-zero-core/issues/3320
-
0
Hi, I can't access the above link. It gave me 404 Laurie
-
0
-
0
still no luck, 404 error
-
0
hi
You can open the ui page manually.
http://localhost:[port]/Ui/Index
-
0
I can.
-
0
-
0
Ok, no problem, thanks for explaining.
-
0
@maliming: I am using the same settings in the single solution and deploying the app on Azure. The application is working apart from the Imprsonation. I can't use impersonation functionality. If I remove the Index action then impersonation is working fine but I can't access the swagger.
Thanks Harsh