WAWS/C# (Azure Websites) reference implementation for Webhooks.
Clone or download
Latest commit 223a0cd Nov 1, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
src CHANGED: updated Microsoft.Data.OData version to meet minimal require… Nov 1, 2018
.gitignore Initial version Feb 21, 2014
LICENSE.txt Rename LICENSE to LICENSE.txt Jun 1, 2017
README.md CHANGED: readme May 29, 2017


Photon Turnbased Webhooks Sample


This is the Photon Turnbased Webhooks sample using Azure Websites and Blob Storage and Table Storage for persitence.


  • Photon Account
  • Windows with IIS (Internet Information Service) feature enabled
  • Visual Studio 2013 or up
  • ngrok to forward requests to your PC

Option 1: Azure Storage

  • Azure Account: It is free (but you need to enter a Credit Card)
  • Azure Storage: Create a "STORAGE" > Quick Create (enter Name and Region)

Option 2: Redis

Set this project up for free now! Check out all the possibilities of Microsoft Azure!

Sign up for your free trial month of Microsoft Azure now and get USD 200 / EURO 150 to spend on all(!) Azure services you like to try out – without any further obligation!
You’ll get the full power from the Cloud and you can choose yourself, how to spend your balance!


For authentification purposes you’ll need a credit card to sign up. Without a credit card request a free Microsoft Azure Pass simply by sending a short note to azurenow@microsoft.com. Use the Microsoft Azure Pass to sign up at www.windowsazurepass.com and you’ll also discover the cloud power of Microsoft Azure for free!

Run it locally

  • Open the sample running Visual Studio as administrator and build the project (admin privileges are required because a virtual directory is used).
  • Option 1: Azure Storage, web.config <add key="DataAccess" value="Azure"/>
    • Select the Azure Storage > Manage Access Keys (copy paste into the config)
    • set <add key="AzureAccountName" value="" />
    • set <add key="AzureAccountKey" value="" />
  • Option 2: local Redis, web.config <add key="DataAccess" value="Redis"/>
    • set <add key="RedisPassword" value=""/>
    • set <add key="RedisUrl" value=""/>
    • Start local redis server
  • Start ngrok in a command shell: ngrok http 80 and copy the url which forwards to
  • go to the Photon Dashboard, create an application and set in the Webhooks tab the BaseUrl value: [url from ngrok]/turnbased/[your app id]/.
  • run the client demo
  • check the requests and responses in your browser at

Next Steps

Publish to Azure Websites

  • Create an Microsoft Azure Websites account, create a website, load down a publisher profile and publish the side to Azure Websites. Don't forget to change the Redis settings to point to your Redis server (you can use your local server by forwarding the corresponding port with ngrok to your PC)
  • adjust the base url in the Photon Dashboard

Modify the webhooks logic