Question

I've been writing a webjob with a blob watch (like http://www.hanselman.com/blog/IntroducingWindowsAzureWebJobs.aspx)

from time to time and without warning, I receive "invalid container name" exceptions from the line

host.RunAndBlock();

Despite not changing the container name in App.config, and while every other method of accessing the blob storage works.

Here's a stack trace for anyone who cares to go through it:

The thread '<No Name>' (0x17bc) has exited with code 0 (0x0).
   at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
   at System.Environment.get_StackTrace()
   at BarcodeJob.Program.Main() in c:\Users\Nik\Documents\Visual Studio 2012\Projects\BarcodeJob\BarcodeJob\Program.cs:line 34
   at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
   at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

and the error message

System.FormatException: Invalid container name: 
   at Microsoft.WindowsAzure.Jobs.BlobClient.ValidateContainerName(String containerName)
   at Microsoft.WindowsAzure.Jobs.CloudBlobPath..ctor(String blobInput)
   at Microsoft.WindowsAzure.Jobs.LogRow.ToPath()
   at Microsoft.WindowsAzure.Jobs.BlobLogListener.<GetRecentBlobWrites>d__0.MoveNext()
   at Microsoft.WindowsAzure.Jobs.BlobListener.Poll(Action`1 callback, CancellationToken cancel)
   at Microsoft.WindowsAzure.Jobs.Listener.PollBlobs(CancellationToken token)
   at Microsoft.WindowsAzure.Jobs.Listener.Poll(CancellationToken token)
   at Microsoft.WindowsAzure.Jobs.Worker.Poll(CancellationToken token)
   at Microsoft.WindowsAzure.Jobs.JobHost.RunAndBlock(CancellationToken token, Action pauseAction)
   at Microsoft.WindowsAzure.Jobs.JobHost.RunAndBlock(CancellationToken token)
   at Microsoft.WindowsAzure.Jobs.JobHost.RunAndBlock()
   at BarcodeJob.Program.Main() in c:\Users\Nik\Documents\Visual Studio 2012\Projects\BarcodeJob\BarcodeJob\Program.cs:line 30
Was it helpful?

Solution

This is more of a bug report than an actual question... So there's not a specific question to answer here, but I can confirm that callstack is certainly incriminating that it's a bug in the WebJobs SDK. We've filed a bug and expect to fix it in the Alpha 2 release. The releases are done via nuget, so Alpha 2 will show up at: http://www.nuget.org/packages/Microsoft.WindowsAzure.Jobs.Host

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top