Azure Function App Deployment Fails -

Kajal Chatterjee 25 Reputation points
2025-02-13T22:25:48.0933333+00:00

I am experiencing an issue when deploying an Azure Function App from my local machine using the following command:

func azure functionapp publish <ExistingFunctionAppName>

Error uploading archive (InternalServerError). {"Message": "An error has occurred.", "ExceptionMessage": "An error occurred when trying to create a controller of type 'PushDeploymentController'. Make sure that the controller has a parameterless public constructor.", "ExceptionType": "System.InvalidOperationException", "StackTrace":
at System.Web.Http.Dispatcher.DefaultHttpControllerActivator.Create(HttpRequestMessage request, HttpControllerDescriptor controllerDescriptor, Type controllerType)\r\n
at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()\r\n --- End of stack trace --- "InnerException": { "Message": "An error has occurred.", "ExceptionMessage": "Access to the path 'C:\home\LogFiles\Kudu\DeploymentTrace' is denied.", "ExceptionType": "System.UnauthorizedAccessException", "StackTrace":
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)\r\n
at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost)\r\n
at System.IO.Directory.CreateDirectory(String path)\r\n
at Kudu.Core.Infrastructure.FileSystemHelpers.CreateDirectoryIfNotExists(String path)\r\n } }

The build process completes successfully, and the deployment reaches the step "Creating archive for current directory" and starts uploading files. However, the deployment then fails with an InternalServerError (500).

Further down, there are dependency resolution errors related to Ninject, similar to: at Ninject.Planning.Targets.Target1.GetValue(Type service, IContext parent) at Ninject.Activation.Providers.StandardProvider.GetValue(IContext context, ITarget target) at System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext() at System.Linq.Buffer1..ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArrayTSource at System.Web.Http.Dispatcher.DefaultHttpControllerActivator.Create(HttpRequestMessage request, Type controllerType)

However i am not using Ninject in my project.

Thanks for your help.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,414 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.