Ends in:
2 DAYS
5 HRS
56 MIN
3 SEC
Ends in:
2 D
5 H
56 M
3 S
Open Closed

error 400 when Authorize from Swagger when deploy to IIS on Win Server #4162


User avatar
0
thuc.nghiem@techplus.vn created

Error deploy to IIS on Server

  • ABP Framework version: v6.0.0

  • UI type: Angular

  • DB provider: EF Core

  • Tiered (MVC) or Identity Server Separated (Angular): no

  • Exception message and stack trace:

  • 2022-12-08 15:09:36.809 +07:00 [INF] Request starting HTTP/2 GET https://192.168.100.238:44345/connect/authorize?response_type=code&client_id=TestDep_Swagger&redirect_uri=https%3A%2F%2F192.168.100.238%3A44345%2Fswagger%2Foauth2-redirect.html&state=VGh1IERlYyAwOCAyMDIyIDE1OjA5OjM2IEdNVCswNzAwIChJbmRvY2hpbmEgVGltZSk%3D - - 2022-12-08 15:09:36.822 +07:00 [INF] The request address matched a server endpoint: "Authorization". 2022-12-08 15:09:36.850 +07:00 [INF] The authorization request was successfully extracted: { "response_type": "code", "client_id": "TestDep_Swagger", "redirect_uri": "https://192.168.100.238:44345/swagger/oauth2-redirect.html", "state": "VGh1IERlYyAwOCAyMDIyIDE1OjA5OjM2IEdNVCswNzAwIChJbmRvY2hpbmEgVGltZSk=" }. 2022-12-08 15:09:37.032 +07:00 [INF] Client validation failed because 'https://192.168.100.238:44345/swagger/oauth2-redirect.html' was not a valid redirect_uri for TestDep_Swagger. 2022-12-08 15:09:37.032 +07:00 [INF] The authorization request was rejected because the redirect_uri was invalid: 'https://192.168.100.238:44345/swagger/oauth2-redirect.html'. 2022-12-08 15:09:37.059 +07:00 [INF] Request finished HTTP/2 GET https://192.168.100.238:44345/connect/authorize?response_type=code&client_id=TestDep_Swagger&redirect_uri=https%3A%2F%2F192.168.100.238%3A44345%2Fswagger%2Foauth2-redirect.html&state=VGh1IERlYyAwOCAyMDIyIDE1OjA5OjM2IEdNVCswNzAwIChJbmRvY2hpbmEgVGltZSk%3D - - - 302 - - 250.5526ms 2022-12-08 15:09:37.063 +07:00 [INF] Request starting HTTP/2 GET https://192.168.100.238:44345/Error?httpStatusCode=400 - -

  • Steps to reproduce the issue:

    1. Run https://192.168.100.238:44345/swagger/index.html
    1. click Authorize
    1. Go to https://192.168.100.238:44345/Error?httpStatusCode=400 and error "400ErrorAn internal error occurred during your request!" column: RedirectUris: ["https://192.168.100.238:44345/swagger/oauth2-redirect.html"]

5 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    because 'https://192.168.100.238:44345/swagger/oauth2-redirect.html' was not a valid redirect_uri for TestDep_Swagger.

    Did you clear the Redis cache?

  • User Avatar
    0
    thuc.nghiem@techplus.vn created

    Can I disable Redis in application config file?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    it's not recommended to disable Redis.

  • User Avatar
    0
    thuc.nghiem@techplus.vn created

    Hi Maliming. I get an error like https://support.abp.io/QA/Questions/3465/No-%27Access-Control-Allow-Origin%27-header-for-Angular-Application-after-input-login-details-and-click-login-with-Backend-Deployed-on-windows-server and you said "Problem resolved, The IIS server requires to access the domain name". How do I configure IIS?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    First of all there seems to be a problem with your https certificate.

    Please share the logs of HTTP error 500

Made with ❤️ on ABP v9.1.0-preview. Updated on December 02, 2024, 12:35