Open Closed

Method Not Allowed error when project is published #6109


User avatar
0
IbrahimSarigoz created

Hello, First, I run the project in debug mode. I can grant permissions to users while the project is in debug mode. Then, as I show in the screenshot, I return the necessary areas to my publish version via OpenIddictApplication. When I try to authorize on Publish, it gives me the method not allowed error. The logs given by iis publish when I received the error are as follows. this one for debug:

this one for publish: this is what i got when i published it

AuthLog:

2023-11-02 15:16:00.500 +03:00 [INF] Request starting HTTP/1.1 POST https://server2022:5000/connect/introspect application/x-www-form-urlencoded 1250
2023-11-02 15:16:00.501 +03:00 [INF] The request URI matched a server endpoint: "Introspection".
2023-11-02 15:16:00.502 +03:00 [INF] The introspection request was successfully extracted: {
  "token": "[redacted]",
  "client_id": "MyBankStore_Web",
  "client_secret": "[redacted]"
}.
2023-11-02 15:16:00.549 +03:00 [INF] The introspection request was successfully validated.
2023-11-02 15:16:00.550 +03:00 [INF] Potentially sensitive application claims were excluded from the introspection response as the client 'MyBankStore_Web' was not explicitly listed as an audience.
2023-11-02 15:16:00.550 +03:00 [INF] The response was successfully returned as a JSON document: {
  "active": true,
  "iss": "https://server2022:5000/",
  "sub": "aca10e3a-8dea-4711-2f1b-31d2c159fdc9",
  "jti": "80ac7344-f54f-4487-9883-6d657075594e",
  "token_type": "Bearer",
  "token_usage": "access_token",
  "client_id": "MyBankStore_Web",
  "iat": 1698926942,
  "nbf": 1698926942,
  "exp": 1698930542,
  "aud": "MyBankStore"
}.
2023-11-02 15:16:00.551 +03:00 [INF] Request finished HTTP/1.1 POST https://server2022:5000/connect/introspect application/x-www-form-urlencoded 1250 - 200 347 application/json;charset=UTF-8 51.6372ms

HostApiLog:

2023-11-02 15:15:58.830 +03:00 [INF] Request starting HTTP/1.1 GET https://server2022:5001/health-status - -
2023-11-02 15:15:58.832 +03:00 [INF] Executing endpoint 'Health checks'
2023-11-02 15:15:58.838 +03:00 [INF] Executed endpoint 'Health checks'
2023-11-02 15:15:58.839 +03:00 [INF] Received HTTP response headers after 10.2743ms - 200
2023-11-02 15:15:58.839 +03:00 [INF] End processing HTTP request after 10.8877ms - 200
2023-11-02 15:15:58.859 +03:00 [INF] Request finished HTTP/1.1 GET https://server2022:5001/health-status - - - 200 - application/json 29.1304ms
2023-11-02 15:16:00.569 +03:00 [INF] Request starting HTTP/1.1 GET https://server2022:5001/api/permission-management/permissions?providerName=U&providerKey=04a20e3a-1b59-c89a-52fb-f1ef9d1b4312&api-version=1.0 - -
2023-11-02 15:16:00.573 +03:00 [INF] Executing endpoint 'Volo.Abp.PermissionManagement.PermissionsController.GetAsync (Volo.Abp.PermissionManagement.HttpApi)'
2023-11-02 15:16:00.573 +03:00 [INF] Route matched with {area = "permissionManagement", action = "Get", controller = "Permissions", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Volo.Abp.PermissionManagement.GetPermissionListResultDto] GetAsync(System.String, System.String) on controller Volo.Abp.PermissionManagement.PermissionsController (Volo.Abp.PermissionManagement.HttpApi).
2023-11-02 15:16:01.440 +03:00 [INF] Executing ObjectResult, writing value of type 'Volo.Abp.PermissionManagement.GetPermissionListResultDto'.
2023-11-02 15:16:01.441 +03:00 [INF] Executed action Volo.Abp.PermissionManagement.PermissionsController.GetAsync (Volo.Abp.PermissionManagement.HttpApi) in 867.285ms
2023-11-02 15:16:01.441 +03:00 [INF] Executed endpoint 'Volo.Abp.PermissionManagement.PermissionsController.GetAsync (Volo.Abp.PermissionManagement.HttpApi)'
2023-11-02 15:16:01.460 +03:00 [INF] Request finished HTTP/1.1 GET https://server2022:5001/api/permission-management/permissions?providerName=U&providerKey=04a20e3a-1b59-c89a-52fb-f1ef9d1b4312&api-version=1.0 - - - 200 - application/json;+charset=utf-8 890.5437ms
2023-11-02 15:16:01.476 +03:00 [INF] Request starting HTTP/1.1 GET https://server2022:5001/api/abp/application-configuration?IncludeLocalizationResources=False&api-version=1.0 - -
2023-11-02 15:16:01.479 +03:00 [INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController.GetAsync (Volo.Abp.AspNetCore.Mvc)'
2023-11-02 15:16:01.480 +03:00 [INF] Route matched with {area = "abp", action = "Get", controller = "AbpApplicationConfiguration", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto] GetAsync(Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationRequestOptions) on controller Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController (Volo.Abp.AspNetCore.Mvc).
2023-11-02 15:16:01.570 +03:00 [INF] Executing ObjectResult, writing value of type 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto'.
2023-11-02 15:16:01.572 +03:00 [INF] Executed action Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController.GetAsync (Volo.Abp.AspNetCore.Mvc) in 91.5936ms
2023-11-02 15:16:01.572 +03:00 [INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController.GetAsync (Volo.Abp.AspNetCore.Mvc)'
2023-11-02 15:16:01.595 +03:00 [INF] Request finished HTTP/1.1 GET https://server2022:5001/api/abp/application-configuration?IncludeLocalizationResources=False&api-version=1.0 - - - 200 - application/json;+charset=utf-8 119.1411ms
2023-11-02 15:16:01.598 +03:00 [INF] Request starting HTTP/1.1 GET https://server2022:5001/api/abp/application-localization?CultureName=en-GB&OnlyDynamics=True&api-version=1.0 - -
2023-11-02 15:16:01.600 +03:00 [INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationLocalizationController.GetAsync (Volo.Abp.AspNetCore.Mvc)'
2023-11-02 15:16:01.601 +03:00 [INF] Route matched with {area = "abp", action = "Get", controller = "AbpApplicationLocalization", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationLocalizationDto] GetAsync(Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationLocalizationRequestDto) on controller Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationLocalizationController (Volo.Abp.AspNetCore.Mvc).
2023-11-02 15:16:01.741 +03:00 [INF] Executing ObjectResult, writing value of type 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationLocalizationDto'.
2023-11-02 15:16:01.741 +03:00 [INF] Executed action Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationLocalizationController.GetAsync (Volo.Abp.AspNetCore.Mvc) in 140.5967ms
2023-11-02 15:16:01.741 +03:00 [INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationLocalizationController.GetAsync (Volo.Abp.AspNetCore.Mvc)'
2023-11-02 15:16:01.757 +03:00 [INF] Request finished HTTP/1.1 GET https://server2022:5001/api/abp/application-localization?CultureName=en-GB&OnlyDynamics=True&api-version=1.0 - - - 200 - application/json;+charset=utf-8 159.0243ms
2023-11-02 15:16:08.862 +03:00 [INF] Start processing HTTP request GET https://server2022:5001/health-status
2023-11-02 15:16:08.862 +03:00 [INF] Sending HTTP request GET https://server2022:5001/health-status
2023-11-02 15:16:08.863 +03:00 [INF] Request starting HTTP/1.1 GET https://server2022:5001/health-status - -
2023-11-02 15:16:08.864 +03:00 [INF] Executing endpoint 'Health checks'
2023-11-02 15:16:08.870 +03:00 [INF] Executed endpoint 'Health checks'

webLog:

2023-11-02 15:16:00.478 +03:00 [INF] Request starting HTTP/2 GET https://server2022:5002/AbpPermissionManagement/PermissionManagementModal?providerName=U&providerKey=04a20e3a-1b59-c89a-52fb-f1ef9d1b4312&providerKeyDisplayName=ibo - -
2023-11-02 15:16:00.480 +03:00 [INF] Check the access_token is active every 60 seconds.
2023-11-02 15:16:00.551 +03:00 [INF] The access_token is active.
2023-11-02 15:16:00.552 +03:00 [INF] Executing endpoint '/AbpPermissionManagement/PermissionManagementModal'
2023-11-02 15:16:00.553 +03:00 [INF] Route matched with {page = "/AbpPermissionManagement/PermissionManagementModal", action = "", controller = "", area = ""}. Executing page /AbpPermissionManagement/PermissionManagementModal
2023-11-02 15:16:00.553 +03:00 [INF] Skipping the execution of current filter as its not the most effective filter implementing the policy Microsoft.AspNetCore.Mvc.ViewFeatures.IAntiforgeryPolicy
2023-11-02 15:16:00.554 +03:00 [INF] Executing handler method Volo.Abp.PermissionManagement.Web.Pages.AbpPermissionManagement.PermissionManagementModal.OnGetAsync - ModelState is "Valid"
2023-11-02 15:16:00.555 +03:00 [INF] Start processing HTTP request GET https://server2022:5001/api/permission-management/permissions?providerName=U&providerKey=04a20e3a-1b59-c89a-52fb-f1ef9d1b4312&api-version=1.0
2023-11-02 15:16:00.555 +03:00 [INF] Sending HTTP request GET https://server2022:5001/api/permission-management/permissions?providerName=U&providerKey=04a20e3a-1b59-c89a-52fb-f1ef9d1b4312&api-version=1.0
2023-11-02 15:16:01.441 +03:00 [INF] Received HTTP response headers after 885.4394ms - 200
2023-11-02 15:16:01.441 +03:00 [INF] End processing HTTP request after 885.8275ms - 200
2023-11-02 15:16:01.461 +03:00 [INF] Executed handler method OnGetAsync, returned result Microsoft.AspNetCore.Mvc.RazorPages.PageResult.
2023-11-02 15:16:01.466 +03:00 [INF] Start processing HTTP request GET https://server2022:5001/api/abp/application-configuration?IncludeLocalizationResources=False&api-version=1.0
2023-11-02 15:16:01.466 +03:00 [INF] Sending HTTP request GET https://server2022:5001/api/abp/application-configuration?IncludeLocalizationResources=False&api-version=1.0
2023-11-02 15:16:01.572 +03:00 [INF] Received HTTP response headers after 106.105ms - 200
2023-11-02 15:16:01.572 +03:00 [INF] End processing HTTP request after 106.4819ms - 200
2023-11-02 15:16:01.596 +03:00 [INF] Start processing HTTP request GET https://server2022:5001/api/abp/application-localization?CultureName=en-GB&OnlyDynamics=True&api-version=1.0
2023-11-02 15:16:01.596 +03:00 [INF] Sending HTTP request GET https://server2022:5001/api/abp/application-localization?CultureName=en-GB&OnlyDynamics=True&api-version=1.0
2023-11-02 15:16:01.742 +03:00 [INF] Received HTTP response headers after 145.0816ms - 200
2023-11-02 15:16:01.742 +03:00 [INF] End processing HTTP request after 145.3944ms - 200
2023-11-02 15:16:02.111 +03:00 [INF] Executed page /AbpPermissionManagement/PermissionManagementModal in 1558.4942ms
2023-11-02 15:16:02.111 +03:00 [INF] Executed endpoint '/AbpPermissionManagement/PermissionManagementModal'
2023-11-02 15:16:02.114 +03:00 [INF] Request finished HTTP/2 GET https://server2022:5002/AbpPermissionManagement/PermissionManagementModal?providerName=U&providerKey=04a20e3a-1b59-c89a-52fb-f1ef9d1b4312&providerKeyDisplayName=ibo - - - 200 - text/html;+charset=utf-8 1636.0225ms
2023-11-02 15:16:04.648 +03:00 [INF] Request starting HTTP/2 POST https://server2022:5002/AbpPermissionManagement/PermissionManagementModal application/x-www-form-urlencoded;+charset=UTF-8 16612
2023-11-02 15:16:04.650 +03:00 [INF] Executing endpoint '/AbpPermissionManagement/PermissionManagementModal'
2023-11-02 15:16:04.650 +03:00 [INF] Route matched with {page = "/AbpPermissionManagement/PermissionManagementModal", action = "", controller = "", area = ""}. Executing page /AbpPermissionManagement/PermissionManagementModal
2023-11-02 15:16:04.650 +03:00 [INF] Skipping the execution of current filter as its not the most effective filter implementing the policy Microsoft.AspNetCore.Mvc.ViewFeatures.IAntiforgeryPolicy
2023-11-02 15:16:04.662 +03:00 [INF] Executing handler method Volo.Abp.PermissionManagement.Web.Pages.AbpPermissionManagement.PermissionManagementModal.OnPostAsync - ModelState is "Valid"
2023-11-02 15:16:04.663 +03:00 [INF] Start processing HTTP request PUT https://server2022:5001/api/permission-management/permissions?providerName=U&providerKey=04a20e3a-1b59-c89a-52fb-f1ef9d1b4312&api-version=1.0
2023-11-02 15:16:04.663 +03:00 [INF] Sending HTTP request PUT https://server2022:5001/api/permission-management/permissions?providerName=U&providerKey=04a20e3a-1b59-c89a-52fb-f1ef9d1b4312&api-version=1.0
2023-11-02 15:16:04.665 +03:00 [INF] Received HTTP response headers after 1.9647ms - 405
2023-11-02 15:16:04.665 +03:00 [INF] End processing HTTP request after 2.245ms - 405
2023-11-02 15:16:04.666 +03:00 [ERR] ---------- RemoteServiceErrorInfo ----------
{
  "code": "MethodNotAllowed",
  "message": "Method Not Allowed",
  "details": null,
  "data": null,
  "validationErrors": null
}

2023-11-02 15:16:04.667 +03:00 [ERR] Method Not Allowed
Volo.Abp.Http.Client.AbpRemoteCallException: Method Not Allowed
   at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase`1.ThrowExceptionForResponseAsync(HttpResponseMessage response)
   at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase`1.RequestAsync(ClientProxyRequestContext requestContext)
   at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase`1.RequestAsync(String methodName, ClientProxyRequestTypeValue arguments)
   at Volo.Abp.PermissionManagement.PermissionsClientProxy.UpdateAsync(String providerName, String providerKey, UpdatePermissionsDto input)
   at Volo.Abp.PermissionManagement.Web.Pages.AbpPermissionManagement.PermissionManagementModal.OnPostAsync()
   at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory.GenericTaskHandlerMethod.Convert[T](Object taskAsObject)
   at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory.GenericTaskHandlerMethod.Execute(Object receiver, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeHandlerMethodAsync()
   at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeNextPageFilterAsync()
2023-11-02 15:16:04.667 +03:00 [ERR] Code:MethodNotAllowed
2023-11-02 15:16:04.667 +03:00 [ERR] Details:
2023-11-02 15:16:04.667 +03:00 [INF] Executing ObjectResult, writing value of type 'Volo.Abp.Http.RemoteServiceErrorResponse'.
2023-11-02 15:16:04.667 +03:00 [INF] Executed page /AbpPermissionManagement/PermissionManagementModal in 17.3296ms
2023-11-02 15:16:04.667 +03:00 [INF] Executed endpoint '/AbpPermissionManagement/PermissionManagementModal'
2023-11-02 15:16:04.668 +03:00 [INF] Request finished HTTP/2 POST https://server2022:5002/AbpPermissionManagement/PermissionManagementModal application/x-www-form-urlencoded;+charset=UTF-8 16612 - 405 - application/json;+charset=utf-8 19.0783ms
~~~~
  • ABP Framework version: v7.4
  • UI Type: MVC
  • Database System: EF Core (Oracle)
  • Tiered (for MVC) or Auth Server Separated (for Angular): MVC Project
  • Exception message and full stack trace:
  • Steps to reproduce the issue:
Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

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

    hi

    Please check your web.config file.

    https://learn.microsoft.com/en-us/troubleshoot/developer/webapps/iis/health-diagnostic-performance/http-error-405-website https://mozartec.com/asp-net-core-error-405-methods-not-allowed-for-put-and-delete-requests-when-hosted-on-iis/

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on September 16, 2026, 14:50
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.