Login to Swagger UI page .NET Core - authentication

I am using .Net Core and Swashbuckle for Swagger UI. I need to show login window before I go to Swagger UI Page. Is there any solution for this problem? Thank you

Related

Can we write the .net core WebAPI in the asp.net core razor web page itself?

I have the following projects in my solution all .net core 5.0.
myproject.domain
myproject.infrastructre
myproject.webAPI
myproject.UI.Razorweb page.
Instead of using SPA which calls the webAPI, I am using razor web page which will call the webAPI(.net 5.0). My question is can we merge the webAPI and the razorwebpage into one? Can we write webAPI in the razor web page itself?
Is that allowed?
I agree with the suggestion given by Jeremy.
You should have a web API and Razor project separate.
Besides, if you would like to make some tests then you could refer to the articles below.
Use Razor Pages, MVC, And Web API In A Single ASP.NET Core Application
Hosting ASP.NET Core Razor Pages and Web APIs in a Single Project
Razor pages and webapi in the same project

ABP Login/Registration page in Angular UI instead of Identity Server UI

How to integrate login/registration pages in angular project?
When I run the angular project and click on Login Page, it redirect to the Identity Server URL. We need to use the same domain where our Angular project is hosted. We are also using Volo.Account npm package in angular project so login page should be served by https://localhost:4200/account/login url.
I read the documentations and articles but no article found to integrate login in Angular UI.
Here is the article to customize the login page for MVC razor page and we need to customize the login page for Angular.
https://community.abp.io/articles/how-to-customize-the-login-page-for-mvc-razor-page-applications-9a40f3cd
ABP Framework version: 4.4.0
UI type: Angular
DB provider: EF Core
Tiered (MVC) or Identity Server Separated (Angular): yes
I am assuming that you are using ASP.NET to serve an API for your Angular frontend that is somehow secured by Identity Server.
In that case, you should create a AuthController with Login and Logout endpoints that will be called by a view you just normally implement in Angular. You can use JWT for authentication on subsequent API calls. https://docs.identityserver.io/en/latest/topics/apis.html, e.g. a JSON token will be returned by the login endpoint.
I got the solution from the below URL.
https://docs.abp.io/en/abp/latest/UI/Angular/Authorization#resource-owner-password-flow
Thanks
Imrankhan

Swagger page is blank

I am running this .net core 3.1 api project and i got swashbuckle installed and configured swagger on the startup. However when i navigate to http://localhost:5000/swagger/index.html the page is totally empty. Can someone advise how to properly configure the project?

How to use AJAX tabcontainer in asp.net mvc4

I want to use AJAX tabcontainer in asp.net mvc 4. I found out that the AJAX Control Toolkit controls are server controls and are not supported in ASP.NET MVC. But I want to use it.
So please guide to me how can I use tabcontainer with other ways like ajax tabcontainer.

How to use Devexpress report in Asp.Net MVC 4 Web Application(Not DXperience v12.2 ASP.NET MVC Web Application )

I want to use Devexpress 12.2 xtrareport in Asp.Net MVC 4 Web Application.Now i think you will suggest me Create an ASP.NET MVC Application and Add a Report to It but in this they are using DXperience v12.2 ASP.NET MVC Web Application and i am using Asp.Net MVC 4 Web Application.
Is this possible ?
This is the solution which i find out :
1.)Please review the How to: Manually Register DevExpress Extensions to Start Using Them in an MVC Web Application documentation article to learn how to register DevExpress ASP.NET MVC extensions manually.
2.)This way, you will be able to create a reporting application using the approach from the
Create a Basic Report in ASP.NET MVC documentation article.