Hi There,
Weird problem here. I've been working on a DNN site and have a local development build on my PC (Windows 10, IIS 10) which I have pushed up to our development server (Server 2016 Standard, IIS 10).
The site is working fine in both environments but for some reason the Edit button is not working on the server, and so it is impossible to edit pages.
I've checked everything and all code seems to be the same between the two and the configuration of both platforms appears identical. Both have been updated to the latest DNN 9.1.1.
The only difference I can see is that when you click the button on the server, a 302 is being returned prior to the page. So the order of calls is:
On my local machine when editing the home page ("/")
200 http /API/PersonaBar/UserSettings/UpdateUserSettings
200 http /API/internalservices/controlBar/ToggleUserMode
200 http /
...etc
On the server when editing the home page ("/")
200 http /API/PersonaBar/UserSettings/UpdateUserSettings
200 http /API/internalservices/controlBar/ToggleUserMode
302 http /
200 http /
...etc
The contents of the 302 request looks like this:
Request
GET http://stage.touringandcruising.com/ HTTP/1.1
Host: stage.touringandcruising.com
Connection: keep-alive
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: http://stage.touringandcruising.com/
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.8,en-GB;q=0.6
Cookie: .ASPXANONYMOUS=c_uuZrhGb4jUCGkO2d3ZXVWOoHgpydGcu6_xJxeK1XwK_xT4J3gI9w4iTIJ_4BX9jmMqaQ_OOL4CzYjdFMpzIIv3rCDd9NQmOtussBeBqgUBBtZF0; __RequestVerificationToken=otuWrjg0TMK3-iZuzrNIPfHDB5dOQlOgt1cUJ8yQUZsjAtjZ9tX-wDjsVWjPHkX2jr5WiQ2; ASP.NET_SessionId=hkqg4zj2e5a0dqemluj3pvxs; _hjIncludedInSample=1; __utma=194314735.1415578934.1507821305.1508421162.1508855905.6; __utmc=194314735; __utmz=194314735.1507821305.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); authentication=DNN; USERNAME_CHANGED=; .DOTNETNUKE=BBD8FD17AAA65F93E9520B7A5171F4296C2D723CEF492F6F3C61A3913F75C997561785EF9AD6038552EC1147C2866DE59E72DE4B9D0933E8C3B8380046A4C4DCE5FA3E64; __atuvc=7%7C41%2C8%7C42%2C5%7C43; __atuvs=59ef60f229a3f351001; LastPageId=0:83; dnn_IsMobile=False; language=en-US
Response
HTTP/1.1 302 Found
Cache-Control: no-cache
Pragma: no-cache
Content-Type: text/html; charset=utf-8
Expires: -1
Location: http://stage.touringandcruising.com/
Set-Cookie: dnn_IsMobile=False; path=/; HttpOnly
Set-Cookie: language=en-US; path=/; HttpOnly
Set-Cookie: LastPageId=0:55; path=/; HttpOnly
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
Date: Tue, 24 Oct 2017 15:59:07 GMT
Content-Length: 153
<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="http://stage.touringandcruising.com/">here</a>.</h2>
</body></html>
Weirdly the server just redirects back to the same location of the original request. I've checked the default document and disabled all redirect rules in the web.config and I can't see anywhere it is telling the client to do this. The code is the same on both environments so it can only be config, the code is exactly the same.
I'm completely stumped, anyone have any idea what could be causing this?
If I browse to the home page directly on the url above it goes straight through with a 200, it's only during the edit page button that this redirect is happening.
Any help would be extremely welcome.
Thanks,
Olly