Search code examples
wcfiishttpsasmx

text/xml is forbidden for WCF and ASMX on https


I need help on making an asmx or wcf svc to work on https.

The IIS and certificate is already setup but when passing a post request with text/xml data. It returns 403 Forbidden.

Is there a setup that still needs to configure to allow a text/xml data?


Solution

  • Already fix this 403 Forbidden error. In my case, I am behind a firewall, not the firewall in my server but there is another firewall that my server is hosted and it is the AWS WAF (Web Application Firewall), allowing the client IP solves the issue. You can also disable other rule when troubleshooting the issue.

    Troubleshooting Tips: 1. Verify that your Web Service is working in local development. Change web.config if necessary. 2. Add Logging to your IIS Web Application in the Server. Check logs if it contains 403 status. 3. Disable Firewall in the Server if logs from step 2 don't have 403 status. 4. If Step 2 and 3 don't solve the issue. Check the firewall that your server is hosted, it is the AWS WAF in my case, and disable all rules.