Code Monkey home page Code Monkey logo

Comments (8)

justinyoo avatar justinyoo commented on June 12, 2024 1

@scubaracer @rychlym @andrebts This has been fixed with the version 1.5.3.

Would you please check this out on your side?

from azurefunctions.extensions.

justinyoo avatar justinyoo commented on June 12, 2024

@scubaracer Thanks for your comment!

As of the version 1.5.1 expects that the host.json physically exists, although it contains nothing. The default content of host.json is:

{
}

from azurefunctions.extensions.

justinyoo avatar justinyoo commented on June 12, 2024

Let me figure out how to set this as an optional.

from azurefunctions.extensions.

andrebts avatar andrebts commented on June 12, 2024

I'm having the same issue when publishing to Azure on a V1 environment.

from azurefunctions.extensions.

rychlym avatar rychlym commented on June 12, 2024

(Today first time I have just meet with your great product - so might be a different issue) I am using V1 environment , In debug -AzureFunctionTools cli no problem but hosted in the azure loked like try to search in different folder:

From exception log:
FileNotFoundException : The configuration file 'host.json' was not found and is not optional. The physical path is 'D:\local\Temporary ASP.NET Files\root\f4168be2\6cf60a80\assembly\dl3\dcd37d59\host.json'.
2019-06-07T18:13:44.320 [Error] Exception: corelationId: 1b260e5c-ff5f-4e06-96a0-4b3f566dd29e, stack: at Microsoft.Extensions.Configuration.FileConfigurationProvider.Load(Boolean reload)
at Microsoft.Extensions.Configuration.FileConfigurationProvider.Load()
at Microsoft.Extensions.Configuration.ConfigurationRoot..ctor(IList`1 providers)
at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build()
....

contrarily to directory from console (but it might be a mistake -a directory substitution - week experiences)
image

from azurefunctions.extensions.

andrebts avatar andrebts commented on June 12, 2024

Hello @rychlym, I had the same issue on using Azure Functions V1 with AlienCube. To solve the issue I had to download the Aliencube project and add Aliencube.AzureFunctions.FunctionAppCommon and Aliencube.AzureFunctions.Extensions.OpenApi to my solution, referencing it instead of the nuget package. After this I changed Aliencube.AzureFunctions.Extensions.OpenApi -> Configurations -> OpenApiAppSettingsBase at line 23 to the following when publishing to production:

var host = new ConfigurationBuilder()
                           .SetBasePath("/home/site/wwwroot/")
                           .AddJsonFile("host.json")
                           .Build();

While using it on a dev environment just keep using the variable "basePath".

Hope you guys can solve it soon for Azure Functions V1.

from azurefunctions.extensions.

kaabahmed avatar kaabahmed commented on June 12, 2024

@justinyoo i got into the same problem. My challenge is that i have to stick to functions v1 due to a dependent third party SDK, and when i deploy to azure, i get the same host.json was not found and is not optional issue.

When i am looking at the latest code in 'dev', i am seeing the implementation has changed. So the commit 'ee9e63d' has kind of changed. Can you please confirm if the latest work still works with v1? or i need to make some modifications at my end

from azurefunctions.extensions.

nitinarote avatar nitinarote commented on June 12, 2024

Any further updates on it. Does this get resolved or still issue is there. In my case its works locally fine but after deployment in Azure Function App not working.
Because i also getting same problem for Azure funtion V1.

Getting below error,
2023-02-08T06:05:33.653 [Info] Function started (Id=857162bb-ceb8-41c3-9c2d-2536eb95e073)
2023-02-08T06:05:33.669 [Info] SwaggerUI page was requested.
2023-02-08T06:05:33.669 [Error] Exception while executing function: RenderSwaggerUI. ReminderFunctionApp: The type initializer for 'SwaggerFunction.OpenAPINew.OpenApiHttpTrigger' threw an exception. Microsoft.Extensions.Configuration.FileExtensions: The configuration file 'host.json' was not found and is not optional. The physical path is 'C:\local\Temporary ASP.NET Files\root\ead32014\38e3c87a\assembly\dl3\7d928f2f\003ae705_813bd901\host.json'.
2023-02-08T06:05:33.684 [Error] Function completed (Failure, Id=857162bb-ceb8-41c3-9c2d-2536eb95e073, Duration=15ms)

from azurefunctions.extensions.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.