none
App fails on any deployment slot, works on production - samesite issue? RRS feed

  • Question

  • Hi,

    Our MVC app, been running for a year , returns a custom error message with a HTTP status code. This works fine on the production app but fails on a the deployment slot. To update the app we have to publish twice  - 1) to the deployment slot, swap, then publish to the old production, then swap again!

    Deployment slot is a clone of the production. 

    Strange thing is that if we run Fiddler it now works on the deployment slot. Assume Fiddler is running a proxy and re-routing traffic. 

    Is this something to do with Samesite changes or SSL/Trusting the client.

    Wednesday, March 25, 2020 8:13 PM

All replies

  • Thanks for asking question! If I have understood right your app runs fine in production slot and fails in staging/ nonproduction slot. If so, While adding a slot check if you have selected whether to clone an app configuration from another deployment slot.You can clone a configuration from any existing slot.

    Settings that can be cloned include app settings, connection strings, language framework versions, web sockets, HTTP version, and platform bitness.

    Also, when you clone configuration from another deployment slot, the cloned configuration is editable. Some configuration elements follow the content across a swap (not slot specific), whereas other configuration elements stay in the same slot after a swap (slot specific).

    You may want to refer : https://docs.microsoft.com/en-us/azure/app-service/deploy-staging-slots#add-a-slot

    https://docs.microsoft.com/en-us/azure/app-service/deploy-staging-slots#what-happens-during-a-swap

    To add to this while investigating a swap failure if you are not able to find any traces, see if you have a rewrite rule that aborts HTTP requests. To check that: Browse to the staging slot over HTTP. You would get HTTP 502 error then open SCM site and from there open the web.config file. Check for a rewrite rule that looks similar to below:

       <rule name="RequireHttps" stopProcessing="true">
          <match url="(.*)"/>
          <conditions>
          <add input="{HTTPS}" pattern="^OFF$"/>
          </conditions>
          <action type="AbortRequest"/>
        </rule>

    If such rule exists, then that is the reason for swap failures.

    A possible workaround for this is described here .

    --------------------------------------------------------------------------------------------------------------------------------------

    We're migrating from MSDN to Microsoft Q&A as our new forums and Azure App Service has already made the move!  In future, you can ask and look for the discussion for Azure App Service related questions here:   https://docs.microsoft.com/answers/topics/azure-webapps.html

    We are actively working to onboard remaining Azure services on Microsoft Q&A. We will make a public announcement once complete. Want to Learn more about new platform: Microsoft Q&A Getting Started
    Friday, March 27, 2020 4:41 AM
  • Thanks for that. 

    So yes, it is cloned and we just cloned again to make sure we're hadn't missed something.  Will check for re-write rules now and see if that makes any difference. Will let you know.

    cheers,

    Saturday, March 28, 2020 11:05 AM
  • Checked for re-write rules - nothing there. 
    Sunday, March 29, 2020 8:18 AM
  • Thanks for the clarification. Could you please send an email to AzCommunity[at]Microsoft[dot]com referencing this issue, we would like to work closer with you on this matter.


    Tuesday, March 31, 2020 5:04 AM