Azure Function App Deployment Fails -

K C 55 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,473 questions
{count} votes

Accepted answer
  1. Shireesha Eeraboina 1,800 Reputation points Microsoft Vendor
    2025-02-27T09:56:56+00:00

    Hello @K C,

    Thank you for your patience and for sharing your feedback on the Q&A community platform. I’m glad to hear that you were able to resolve your issue, and I appreciate you sharing your solution! Your contribution is valuable and can help others in the community facing similar challenges.

    As per the Microsoft Q&A community policy, "The question author cannot accept their own answer. They can only accept answers by others"

    I’m reposting your solution here so you can mark it as accepted if it resolves your query:

    "During the function app creation, the selected Blob storage lacked the necessary permissions. The function app and Blob storage were within the same virtual network and subnet, but it did not work automatically. The solution was to add the function app's virtual network and subnet under Blob storage → networking → add virtual existing network. After this adjustment, it started working".

    If you have any other questions, please let me know. Thank you again for your time and patience throughout this issue. 

    Please don’t forget to Accept Answer and Yes for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

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.