Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Host settings update error on deployed version on IIS #6531


User avatar
0
exlnt created

I just deployed my ANZ V6.6.1 to my hosting provider site. I validated all functions on my desktop and they work just fine. However, on the hosted site application the Host Settings update button click keeps throwing a PUT error of "405 Method Not Allowed". I am trying to setup my SMTP, password and registration settings for tenants from the host site. This works perfectly on my desktop, I dont get any errors.

Here is the data that is getting posted on the hosting "host" app.

{"general":{},"tenantManagement":
{"AllowSelfRegistration":"true","UseCaptchaOnRegistration":"true","DefaultEditionId":""},"userManagement":
{},"email":{"DefaultFromAddress":"[email protected]","DefaultFromDisplayName":"Exlnt 
test","SmtpHost":"smtp.sendgrid.net","SmtpPort":"587","SmtpDomain":"","SmtpUserName":"api","SmtpPass
word":"123"},"chat":{},"billing":{"LegalName":"","Address":""},"security":
{"useDefaultPasswordComplexitySettings":true,"passwordComplexity":
{"RequiredLength":"3"},"defaultPasswordComplexity":{"RequiredLength":"3"},"userLockOut":
{"IsEnabled":"true","MaxFailedAccessAttemptsBeforeLockout":"5","DefaultAccountLockoutSeconds":"300"},"two
FactorLogin":
{"IsEmailProviderEnabled":"true","IsSmsProviderEnabled":"true","IsRememberBrowserEnabled":"true"}}}

Here is the data that is getting posted on my desktop "host" app.

{"general":{},"tenantManagement":
{"UseCaptchaOnRegistration":"true","DefaultEditionId":""},"userManagement":{},"email":
{"DefaultFromAddress":"[email protected]","DefaultFromDisplayName":"Exlnt 
test","SmtpHost":"smtp.sendgrid.net","SmtpPort":"587","SmtpDomain":"","SmtpUserName":"api","SmtpPass
word":"123"},"chat":{},"billing":{"LegalName":"","Address":""},"security":
{"useDefaultPasswordComplexitySettings":true,"passwordComplexity":
{"RequiredLength":"3"},"defaultPasswordComplexity":{"RequiredLength":"3"},"userLockOut":
{"IsEnabled":"true","MaxFailedAccessAttemptsBeforeLockout":"5","DefaultAccountLockoutSeconds":"300"},"two
FactorLogin":
{"IsEmailProviderEnabled":"true","IsSmsProviderEnabled":"true","IsRememberBrowserEnabled":"true"}}}

I cannot seem to find any difference in these two JS calls. Even when I change the environment variable on my hosted site app from "Development" to "Staging" it makes no difference. I keep getting the PUT error. I checked the application logs on the server, in the "app_data" folder and there is nothing getting logged. This error seems to be happening on the client side only.

Any ideas on what could be causing this?

Due to this error, I am unable to set my SMTP and other settings as the update is never reaching the server side app service method.

Here is an image from the chrome console, showing the error. On this call, I did not change any settings and just clicked the save button with all the default settings and still the error comes up!


3 Answer(s)
  • User Avatar
    0
    aaron created
    Support Team

    What are you hosting your app on?

  • User Avatar
    0
    exlnt created

    Windows server 2016 IIS 10. On winhost. Com.

  • User Avatar
    0
    aaron created
    Support Team

    Remove WebDAV.

    References:

    • https://stackoverflow.com/questions/6147181/405-method-not-allowed-in-iis7-5-for-put-method
    • https://docs.microsoft.com/en-us/aspnet/web-api/overview/testing-and-debugging/troubleshooting-http-405-errors-after-publishing-web-api-applications