Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Depoloyment Problem #7540

Closed
Digisaman opened this issue Jan 30, 2021 · 5 comments
Closed

Depoloyment Problem #7540

Digisaman opened this issue Jan 30, 2021 · 5 comments

Comments

@Digisaman
Copy link

APB Framework Version 4.2
UI : Blazor
DB Provider EFCore

I've Published the framework on a Windows Server 2019 with IIS
Created 2 IIS websites :
1 . Hosting the Blazor Project on Port 443 for SLL
2. Hosting the HttpApi.Host Project on another Port
(Is this the correct way ? do I need 2 websites? should they both be on the same server?)

Both Websites are running correctly.
But when I browse the first website, and click the Login Button, I get this Error
404 not found
and here's the BrowserConsole Log :
GET https://172.31.30.120/Error?httpStatusCode=404 404
DevTools failed to load SourceMap: Could not load content for https://172.31.30.120/__bundles/bootstrap.min.css.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for https://172.31.30.120/__bundles/toastr.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

@maliming
Copy link
Member

maliming commented Feb 1, 2021

@stsrki Do you have any advice?

@stsrki
Copy link
Contributor

stsrki commented Feb 1, 2021

@maliming As far as I know, they should be separated. That's why HttpApi.Host exists. To be able to connect to any client or app.

@Digisaman It's hard to tell what can be wrong from your description without access to the system. Check that you are connecting to HTTPS and no HTTP. Also, check your firewall settings.

@Digisaman
Copy link
Author

Digisaman commented Feb 1, 2021

Hi @stsrki
I've checked my connection it's HTTPS
and I've published the HTTPApi.Host and Blazor projects to two separate AWS servers (Both Accessing the same Database Server)
Both are running on HTTPS with valid domain names and certificates. I still don't know what the problem is, Everything is OK on my local machine But when I Publish the APP on AWS I have this issue
The HomePage is browsed correctly but when try to login and it redirects to HTTPApi.Host, I Get this Error:

[500] Error!
invalid_request

ABPHomePage

ABPLogin1
ABPLogin2

Any Ideas on how to resolve the issue?

@ilkayilknur
Copy link
Contributor

@Digisaman It is hard to tell what's wrong with the system. You need to check application logs to find the problem. The problem could be a connectivity issue between the API and DB.

When you deploy two different websites, you need to configure CorsOrigins and RedirectAllowedUrls configs. You can get reference from #7416 (reply in thread)

@Digisaman
Copy link
Author

Tanx @ilkayilknur following the link you provided. Solved the Login Issue. (Section 10)
I just changed the Root URL in DbMigrator project config To the Blazor App's URL and Run the Migrator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants