尽管在另一种情况下使用完全相同的输入,但AzureBlobStorageContainer fetchattributes()抛出错误
我有三个项目。一个是.NET框架网站,一个是.NET 6网站。这两个网站都使用运行.NET框架的第三个项目将文件上传到我们的Azure Blob存储中。
从.NET 6网站提交的文件丢失以下错误。来自.NET Framework网站的文件不会引发此错误。
System.IO.FileNotFoundException: Could not load file or assembly System.Data.Services.Client, Version=3.5.0.0
我已经从两个网站开始结束了上传。他们提供相同的信息。我检查了途中每个变量的值,没有差异。 唯一的差异是一个网站使用.NET 6,另一个网站使用.NET框架。但这没关系,因为两个网站都为第三个项目提供相同的信息。
当我们在第三个项目中初始化容器时,在AzureBlobStorageProvider对象上调用.fetchattributes()时,会抛出错误。
我完全损失了从这里去的地方,并感谢任何建议。我无法理解两个相同的输入如何引起两个不同的结果。
I have three projects. One is a .NET Framework website and one is a .NET 6 website. Both of these websites are using the 3rd project running .NET Framework to upload files onto our Azure blob storage.
Files submitted from the .NET 6 website throw the following error. Files from the .NET Framework website do not throw this error.
System.IO.FileNotFoundException: Could not load file or assembly System.Data.Services.Client, Version=3.5.0.0
I have stepped through the upload beginning to end from both websites. They provide identical information. I checked the value of every single variable along the way and there are no differences. The only difference is that one website is using .NET 6 and the other is using .NET Framework. But that shouldn't matter as both websites are providing identical information to the 3rd project.
The error is thrown when we call .FetchAttributes() on a AzureBlobStorageProvider object while initializing the container in the 3rd project.
I am at a total loss of where to go from here and would appreciate any suggestions. I cannot fathom how two identical inputs are causing two different outcomes.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以尝试以下几种解决方法:
解决方案1:
将Visual Studio更新为最新版本。
消除
web.config
中的所有绑定重定向
web.config
构建项目。
(webappname).dll.config
文件应位于bin
文件夹中。它应包含重定向;将它们复制到web.config
文件。从文件中删除以前的摘要
.csproj
从文件
.csproj
解决方案2:尝试添加
< usenetCoregenerator> true>/usenetCoregenerator>
。 CSPROJ 文件:注意:确保您使用的.NET 6与受支持的软件包版本,如果没有,请尝试更新。
参考:
https://github.com/azure.com/azure/azure/azure-functions--runctions-unctions-unctions-unctions-unctions-unctions-unctions-unctions-unctions-unctions-unctions-unctions-azure-functions- vs-Build-SDK/essess/160
Here are few workarounds that you can try:
Solution 1:
Update the Visual Studio to the most recent version.
Eliminate every binding redirect in
web.config
Include the following in the
.csproj
file:Build the project.
The
(WebAppName).dll.config
file should be located in thebin
folder. It should contain redirects; copy them to theweb.config
file.Delete the previous snippet from the file
.csproj
Solution 2:
Try adding
<UseNETCoreGenerator>true</UseNETCoreGenerator>
to your.csproj
file:Note: Make sure that you are using .net 6 with there supported package versions ,if not please try to update .
Reference:
https://github.com/Azure/azure-functions-vs-build-sdk/issues/160