Issues with Azure.Storage.Blobs integration with ExcelDNA

106 views
Skip to first unread message

StervenMig

unread,
Oct 21, 2025, 11:23:17 PMOct 21
to Excel-DNA
Hi everyone,

I've work with ExcelDNA 1.9.0 and azure blobs connection for some years in Net framework, but the idea is to move to .Net 8.0 +, in order to update all the libraries on the project and some other requirements, but after the project was migrated, I've been facing an issue related to Azure, and every time I connect to azure and download/upload a blob file, after a few seconds I get this error.

{"Unable to read data from the transport connection: The I/O operation has been aborted because of either a thread exit or an application request.."}

I tried multiple things, like using threads, async functions, and even I tried Excel queueasmacro(because it is not used in a UDF), but there is no way to remove that exception caught by a FirstChanceException.

I would expect if someone has a better solution

Govert van Drimmelen

unread,
Oct 22, 2025, 4:23:35 PMOct 22
to exce...@googlegroups.com

Could you perhaps post a small test example to GitHub that works with .NET Framework 4.8, but fails with .NET 8.0 ?

That would be a good start to debugging the issue.

 

-Govert

--
You received this message because you are subscribed to the Google Groups "Excel-DNA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to exceldna+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/exceldna/397a895c-cb3a-453d-87fa-e21c3e3b559an%40googlegroups.com.

StervenMig

unread,
Oct 24, 2025, 2:48:18 PMOct 24
to Excel-DNA
Hi Govert,

I was preparing an example for you, and here it is https://github.com/Stervang/Ribbon-ExcelDNA-Azure.git
It took long because in local environment like Azurite it works perfectly, using the same config except for the connection type, because in Azure is used DNS, and Azurite uses IPv4, but not sure if that impacts on that.

to get the exception, you just need to click on the button that calls the azurecontrol and then wait, or opening a file

let me know if you need something else.

Thanks,
Miguel

Govert van Drimmelen

unread,
Oct 29, 2025, 5:07:21 AMOct 29
to Excel-DNA
Hi Miguel,

Thank you - I will have a look and see if I can reproduce and understand your error.

Regards,
Govert

StervenMig

unread,
Nov 7, 2025, 9:46:01 PMNov 7
to Excel-DNA
Hi Govert,

Were you able to reproduce the issue?

Because I forgot to say, that issue could happen even when it uses NLog connected to a DB.

So, I was wondering if it has something to do with calling certain methods behind the libraries that use Async in the background.

Let me know your thoughts.

Regards,
Miguel

Govert van Drimmelen

unread,
Nov 8, 2025, 4:24:24 PMNov 8
to exce...@googlegroups.com

Hi Miguel

 

I’m sorry I’ve not come back to you.

I downloaded your code and saw the first chance exceptions when I first ran it.

However, after that I could not see those messages when I ran it again …?

I don’t know whether I changed some VS settings that changed the exception display.

 

Are the FirstChanceExceptions from inside the Azure libraries the particular thing that is bothering you, or are there functional problems?

 

Excel-DNA does try to isolate the add-in using an “AssemblyLoadContext”. This sometimes causes issues when loading libraries or code like WPF, and then needs a ‘contextual reflection context’ to work right. But this does not sound like your issue, and is not related to async execution.

 

It might be useful to make a console app that makes similar calls and see if you have the same behaviour.

That would eliminate Excel-DNA and the Excel / add-in environment as variables.

StervenMig

unread,
Nov 9, 2025, 9:05:24 PMNov 9
to Excel-DNA
Hi Govert, 

Right, in some cases when you run the app and then you face the exception it shows just once and then it keeps good, but some others it keeps showing them.

I could just say it comes from the library itself, or the use of some help calls, because when I use sql connection it works perfect, but after using something like nlog or Azure it brings the exception itself.

So, what it's bothering me is the exception itself without context, because the first chance exception is used to catch on logs certain issues that happen in background to then fix them later, in that case Excel won't mess up after getting multiple exceptions, because I've noticed after certain amount of exceptions it brings exceptions like x00008, or memory exceptions, so we try to clean the most we can related to exceptions.

Thanks,
Miguel

Reply all
Reply to author
Forward
0 new messages