Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.
ABP Framework version: v4.0.0
UI type: Angular
DB provider: EF Core
Identity Server Seperated (Angular): yes
Exception message and stack trace: IIS Server log file (backend log): CORS policy execution successful. CORS request made for path: /api/app/user-role/roles-of-currentf-user from origin: http://..net but was ignored because path was not for an allowed IdentityServer CORS endpoint No CORS policy found for the specified request.
Steps to reproduce the issue: I want to deploy the solution on IIS. I created 2 sites (url have been changed for the public question): test.app.com --> on here I publish the angular project apitest.app.com --> on here I publish the dotnet project
for tests purpose, I do not use https.
From a browser, I can reach swagger successfully through api.test.app.com.
From the browser, I can reach the Angular successfully through test.app.com. However, I get the error said on * Exception message and stack trace After that, if I click on login button, nothing happened and nothing appears on the browser console.
I guess I did put the correct information on appsettings.json:
"App": { "SelfUrl": "http://apitest.app.com", "ClientUrl": "http://test.app.com", "CorsOrigins": "http://test.app.com,http://localhost:4200,https://localhost:44307,https://localhost:44348" }, "ConnectionStrings": { "Default": "Server=.\;Database=;User ID=;Password=;Trusted_Connection=;MultipleActiveResultSets=true" }, "AuthServer": { "Authority": "http://apitest.app.com", "RequireHttpsMetadata": "false" },
Any help about the deployment would be welcome. Do I do the right way by using 2 different sites?If yes, what is wrong as I am out of idea now...
I first tried to create one "main" site hosting Angular, where I did add an Application on API, but I was not able to reach through the API path.
Thanks for your help
10 Answer(s)
-
0
Can I check it remotely? shiwei.liang@volosoft.com
-
0
Sure, I sent you an email to ask how to proceed
-
1
The problem has been solve, if you have any question, please reopen.
-
0
I have the same problem. Has the problem been solved?
-
0
I had few issues, first the back-end need to be in https (in my tests it was not working otherwise). Plus need to be sure that the appsettings.json from DbMigrator has correct information as it fills the table IdentityServerClientRedirectUris. My issue was from here a I had App redirect url to localhost still.
Hope it will help
-
0
I wanted to know if it was possible to make the hosting differently.
Instead of having 2 subdomains http://apitest.app.com and http://test.app.com
We will have only one domain app.com for the frontend and the API will be on app.com/API
Is there any way to do it? I made some test but anytimes it fails to communicate each other
-
0
You can deploy API as a sub appliation.
See https://devblogs.microsoft.com/aspnet/part-1-of-3-creating-sub-projects-in-iis-with-web-application-projects/
-
0
I am sorry but it is not accurate with my project:
- I have an Angular project and a .NET (ABP) project
- The settings there are different (the post is from 2006 so they might use VS 2005).
Here they explain on how to make an asp apllication child of another on a same solution whicj contains 2 web applications
Creating sub-projects under a root project
Once the root project is up and running fine, the next step is to create a sub-project and set it up so it builds and runs as part of the same ASP.NET application represented by the root project.
-
0
@christophe, can you pls create a new topic for the new question. when we solve the major issue we generally close the ticket. this is good for others to track the issue.
-
0
@alper, OK no problem