Поделиться через


Setting up Session Affinity/Sticky Sessions using Azure Java SDK for cloud service

To setup the Session Affinity for your cloud service using Azure Java SDK, follow these steps -

1. Open eclipse and browse to your project.

2. Traverse to the WorkerRole in your project and click on Properties.

 

 

 

 

3. Check the enable http session affinity check box.

 

4. Open ServiceDefinition.csdef file for your project in Text Editor and you should see text as -

 

 

5. Install Web Platform Installer on your eclipse machine.

6. Copy following WebpiCmd files to your Azure .Net SDK plugin’s folder (Default directory is: C:\Program Files\Microsoft SDKs\Azure\.NET SDK\v2.5\bin\plugins\WebDeploy). It is possible that you have multiple versions of SDK present in your system, make sure you replace it in latest version. WebpiCmd files are located in the WebPI install directory (default directory is ‘C:\Program Files\Microsoft\Web Platform Installer’).

  • WebpiCmd-x64.exe
  • WebpiCmd-x64.exe.config
  • Microsoft.Web.PlatformInstaller.dll
  • Microsoft.Web.PlatformInstaller.UI.dll 

7. Browse to your eclipse cloud service deployment project from windows explorer. You should see a folder “ROLE/approot/.arrconfig”. ROLE can be WorkerRole1 or WebRole1 or a custom name you have given to your web/worker role.

8. In the .arrconfig folder, edit ConfigureARR.bat file and comment/delete the original line and add the new line for installing ARR 3.0: 

  • Original Line: %ROLEROOT%\plugins\WebDeploy\WebpiCmd.exe/Install /accepteula /Products:ARR
  • New: %ROLEROOT%\plugins\WebDeploy\WebpiCmd-x64.exe/Install /accepteula /Products:ARRv3_0

9. Save the ConfigureARR.bat file and deploy the package with overwrite selected and you should see that ARR 3.0 is now successfully installed and configured.

Comments

  • Anonymous
    December 22, 2015
    Greetings Prasad, I hava met some problems,when I enable session affinity or SSL offloading options,my cloud service web app does't work. but I disable session affinity and SSL offloading,it seems normal.I used eclipse toolkit to configure these.Can you give me some help?
    • Anonymous
      December 23, 2015
      Hi zhanga, when you say problems, what is the problem, is it deployment or it is not working for https? Can you please clarify a little bit? Also, if possible please share the ServiceDefinition.csdef file.
      • Anonymous
        December 24, 2015
        Thank you for your reply,Merry Christmas!I mean is that I can deploy successfully when I enable session affinity or SSL offloading options,but one of the two(session affinity and SSL offloading) is not working properly.My web application shows me "This page can’t be displayed".When I disabled these two options,everything works perfectly.I am a beginner of this.Here is my .csdef file.

      • Anonymous
        December 24, 2015

      • Anonymous
        December 24, 2015

      • Anonymous
        December 24, 2015
        EndpointsInputEndpoint certificate="fjWandant.cloudapp.net" localPort="31221" name="http" port="443" protocol="https" InternalEndpoint name="http_ARR_PROXY" protocol="tcp FixedPort port="8080" InternalEndpointInputEndpoint localPort="*" name="http_ARR_PROXY_REDIRECT" port="80" protocol="tcp"Endpoints