This is my first crack at creating an Azure App Function. I've got it working when running on my local dev machine. Now I've deployed it into Azure, and I'm attaching the debugger to it (very cool, btw!).

When running on my localhost, I can use the `local.settngs.json` file for all of the app settings. That works fine. But I seem to be hitting a roadblock on the simple process of accessing application settings when running the function remotely in Azure.

First (and this is a battle I will fight later) I'm sure there is a way to auto-populate the settings in the Azure Function based on what's in `local.settngs.json`, but for now, I added them all manually. 

[![enter image description here](https://i.stack.imgur.com/jEMJn.png)](https://i.stack.imgur.com/jEMJn.png)

For now, let's just take a look at the setting `StorageConnectionString` who's value looks like this:

```
DefaultEndpointsProtocol=https; AccountName=[redacted]; AccountKey=[redacted]; EndpointSuffix=core.windows.net

```

[![enter image description here](https://i.stack.imgur.com/slIj1.png)](https://i.stack.imgur.com/slIj1.png)

All three of these attempts to get the value work on my localhost, but all three also fail when debugging in the remote Azure function:

```
string storageConString = ConfigurationManager.AppSettings["StorageConnectionString"];

string storageConString = CloudConfigurationManager.GetSetting("StorageConnectionString");

string storageConString = Environment.GetEnvironmentVariable("StorageConnectionString");

```

In all cases, I get this this error:

Error message:

> 
> Value cannot be null. Parameter name: itemName
> 
> 
> 

Stack Trace:

> 
> at Microsoft.WindowsAzure.Storage.Core.Util.CommonUtility.AssertNotNullOrEmpty(String paramName, String value) in c:\Program Files (x86)\Jenkins\workspace\release\_dotnet\_master\Lib\Common\Core\Util\CommonUtility.cs:line 143 at Microsoft.WindowsAzure.Storage.File.CloudFileDirectory.GetDirectoryReference(String itemName) in c:\Program Files (x86)\Jenkins\workspace\release\_dotnet\_master\Lib\Common\File\CloudFileDirectory.Common.cs:line 224 at XXXXXXX.Common.AzureFunctions.ProcessInbound.DoBooksExist(BookSource bookSource) at XXXXXXX.Common.AzureFunctions.ProcessInbound.Run(TimerInfo myTimer, TraceWriter log)
> 
> 
> 

The error has me kind of stumped, as it doesn't even seem to apply. Why, for example, is it calling `GetDirectoryReference(String itemName)`?