Reputation: 623
I have this insidious problem. I usually publish a C# .NET web project on a App Service slot, and usually do the Remote Attach for debugging my software.
One day we scale out the number of instance from 1 to 4 and I noticed that the remote debug seems doesn't work anymore.
That because when I starts the remote debugging, this attach to a random instance of the server and, after the browser respond, I have no way to ensure that subsequent browser requests go to the same instance. I believed that with the "ARRaffinity cookie" option on was possible force the requests on the same instance, but It seems doesn't work. I have no idea of how I can resolve that.
Upvotes: 1
Views: 366
Reputation: 20067
Instance definition is done using a cookie with key ARRaffinity. The values are randomly assigned to each instance and are unique. You can specify the instance you want to debug using the manual method. If you use Chorme, visit the website and click F12>Application>Cookies, then you will get the specify instance cookie value.
When you go to Attach to Process
to enter your username and password, giving your user name with the following: pound/hash #
and the first few characters of the ARR affinity cookie
. For example: yoeycai#9762c
(joeycai is username and 9762c is the first characters of ARR cookie).
For more details, you could refer to this article and this one for remote debug.
Upvotes: 2