Hello @George Irwin ,
welcome to this moderated Azure community forum.
Based on the code sample you share, I tried my myself and debugged the code via a breakpoint.
I had to change the code a bit.
Instead of using the:
@inject BlobServiceClient blobservice
@inject IConfiguration configuration
I used a local variable for the BlobServiceClient and put the connectionstring directly in the code:
var blobservice = new BlobServiceClient("DefaultEndpointsProtocol=https;AccountName=.....
When I run this code, it works as expected:
the file is uploaded:
It seems the code on the page is not the problem.
It seems either the injection fails or that environment variable is not working fine.
Please not your server-side Blazor app is a web application so the environment variables are read from Application settings.
Try to debug the application by setting a breakpoint both in the page and in the program.cs.
As seen in you question, internal errors (a bug in the code) are not exposed to the browser (because hackers could learn from what is going wrong internally).
If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.