Webapp on Azure use Local Storage Emulator?


  • Hi Everyone, I'm trying to deploy a website to Azure WebApp.. and I want it still use local storage emulator..Is it possible?

    OmegaVN - Window Phone Application Researching and Development

    Friday, January 15, 2016 3:38 AM

All replies

  • Hi Omega,

    If you create a regular old Web Site and run that in Visual Studio, the Storage Emulator is not turned on. Visual Studio only turns on the Storage Emulator for you when you debug using a Cloud Service, but this is not convenient.

    refer the blogpost that explains how to start the storage emulator from a shortcut, but the keys are:

    1. Find csrun.exe —  “C:\Program Files\Microsoft SDKs\Windows Azure\Emulator\csrun.exe 
    2. Run csrun.exe with the parameter /devstore:start which indicates to start up the Storage Emulator.
    3. Done. Of course you might want this is a bat file or as a PowerShell function.

    Here’s PowerShell script that will turn it on:

    & 'C:\Program Files\Microsoft SDKs\Windows Azure\Emulator\csrun.exe' /devstore:start
    view raw         start-azure-storage-emulator.ps1        hosted with  by GitHub      

    Addressing the Storage Emulator

    The other part is knowing how to set up your Storage Connection String so that it accesses local storage emulator instead of the cloud.

    Here are the values to use to make it look like any other Storage Account, while still addressing local emulated storage rather than in the cloud:

    Emulator Storage Account Name: devstoreaccount1 Emulator Storage Account Key: Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==


    Hope this helps.

    Girish Prajwal

    Friday, January 15, 2016 1:03 PM