U4-3809 - Umbraco 6.1.6 - Unable to add hostname from dialog

Created by Warren Buckley (Personal) 06 Dec 2013, 11:18:13 Updated by Warren Buckley (Personal) 06 Dec 2013, 12:44:54

The dialog after hitting save button shows this message in the dialog. {"Message":"The requested resource does not support http method 'GET'."}

Poking around in the source I see this JS file does an AJAX post


Which is doing a post to the DomainsAPI controller https://github.com/umbraco/Umbraco-CMS/blob/6.1.6/src/Umbraco.Web/WebServices/DomainsApiController.cs

So looking in the network traffic tab in Chrome I am getting a 301 Permanently moved for the POST and then it looks like Chrome attempts to do a GET instead which then the Domains API controller throws the response message about not supporting HTTP method GET as the Controller only allows the POST verb.

Thanks, Warren

3 Attachments


Stephan 06 Dec 2013, 11:41:34

Since I wrote AssignDomain2.js I guess I have to handle the issue. The GET has to fail since the controller wants you to POST to it, that makes sense. Chrome handles the 301 response to POST and turns it into a GET, that sort-of makes sense. What I still don't understand is why would you get a 301 redirect in the first place. It's that 301 that does not make sense. I have no idea what's causing that redirect, but this is what we have to find out.

/application/DomainsApi/SaveLanguageAndDomains is valid, why does it turn it into .../SaveLanguagesAndDomains/ with a trailing slash?

Will try to reproduce. Can you tell me which OS / version of IIS you're running on?

Warren Buckley (Personal) 06 Dec 2013, 11:47:03

Hey Stephan,

*Running Windows 8.1 *Umbraco 6.1.6 (Upgrade) - Wondering if upgrade may have not gone so smoothly perhaps?! *IIS Version 8.5.9600.16384 *SQL Server Express 2012 (Remote Shared DEV DB)

Thanks, Warren

Warren Buckley (Personal) 06 Dec 2013, 12:44:37

Stephan I have found the issue after doing some comparison against a clean site and your mention of URL Rewrite, that was exactly the issue we had quite an aggressive URL rewrite XML block in our web.config commenting this out and retrying fixed the issue.

Sorry for raising as an issue.

Thanks, Warren

Priority: Major

Type: Bug

State: Closed


Difficulty: Normal


Backwards Compatible: True

Fix Submitted:

Affected versions: 6.1.6

Due in version:


Story Points: