-
Notifications
You must be signed in to change notification settings - Fork 493
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'System.Configuration.ConfigurationManager, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified. #2798
Comments
@raedg2000 Can you try with V3 SDK? Why are you using V4? |
I have tried with V3 SDK as well but i see exact same issue. |
I was able to repro exactly same issue. I have CosmosClient middleware that is being used for both MVC web API and Function App. Today I upgraded both my API and function App from .netcore 3.1 to .net 6 [Tried with .net 5 as well] and I can see API is able to load and execute Cosmos Client fine without any issue. However Azure Function (both on runtime v3 and runtime v4) fails to load cosmos client with error – at Microsoft.Azure.Cosmos.DocumentClient.Initialize(Uri serviceEndpoint, ConnectionPolicy connectionPolicy, Nullable |
I have tried using V3 SDK but got the same error. The problem appeared when we started using .Net 6 RC 2 and the new Azure Function Runtime V4. |
Please see Azure/azure-webjobs-sdk-extensions#750 (comment) for the Functions fix. |
I had the same problem when I tried to connect to CosmosDb from a time triggered Azure Function. It worked for me. Hope this helps |
Running a deployed Azure Function on Azure that connects to cosmos db using V4 gives an error.
Even when trying version 3.x it gives the same error.
In this function, I connect to a cosmosdb (SQL API)
Azure Function Project:
net6.0
v4
Once I try to open a connect to cosmos db in the deployed azure function:
CosmosClient cosmosClient = new CosmosClient(cosmosDbConnectionString);
this error is captured.
'System.Configuration.ConfigurationManager, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.
When I remove the code that is related to cosmos db , the deployed azure function runs without errors.
Cosmos Db library depends on the System.Configuration.ConfigurationManager version 4.*
regards,
Raed
The text was updated successfully, but these errors were encountered: